39 Commits

Author SHA1 Message Date
Jenkins
9ca6cd8704 Merge "Make getting user-domain roles backend independant" 2013-03-11 14:02:31 +00:00
Jenkins
59757f662f Merge "from tests import" 2013-03-11 04:56:13 +00:00
Adam Young
d8599dcda0 from tests import
Makes the resolution of local imports work
when running individual tests.

Bug 1152326

Change-Id: I72f54bdbb60a6d7acf32bdbdc02d7bce69add84e
2013-03-08 11:51:49 -05:00
Gordon Chung
0297f6fd56 add missing attributes for group/project tables (bug1126021)
add and assign default values for optional attributes to all backends

Change-Id: I54fe234b919162c3056c14f1f06c4de876080fb9
2013-03-07 15:42:38 -05:00
Henry Nash
1e64378f42 Make getting user-domain roles backend independant
There is nothing backend specific in geting the list of roles
for a user-domain, so we should move this function into backends
core.  This also has the affect of now ensuring that the kvs and ldap
support will work, provided the specific backend supports roles on
users and domains.  This is true today for kvs, but support in ldap
for domains is gated by other bugs.

Fixes bug #1131769

Change-Id: Id99accb33fd7cd8d6c37e64e140552c5bfe68349
2013-03-04 19:52:48 +00:00
Adam Young
573437511f Fix id_to_dn for creating objects
Only do the lookup if the scope is not ONELEVEL
For ONELEVEL, there is no point in paying the price of the lookup.

If the object is not found for scoped queries, return the top level
DN so the object can be created.

Bug 1131265

Change-Id: I1ca41bf87c3bdea30fbdf607b19192f37dd0bfd6
2013-02-21 12:20:14 -05:00
Jenkins
c6b978cbb8 Merge "enabled attribute emulation support" 2013-02-21 02:41:33 +00:00
Jenkins
d036db145d Merge "make LDAP query scope configurable" 2013-02-20 10:28:19 +00:00
alatynskaya
408a1d57d7 enabled attribute emulation support
Fixes bug 1063858
Implementation works as described in the second comment.

Change-Id: Ib0aa85f05244044c9f40fa9634b5ed3e8afa1f37
2013-02-20 02:49:56 +04:00
Henry Nash
ec326b39fa Implement name space for domains
Creates a separate name space for each domain for the name attribute of
user, groups and projects - meaning that the names of these entities
only have to be unique within that domain.

Implementation of this within the SQL backends is handled by simply
changing the uniqueness constraints on the relevant attributes.  KVS
and LDAP backends do not yet support domain separation (blocked by
existing restrictions, already raised as bugs).

An issue exists for the downward migration with this change in that
if the database has been used and populated with the name space in place
then the downward migration may fail due to clashing names when you
try and revert to a global name space (raised as a separate bug)

This patch also improves the group support in the KVS backend and
cleans up string quoting in the 016 migration fucntions, and fixes an
issue where the SQL update_project was not updating a change in domain_id.

Change-Id: I8f0df0e1bf84bfd26b8ef5505fe5fafd930dc78b
2013-02-19 07:06:22 +00:00
Ionuț Arțăriși
159ffe48e9 make LDAP query scope configurable
Get the DN from the LDAP server itself rather than hardcoding its format.

Fixes bug 1122181

Change-Id: I6f70c480b5c6f1b064e74d3cbd2cd8ca5ee82b0a
2013-02-18 17:02:44 +01:00
Jenkins
65b14f003e Merge "remove unneeded config reloading (it's already done during setUp)" 2013-02-16 15:58:42 +00:00
Gordon Chung
0fb017a095 add missing kvs functionality (bug1119770)
add list_projects
mod list_groups, list_domains, get_project_users to match sql response
not adding list_user_projects

fix list_projects to return refs
drop get_projects and get_all_projects

Change-Id: Ifa1433918b8770cd7d59f36f71f2e6b935625ae5
2013-02-14 15:33:46 -05:00
Gordon Chung
a6abeb7d9d adding additional backend tests (bug1101244)
Change-Id: I36597184818b0c34fd614252b5af239e02fc411f
2013-02-13 15:20:18 -05:00
Henry Nash
8a89464d62 Keystone backend preparation for domain-scoping
These changes lay the ground work for the implmentation of
domain-scoping, but are benign in that they don't change the token.
They include making domain_id a first-class attribute in the user
and project entity (i.e. move it out of the 'extra' attribute),
filling in domain grant and project support for the kvs backend and
fixing a series of issues in the mirgation to make it work for both
MySQL, Postgresql and sqlite.

