summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-02-24 00:34:55 +0000
committerTarmac <>2011-02-24 00:34:55 +0000
commit211810f9eae7eb07a3d8947dacbaa5e3874d4670 (patch)
tree045f975264db9a4525d32c7594a8ae3a0c2a9b8f /nova/api
parentdf2b1dec7ad4d1561ab31a4c04fd339856a7d751 (diff)
parentf7751eedc0e895f90d48104e2110bc2b320735fc (diff)
downloadnova-211810f9eae7eb07a3d8947dacbaa5e3874d4670.tar.gz
nova-211810f9eae7eb07a3d8947dacbaa5e3874d4670.tar.xz
nova-211810f9eae7eb07a3d8947dacbaa5e3874d4670.zip
Revert commit 709. This fixes issues with the Openstack API causing 'No user for access key admin' errors.
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/openstack/auth.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py
index c3fe0cc8c..1dfdd5318 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -120,8 +120,8 @@ class AuthMiddleware(wsgi.Middleware):
req - webob.Request object
"""
ctxt = context.get_admin_context()
- user = self.auth.get_user_from_access_key(username)
- if user and user.secret == key:
+ user = self.auth.get_user_from_access_key(key)
+ if user and user.name == username:
token_hash = hashlib.sha1('%s%s%f' % (username, key,
time.time())).hexdigest()
token_dict = {}