summaryrefslogtreecommitdiff
path: root/keystonemiddleware/s3_token.py
diff options
context:
space:
mode:
authorColleen Murphy <colleen@gazlene.net>2017-09-29 16:16:29 +0200
committerColleen Murphy <colleen.murphy@suse.com>2017-10-11 14:00:49 +0200
commit409b482253dec248ed828e92e52b09d4c02e51dd (patch)
tree928f25bae37d42a10b4cf9a2a9ccfab60ff9da2f /keystonemiddleware/s3_token.py
parent04735348de7e81e8190849fd676b04377a2a4e8c (diff)
downloadkeystonemiddleware-409b482253dec248ed828e92e52b09d4c02e51dd.tar.gz
Rename auth_uri to www_authenticate_uri
The [keystone_authtoken]/auth_uri middleware parameter has been causing extreme confusion amongst operators and developers ever since the keystonemiddleware started accepting keystoneauth plugin parameters including auth_url. The two parameters look identical and yet have completely different meanings and are both required. This patch deprecates auth_uri and renames it to www_authenticate_uri, which more accurately describes the WWW-Authenticate header it is configuring and is dissimilar to any other keystone_authtoken middleware parameter. This also renames the internal variable names for consistency with the config option. Change-Id: I0cf11da3d395749df28077427689fdafc8a6b981
Diffstat (limited to 'keystonemiddleware/s3_token.py')
-rw-r--r--keystonemiddleware/s3_token.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/keystonemiddleware/s3_token.py b/keystonemiddleware/s3_token.py
index be44473..d8d8e78 100644
--- a/keystonemiddleware/s3_token.py
+++ b/keystonemiddleware/s3_token.py
@@ -57,13 +57,20 @@ class S3Token(object):
self._reseller_prefix = conf.get('reseller_prefix', 'AUTH_')
# where to find the auth service (we use this to validate tokens)
- self._request_uri = conf.get('auth_uri')
+ self._request_uri = conf.get('www_authenticate_uri')
+ auth_uri = conf.get('auth_uri')
+ if not self._request_uri and auth_uri:
+ self._logger.warning(
+ "Use of the auth_uri option was deprecated "
+ "in the Queens release in favor of www_authenticate_uri. This "
+ "option will be removed in the S release.")
+ self._request_uri = auth_uri
if not self._request_uri:
self._logger.warning(
"Use of the auth_host, auth_port, and auth_protocol "
"configuration options was deprecated in the Newton release "
- "in favor of auth_uri. These options may be removed in a "
- "future release.")
+ "in favor of www_authenticate_uri. These options will be "
+ "removed in the S release.")
auth_host = conf.get('auth_host')
auth_port = int(conf.get('auth_port', 35357))
auth_protocol = conf.get('auth_protocol', 'https')