From a45bbcc8e2c2c98cbd673c845a226721931d9729 Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Wed, 6 Feb 2013 11:39:12 +0000 Subject: [PATCH] heat common : context should split roles from X-Roles The auth_token code joins roles with a comma delimiter and stores the result in the X-Roles header, so we need to split X-Roles back into a list for the context (otherwise the oslo policy code breaks) Change-Id: I32bd1d6355b6fe0e16e729f35b1d0b5c61346a70 Signed-off-by: Steven Hardy --- heat/common/context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/heat/common/context.py b/heat/common/context.py index 0bdca8e1..68d0c09c 100644 --- a/heat/common/context.py +++ b/heat/common/context.py @@ -185,7 +185,7 @@ class ContextMiddleware(wsgi.Middleware): tenant = headers.get('X-Tenant-Name') tenant_id = headers.get('X-Tenant-Id') auth_url = headers.get('X-Auth-Url') - roles = headers.get('X-Roles') + roles = headers.get('X-Roles').split(',') except Exception: raise exception.NotAuthenticated() -- 2.45.2