A further, separate, commit will actually provide the code to
update the actual tokens once the v3 token support has been added.

blueprint domain-scoping
blueprint default-domain

Change-Id: I55ab7947a6a1efbab003bd234856bd3805bb4a63
2013-02-12 16:09:15 +00:00
Ionuț Arțăriși
98cd38339a remove unneeded config reloading (it's already done during setUp)
Change-Id: I4341b6c00dfe2354a13bfa4cb2a6ed5d1441f4cb
2013-02-08 17:46:00 +01:00
Ionuț Arțăriși
cfb3fdb5ec allow unauthenticated connections to an LDAP server
Fixes: bug 1119495

Change-Id: I13cdc212752f212ecf59a6a83f8f32c042ccf6e0
2013-02-08 17:35:19 +01:00
Adam Young
4b2b3af2e3 tenant to project in the apis
Change-Id: I1f6fdf304ca3ff0b6e0e05a71fd944189105c5b6
2013-01-28 16:48:53 -05:00
Adam Young
31660b119e Tenant to Project in Back ends
A continuation of the process to convert the term tenant
to project.  These changes should only be visible in the
error messages produced, but should otherwise be
undetectable by calling programs.

Removes the TenantNotFound exception which propagates changes through
the code that calls the backends as well

Change-Id: I998a44bfd6aa85f67d58904bd7af25a56c73d48a
2013-01-28 16:37:00 -05:00
Henry Nash
4fae928c59 Keystone server support for user groups
This implements the server side of groups of users.  This
set of code provides all the crud functionality for groups as
well as the corresponding support for role assignments.

blueprint user-groups

The following deficiencies existing with the current version and
will be corrected ahead of the final Grizzly release:

1) There is only placeholder support for LDAP (Bug #1092187)
2) Domain role grants are accepted but not yet honored (Bug #1093248)
3) Token invalidation does not occur with group changes (Bug #1093493)

This update also fills in missing v3 grant unit testing and v3 grant
support within the kvs backend.  In addition, there is a fix for
Bug #1092200 (uncaught exception when listing grants)

DocImpact

Change-Id: Ibd1783b04b2d7804eff90312e5ef591dca4d0695
2013-01-08 01:32:46 +00:00
Dolph Mathews
36c880eb28 Reduce total number of fixtures
Fixtures are created before every test, so each fixture adds a
considerable amount of overhead to the overall test suite.

This patch attempts to eliminate fixtures utilized by only a few tests
in favor of re-cycling as many fixtures as possible. As a result, a few
tests are refactored to depend on different fixtures.

Change-Id: Idd4dcef5e38e304d19110c61886887fb64b4d658
2012-11-13 16:17:04 -06:00
Jose Castro Leon
001f708e7d Provide config file fields for enable users in LDAP backend (bug1067516)
DocImpact

Change-Id: I1ee9a1e2505cdd8c9ee8acba5c0e89a4f25c7262
2012-11-13 10:37:17 -06:00
Jose Castro Leon
a4a97eabb8 Extract hardcoded configuration in ldap backend (bug 1052111)
Change-Id: I128b0ccdb32694a4fc2f660e73c367aa8b01f257
2012-10-16 23:25:03 +02:00
Jose Castro Leon
df8d6cc719 Filter users in LDAP backend (bug 1052925)
Change-Id: I004e569756698098bf073f5516945f356f88bfea
2012-10-10 08:50:57 +02:00
Jose Castro Leon
8152c2cb86 Configurable actions on LDAP backend in users Active Directory (bug 1052929)
Change-Id: I99092eb4aee3b3b1b9cf297561577f1915c0e886
2012-10-05 16:26:59 +02:00
Adam Young
2a78594153 Implementation of LDAP functions
implementations of delete_tenant, delete_user,
  remove_role_from_user_and_tenant, get_tenant_users
  role.delete_user and remove_role_from_user_and_tenant
  remove_user_from_tenant, change_ role

clean up LDAP sample data for live LDAP

properly check for existance of tenant_id in user.

Some tests expected the functions to be unimplemented.  Those hid the
failuers on the LDAP Identity provider and have been removed.

Make live tests extend the standard LDAP tests, so they test the same features.

Bug 1021315

Change-Id: I2866ff40fdc13040ba10d189ea2d95440eb4395c
2012-07-16 15:47:32 -04:00
Derek Higgins
7cdae1bc02 Fixing pep8 errors in tests/*py
Fixes bug 1022575

Making change to tests/*py to pass pep8 tests.
pep8 tests started failing following
39b20acc933cb0fdf73075ddb9a9d82665b84b23 update pep8 to 1.3.3
04df79b64e5f2296df03579700535774e158f623 include tests dir in pep8 tests

Change-Id: I2d7dec0a87f1ae9b5f828d7f321b65bf8c06a421
2012-07-09 16:11:30 +01:00
Rafael Durán Castañeda
04df79b64e Run pep8 for tests.
Fixes bug 1021508

Test code should be as pep8 compliant as source code, however right now
'run_tests.sh' only runs pep8 for source code.

Change-Id: I877493a8bf6f28bef71fe2aca6f188a75798225f
2012-07-06 00:56:23 +02:00
Jenkins
ed43d47b82 Merge "Reorder test imports by full import path" 2012-07-03 19:03:25 +00:00
Zhongyue Luo
a7417e26d8 Reorder test imports by full import path
Fixes bug #1020182

Reorder imports of modules in keystone/tests.

Change-Id: I2ff61dd3d9486281b4a2a889e4dc8b9105c87d49
2012-07-03 00:21:39 +08:00
Adam Young
58105d8f56 Correct Tree DN
instead of
    cn=example,cn=com,ou=Users
code now generates
    ou=Users,cn=example,cn=com

Getting stricter in testing and adding some regression testing

Fixes Bug 980209

Change-Id: Ib97e6cb00848ea183c7e1f2b2589b25924a08caa
2012-06-29 21:41:37 -04:00
Dolph Mathews
23ca656927 Refactor 404's into managers & drivers (bug 968519)
The goal is to move the responsibility of reference checks away from
controllers and into the underlying managers & drivers, which can
handle the task with equal or greater efficiency.

- Tenant references from create_user/update_user are NOT tested
  due to inconsistencies between backends
- Additional test coverage improvements

Also fixes bug 999209, bug 999608, bug 1006029, bug 1006055, bug 1006287,
bug 1006334, and bug 1006344.

Change-Id: I7de592e7dd4518038436b9a9fdaab559b00a0537
2012-06-27 11:47:24 -05:00
Mark McLoughlin
b2aa78b558 Use cfg's new global CONF object
Implements blueprint cfg-global-object

Change-Id: Ic53b41dafa8666ce21f33697f7e8697f1e5cb0fd
2012-06-13 08:14:40 +01:00
Chmouel Boudjnah
bb2fbb7030 Fixes some pep8 warning/errors.
- Using flake8 so a bit more than that.

Change-Id: I63fa21f7d3d02f96c0c56804fdd56da37c952d7d
2012-05-24 16:21:09 +02:00
Josh Kearney
f640093ba8 Rename keystone.conf to .sample.
Fixes bug 966670.

Change-Id: Ic57c9971c4f3a14c30e2382c58c3d0da6b2a7957
2012-04-10 12:38:50 -05:00
Dolph Mathews
5720730c2e Added license header (bug 929663)
Change-Id: Ia36a22f2d6bba411e4fad81ea2d6fa1f0465a733
2012-03-09 18:49:45 +00:00
Adam Young
bc346357a2 LDAP get_user_by_name
Required by keystoneclient

https://bugs.launchpad.net/keystone/+bug/943567
bug 943567

Change-Id: I5aec63e81262ad6f3b2e5a984841d8d6bdfa8da5
2012-03-02 14:50:13 -05:00
termie
dd35d2afbf standardize ldap and related tests
ldap was accidentally supplying some of its own values rather than using
the built-in fixtures, so it was providing the incorrect interface for a
couple calls.

also adds a test for get_user_by_name (skipped for ldap) and
standardizes the kvs and ldap authenticate calls

fix user authentication live ldap tests
Change-Id: If1ccce1fd9c84622bb89344bc5d5c59b059d03ae
2012-03-01 15:39:22 -05:00
Adam Young
63437e9dca LDAP Identity backend
Bug 933852

Merged over the code from the legacy keystone implementation, updated
style and streamlined the API a bit.

 * Unit tests can be run against a live OpenLDAP server
 * Password hashing done via passlib. Only does salted sha1, which is what simple_bind requires, but is not secure.
 * Added pip dependencies

Change-Id: I5296d94f6b7d0a7c7dbc887cdae872171e34bb5f
2012-02-27 16:51:46 -08:00