summaryrefslogtreecommitdiffstats
path: root/tests/test_import_legacy.py
diff options
context:
space:
mode:
authorHenry Nash <henryn@linux.vnet.ibm.com>2013-07-05 06:04:25 +0100
committerHenry Nash <henryn@linux.vnet.ibm.com>2013-07-10 05:23:00 +0100
commit661cef927e95cf87a96eea7f0f6d840f8bf4adcd (patch)
tree50762c60adead7c8c557696da8b70b2c87da6283 /tests/test_import_legacy.py
parentfafdf072f5a34ee12ffe9d7651551c83459759bb (diff)
downloadkeystone-661cef927e95cf87a96eea7f0f6d840f8bf4adcd.tar.gz
keystone-661cef927e95cf87a96eea7f0f6d840f8bf4adcd.tar.xz
keystone-661cef927e95cf87a96eea7f0f6d840f8bf4adcd.zip
Rationalize how we get roles after authentication in the controllers
Currently there is a mixture of strategies in the v2 and v3 controllers for how to get the roles assigned for the scope of the requested authentication. This duplicates code, is hard to maintain and in at least once case (where your only roles on a project are due to a group membership) is not actually correct (for v2 tokens). This change does the following: - Standardizes on using the 'get_roles_for_user_and_project()', and its domain equivalent, for how roles are obtained to build a token. This was already the case for v3 tokens. The controllers no longer need to get metadata and extract the roles. - Removes the driver level function to 'authorize_for_project' - this is now handled wihin the controller. The driver simply supports the user authentication. A nice (and planned for) sideffect of the above is that we now hide the schema of how we store roles within the driver layer - i.e. nothing outside of the driver (other than any specific-to-implementation tests) have to know about how roles are stored in the metadata. This paves the way for a re-implementation of the grant tables in IceHouse. This change also fills in missing function definitons in the assignment driver. Implements bp authenticate-role-rationalization Change-Id: I75fc7f5f728649d40ab1c696b33bbcd88ea6edee
Diffstat (limited to 'tests/test_import_legacy.py')
-rw-r--r--tests/test_import_legacy.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_import_legacy.py b/tests/test_import_legacy.py
index bafc076a..2642a2cf 100644
--- a/tests/test_import_legacy.py
+++ b/tests/test_import_legacy.py
@@ -73,7 +73,7 @@ class ImportLegacy(test.TestCase):
self.assertEquals(user_ref['enabled'], True)
# check password hashing
- user_ref, tenant_ref, metadata_ref = self.identity_man.authenticate(
+ user_ref = self.identity_man.authenticate(
user_id=admin_id, password='secrete')
# check catalog
@@ -90,7 +90,7 @@ class ImportLegacy(test.TestCase):
self.assertEquals(user_ref['enabled'], True)
# check password hashing
- user_ref, tenant_ref, metadata_ref = self.identity_man.authenticate(
+ user_ref = self.identity_man.authenticate(
user_id=admin_id, password='secrete')
# check catalog
@@ -107,7 +107,7 @@ class ImportLegacy(test.TestCase):
self.assertEquals(user_ref['enabled'], True)
# check password hashing
- user_ref, tenant_ref, metadata_ref = self.identity_man.authenticate(
+ user_ref = self.identity_man.authenticate(
user_id=admin_id, password='secrete')
# check catalog