From d40a9f4f6e10feb806d2ee4dd6266c948e7e6645 Mon Sep 17 00:00:00 2001 From: AmalaBasha Date: Tue, 3 Sep 2013 15:51:59 +0530 Subject: [PATCH] Log user info in auth_token middleware Add logging for user information (like user name, tenant_id, roles) in the auth_token middleware. This would make tracking down issues much easier. Change-Id: Ife4ce29d2f8e1a338a025dda4afbd7b563f6b8c1 Implements: blueprint user-info-logging-in-auth-token-middleware --- keystoneclient/middleware/auth_token.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keystoneclient/middleware/auth_token.py b/keystoneclient/middleware/auth_token.py index 6dc7c931d..da32a5089 100644 --- a/keystoneclient/middleware/auth_token.py +++ b/keystoneclient/middleware/auth_token.py @@ -900,6 +900,9 @@ class AuthProtocol(object): 'X-Role': roles, } + self.LOG.debug("Received request from user: %s with project_id : %s" + " and roles: %s ", user_id, project_id, roles) + try: catalog = catalog_root[catalog_key] rval['X-Service-Catalog'] = jsonutils.dumps(catalog)