summaryrefslogtreecommitdiffstats
path: root/keystone
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2012-10-30 20:22:24 -0400
committerAdam Young <ayoung@redhat.com>2012-11-01 14:10:28 -0400
commit75496bbe6940e72fd42dcaacbfc92b6cf92b1149 (patch)
treed12450ea11671065bc742b75c25a78d6dc7282b6 /keystone
parent23aa49ee3d5d71c0cca25c7e16fb5fc7771d5c02 (diff)
auth_token hash pki
key PKI tokens on hash in memcached when accessed by auth_token middelware Bug 1073343 Change-Id: I32e5481f82fd110c855d7e1138c3d43c73099bbb
Diffstat (limited to 'keystone')
-rw-r--r--keystone/middleware/auth_token.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/keystone/middleware/auth_token.py b/keystone/middleware/auth_token.py
index 5c198e83..e8ed99b3 100644
--- a/keystone/middleware/auth_token.py
+++ b/keystone/middleware/auth_token.py
@@ -472,7 +472,8 @@ class AuthProtocol(object):
"""
try:
- cached = self._cache_get(user_token)
+ token_id = cms.cms_hash_token(user_token)
+ cached = self._cache_get(token_id)
if cached:
return cached
if cms.is_ans1_token(user_token):
@@ -480,7 +481,7 @@ class AuthProtocol(object):
data = json.loads(verified)
else:
data = self.verify_uuid_token(user_token, retry)
- self._cache_put(user_token, data)
+ self._cache_put(token_id, data)
return data
except Exception as e:
LOG.debug('Token validation failure.', exc_info=True)