diff options
author | Joe Heck <heckj@mac.com> | 2012-03-30 22:04:16 -0700 |
---|---|---|
committer | Joe Heck <heckj@mac.com> | 2012-03-31 05:20:08 +0000 |
commit | 9d0192777b4f61b15b3d76e4077162167278a567 (patch) | |
tree | 7d2f6e60b076f8b5a3544852d2a8469c0b06077f /keystone/middleware | |
parent | f9c787148747c75f739d9ca555fa26c541752344 (diff) | |
download | keystone-9d0192777b4f61b15b3d76e4077162167278a567.tar.gz keystone-9d0192777b4f61b15b3d76e4077162167278a567.tar.xz keystone-9d0192777b4f61b15b3d76e4077162167278a567.zip |
additional logging to support debugging auth issue
fixes bug 969801
Change-Id: Iaf752e5f3692c91030cfd8575114f2c3293d1dba
Diffstat (limited to 'keystone/middleware')
-rw-r--r-- | keystone/middleware/auth_token.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/keystone/middleware/auth_token.py b/keystone/middleware/auth_token.py index 6b8885b4..92c889d5 100644 --- a/keystone/middleware/auth_token.py +++ b/keystone/middleware/auth_token.py @@ -224,6 +224,7 @@ class AuthProtocol(object): if token: return token else: + LOG.warn("Unable to find authentication token in headers: %s", env) raise InvalidUserToken('Unable to find token in headers') def _reject_request(self, env, start_response): @@ -324,6 +325,7 @@ class AuthProtocol(object): assert token return token except (AssertionError, KeyError): + LOG.warn("Unexpected response from keystone service: %s", data) raise ServiceError('invalid json response') def _validate_user_token(self, user_token, retry=True): @@ -354,9 +356,10 @@ class AuthProtocol(object): # FIXME(ja): I'm assuming the 404 status means that user_token is # invalid - not that the admin_token is invalid self._cache_store_invalid(user_token) + LOG.warn("Authorization failed for token %s", user_token) raise InvalidUserToken('Token authorization failed') if response.status == 401: - LOG.info('Keystone rejected admin token, resetting') + LOG.info('Keystone rejected admin token %s, resetting', headers) self.admin_token = None else: LOG.error('Bad response code while validating token: %s' % @@ -365,6 +368,9 @@ class AuthProtocol(object): LOG.info('Retrying validation') return self._validate_user_token(user_token, False) else: + LOG.warn("Invalid user token: %s. Keystone response: %s.", + user_token, data) + raise InvalidUserToken() def _build_user_headers(self, token_info): |