diff options
| author | Thiago da Silva <thiago@redhat.com> | 2013-12-03 18:06:21 -0500 | 
|---|---|---|
| committer | Luis Pabon <lpabon@redhat.com> | 2013-12-05 09:18:30 -0800 | 
| commit | 2d818c06b805b051996d605ef8ef5b5415bd6293 (patch) | |
| tree | 76d82bf425c1fb4b43f937e4866d862b1d84d8c5 /test/unit/common/middleware/gswauth | |
| parent | b36fe03702e76294d530d405ca61f45a7a382057 (diff) | |
fix issue with swauth-clean-token returning 403 errors
The issue was due to missing a necessary change that was made when changing
the auth account name from .auth to metadata volume.
the auth account has a group of the same name, so the .auth account
also had a .auth group, so we needed to change that too to the
metadata volume (e.g., gsmetadata)
Change-Id: Iaa3b7a1b2628f5b863807932e863593be0011a82
Signed-off-by: Thiago da Silva <thiago@redhat.com>
Reviewed-on: http://review.gluster.org/6416
Reviewed-by: Luis Pabon <lpabon@redhat.com>
Tested-by: Luis Pabon <lpabon@redhat.com>
Diffstat (limited to 'test/unit/common/middleware/gswauth')
| -rw-r--r-- | test/unit/common/middleware/gswauth/swauth/test_middleware.py | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/test/unit/common/middleware/gswauth/swauth/test_middleware.py b/test/unit/common/middleware/gswauth/swauth/test_middleware.py index 46d634f..7bf44fe 100644 --- a/test/unit/common/middleware/gswauth/swauth/test_middleware.py +++ b/test/unit/common/middleware/gswauth/swauth/test_middleware.py @@ -805,6 +805,7 @@ class TestAuth(unittest.TestCase):          self.assertEquals(self.test_auth.app.calls, 2)      def test_get_token_for_auth_acct_success(self): +        fmc = FakeMemcache()          local_auth = \              auth.filter_factory({                  'super_admin_key': 'supertest', @@ -814,7 +815,7 @@ class TestAuth(unittest.TestCase):          resp = Request.blank(              '/auth/v1.0',              environ={'REQUEST_METHOD': 'GET', -                     'swift.cache': FakeMemcache()}, +                     'swift.cache': fmc},              headers={'X-Auth-User': 'act:.super_admin',                       'X-Auth-Key': 'supertest'}).get_response(local_auth)          self.assertEquals(resp.status_int, 200) @@ -822,6 +823,9 @@ class TestAuth(unittest.TestCase):          self.assertTrue(itk.startswith('AUTH_itk'), itk)          self.assertEquals(resp.headers.get('x-storage-url'),                            'http://127.0.0.1:8080/v1/AUTH_gsmd') +        expires, groups = fmc.get('AUTH_/auth/%s' % itk) +        self.assertEquals(groups, +            'gsmd,.reseller_admin,AUTH_gsmd')      def test_get_token_for_auth_acct_fail_passwd(self):          local_auth = \ @@ -3870,7 +3874,7 @@ class TestAuth(unittest.TestCase):          self.assert_(expires > time(), expires)          self.assertEquals(              groups, -            '.auth,.reseller_admin,AUTH_.auth') +            'gsmetadata,.reseller_admin,AUTH_gsmetadata')      def test_get_admin_detail_fail_no_colon(self):          self.test_auth.app = FakeApp(iter([]))  | 
