From 3f51d2addd38c418a55c01ca2f37e8bbe94319b5 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Wed, 26 Jun 2013 18:09:13 -0700 Subject: Deprecate kvs token backend This backend is not usable in any production environment. All OpenStack environments will already have a SQL DB, and if someone does not want to use the DB they can use the memcache backend. Fixes bug 1188301 and bug 1188370 DocImpact This backend should not be mentioned in documentation, as it is not production grade and is deprecated. Change-Id: I41b147bcc70b79b4fc6df50b242a73cfcad33114 --- doc/source/configuration.rst | 2 +- keystone/token/backends/kvs.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst index c13da952..1c339490 100644 --- a/doc/source/configuration.rst +++ b/doc/source/configuration.rst @@ -492,7 +492,7 @@ Each user can then change their own password with a HTTP PATCH :: -H "X_Auth_Token: " -d '{"user": {"password": "ABCD", "original_password": "DCBA"}}' In addition to changing their password all of the users current tokens will be -deleted (if the backend used is kvs or sql) +deleted (if the backend used is sql) Inherited Role Assignment Extension diff --git a/keystone/token/backends/kvs.py b/keystone/token/backends/kvs.py index 0927aba1..c3c3e769 100644 --- a/keystone/token/backends/kvs.py +++ b/keystone/token/backends/kvs.py @@ -17,12 +17,26 @@ import copy from keystone.common import kvs +from keystone.common import logging from keystone import exception from keystone.openstack.common import timeutils from keystone import token +LOG = logging.getLogger(__name__) + class Token(kvs.Base, token.Driver): + """kvs backend for tokens is deprecated. + + Deprecated in Havana and will be removed in Icehouse, as this backend + is not production grade. + """ + + def __init__(self, *args, **kw): + super(Token, self).__init__(*args, **kw) + LOG.warn(_("kvs token backend is DEPRECATED. Use " + "keystone.token.backends.sql or " + "keystone.token.backend.memcache instead.")) # Public interface def get_token(self, token_id): -- cgit