From: Angus Salkeld Date: Fri, 15 Jun 2012 00:55:51 +0000 (+1000) Subject: Fix the metadata server auth (KeystoneCreds only sent from heat) X-Git-Tag: 2014.1~1727 X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d36d8d38ba3d9b440a385f519f19bda6c3416547;p=openstack-build%2Fheat-build.git Fix the metadata server auth (KeystoneCreds only sent from heat) Change-Id: I918ff76485649ec56312f7029895d61e0cbf7a4b Signed-off-by: Angus Salkeld --- diff --git a/heat/common/context.py b/heat/common/context.py index d452bb2b..93faac76 100644 --- a/heat/common/context.py +++ b/heat/common/context.py @@ -173,9 +173,10 @@ class ContextMiddleware(wsgi.Middleware): # I Haven't tested to see if WSGI stuff would escape # everything to make this safe. However, I haven't found # a better way to do this either. - creds = eval(req.params['KeyStoneCreds']) - username = creds['username'] - password = creds['password'] + if 'KeyStoneCreds' in req.params: + creds = eval(req.params['KeyStoneCreds']) + username = creds['username'] + password = creds['password'] token = headers.get('X-Auth-Token') service_user = headers.get('X-Admin-User')