From a4f25bb1ec39220471018733cdf64014fef9e000 Mon Sep 17 00:00:00 2001 From: Adam Young Date: Mon, 22 Jul 2013 10:56:07 -0400 Subject: [PATCH] Memcached revocation list hashed Id Although the Bug is reported against python-keystoneclient The proper fix is in server by modifying the form of the revocaion list. Bug 1202952 Change-Id: I24924bac6bc421f709f1ae77e2afd9991f598aa3 --- keystone/token/backends/memcache.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keystone/token/backends/memcache.py b/keystone/token/backends/memcache.py index 06e89d6006762394794d6702350016106b1e5d69..2d3d6426f4d891ca630e1520973d2acd86f802bc 100644 --- a/keystone/token/backends/memcache.py +++ b/keystone/token/backends/memcache.py @@ -163,8 +163,8 @@ class Token(token.Driver): error_msg = _('Unable to add token user list') raise exception.UnexpectedError(error_msg) - def _add_to_revocation_list(self, data): - data_json = jsonutils.dumps(data) + def _add_to_revocation_list(self, token_id): + data_json = jsonutils.dumps({"id": token_id}) if not self.client.append(self.revocation_key, ',%s' % data_json): if not self.client.add(self.revocation_key, data_json): if not self.client.append(self.revocation_key, @@ -174,10 +174,10 @@ class Token(token.Driver): def delete_token(self, token_id): # Test for existence - data = self.get_token(token_id) + self.get_token(token_id) ptk = self._prefix_token_id(token_id) result = self.client.delete(ptk) - self._add_to_revocation_list(data) + self._add_to_revocation_list(token_id) return result def list_tokens(self, user_id, tenant_id=None, trust_id=None): -- 1.8.1.4