summaryrefslogtreecommitdiffstats
path: root/test/functional_auth/gswauth/test_gswauth.py
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2014-01-02 12:20:20 +0530
committerChetan Risbud <crisbud@redhat.com>2014-01-08 03:30:36 -0800
commitc3c46d6188015cd5f75e7a6f754fd032ab30ac21 (patch)
treea40987f9ddc5b5a130eee4ac5bb29e4f1898989b /test/functional_auth/gswauth/test_gswauth.py
parentf81f652899b9fd46114ce9089f6b9a97ea9584a1 (diff)
Fix users not able to change their own password/key
Users were not able to update their own password/key with the update operation resulting in 403 (HTTPForbidden). EXAMPLES: Command to update password/key of regular user: gswauth-add-user -U account1:user1 -K old_pass account1 user1 new_pass Command to update password/key of account admin: gswauth-add-user -U account1:admin -K old_pass -a account1 admin new_pass Command to update password/key of reseller_admin: gswauth-add-user -U account1:radmin -K old_pass -r account1 radmin new_pass BUG: https://bugs.launchpad.net/gluster-swift/+bug/1262227 Change-Id: I604da5aee67099b29541eb7e51a040a041f1961b Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6650 Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6668 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
Diffstat (limited to 'test/functional_auth/gswauth/test_gswauth.py')
-rw-r--r--test/functional_auth/gswauth/test_gswauth.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional_auth/gswauth/test_gswauth.py b/test/functional_auth/gswauth/test_gswauth.py
index 3ee3f5d..5219f13 100644
--- a/test/functional_auth/gswauth/test_gswauth.py
+++ b/test/functional_auth/gswauth/test_gswauth.py
@@ -227,15 +227,16 @@ class TestGSWauth(unittest.TestCase):
# attempt to change password
path = '%sv2/%s/%s' % (config['auth_prefix'], config['account'],
config['username'])
- headers = self._get_admin_headers()
+ headers = {'X-Auth-Admin-User':
+ config['account'] + ':' + config['username'],
+ 'X-Auth-Admin-Key': config['password']}
headers.update({'X-Auth-User-Key': 'newpassword',
'Content-Length': '0',
- 'X-Auth-Admin-Key': config['password'],
'X-Auth-User-Admin': 'true'})
conn = http_connect(config['auth_host'], config['auth_port'], 'PUT',
path, headers)
resp = conn.getresponse()
- self.assertTrue(resp.status == 401)
+ self.assertTrue(resp.status == 201)
finally:
try: