summaryrefslogtreecommitdiffstats
path: root/nova/api
diff options
context:
space:
mode:
authorJustin Santa Barbara <justin@fathomdb.com>2011-02-21 22:39:53 +0000
committerTarmac <>2011-02-21 22:39:53 +0000
commit1f4bf71dfbe742c95584ff3a357076b7ea736d11 (patch)
treea70d706546b979fcadf313a2845e506ea8d88398 /nova/api
parent0eba5864cffa3ab9fc94ffa25d84c81a06183c7e (diff)
parent990a0fdce67971e81665aa2151e43b071d8bcb7c (diff)
downloadnova-1f4bf71dfbe742c95584ff3a357076b7ea736d11.tar.gz
nova-1f4bf71dfbe742c95584ff3a357076b7ea736d11.tar.xz
nova-1f4bf71dfbe742c95584ff3a357076b7ea736d11.zip
The OpenStack API was using the 'secret' as the 'access key'. There is an 'access key' and there is a 'secret key'. Access key ~= username. Secret key ~= password. This fix is necessary for the OpenStack Python API bindings to log in.
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 473071738..0b6ef8fc5 100644
--- a/nova/api/openstack/auth.py
+++ b/nova/api/openstack/auth.py
@@ -121,8 +121,8 @@ class AuthMiddleware(wsgi.Middleware):
req - webob.Request object
"""
ctxt = context.get_admin_context()
- user = self.auth.get_user_from_access_key(key)
- if user and user.name == username:
+ user = self.auth.get_user_from_access_key(username)
+ if user and user.secret == key:
token_hash = hashlib.sha1('%s%s%f' % (username, key,
time.time())).hexdigest()
token_dict = {}