summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorDan Prince <dan.prince@rackspace.com>2011-02-23 13:53:02 -0600
committerDan Prince <dan.prince@rackspace.com>2011-02-23 13:53:02 -0600
commitf7751eedc0e895f90d48104e2110bc2b320735fc (patch)
tree16ab36edadfe418bfd7aeab86592253ca6815978 /nova/api
parent400bbd8c7d56543a5cebad25d078ec0331b07a3c (diff)
downloadnova-f7751eedc0e895f90d48104e2110bc2b320735fc.tar.gz
nova-f7751eedc0e895f90d48104e2110bc2b320735fc.tar.xz
nova-f7751eedc0e895f90d48104e2110bc2b320735fc.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 = {}