diff --git a/Authors b/Authors index c8d3d54328b..49706a13c67 100644 --- a/Authors +++ b/Authors @@ -103,6 +103,7 @@ Naveed Massjouni Nikolay Sokolov Nirmal Ranganathan Ollie Leahy +Pádraig Brady Paul Voccio Renuka Apte Ricardo Carrillo Cruz diff --git a/nova/api/openstack/auth.py b/nova/api/openstack/auth.py index d435f8318fb..d8dbb6866e6 100644 --- a/nova/api/openstack/auth.py +++ b/nova/api/openstack/auth.py @@ -43,9 +43,12 @@ class NoAuthMiddleware(wsgi.Middleware): @webob.dec.wsgify(RequestClass=wsgi.Request) def __call__(self, req): if 'X-Auth-Token' not in req.headers: + os_url = req.url + version = common.get_version_from_href(os_url) user_id = req.headers.get('X-Auth-User', 'admin') project_id = req.headers.get('X-Auth-Project-Id', 'admin') - os_url = os.path.join(req.url, project_id) + if version == '1.1': + os_url = os.path.join(os_url, project_id) res = webob.Response() # NOTE(vish): This is expecting and returning Auth(1.1), whereas # keystone uses 2.0 auth. We should probably allow