From 0085d08baa129c3eae121a31a5c35cf7bd684aad Mon Sep 17 00:00:00 2001 From: "Brad P. Crochet" Date: Tue, 21 Aug 2018 10:01:47 -0400 Subject: [PATCH] Stop using deprecated keystone_authtoken/auth_uri keystone_authtoken/auth_uri is deprecated [1]. Use www_authenticate_uri instead. keystonemiddleware in requirements and lower constraints should be increased because www_authenticate_uri was introduced in keystonemiddleware 4.18.0. [1] https://review.openstack.org/#/c/508522/ Change-Id: I99b0ee941d702a28fb4f392d9747d0e2257a42c8 Closes-Bug: #1788174 --- devstack/plugin.sh | 2 +- doc/source/configuration/config-guide.rst | 2 +- doc/source/install/mistralclient_guide.rst | 2 +- lower-constraints.txt | 2 +- mistral/context.py | 2 +- mistral/utils/openstack/keystone.py | 8 ++++---- requirements.txt | 2 +- test-requirements.txt | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 0d7f641ab..cdae585f2 100755 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -78,7 +78,7 @@ function configure_mistral { # Setup keystone_authtoken section configure_auth_token_middleware $MISTRAL_CONF_FILE mistral $MISTRAL_AUTH_CACHE_DIR - iniset $MISTRAL_CONF_FILE keystone_authtoken auth_uri $KEYSTONE_AUTH_URI_V3 + iniset $MISTRAL_CONF_FILE keystone_authtoken www_authenticate_uri $KEYSTONE_AUTH_URI_V3 # Setup RabbitMQ credentials iniset_rpc_backend mistral $MISTRAL_CONF_FILE diff --git a/doc/source/configuration/config-guide.rst b/doc/source/configuration/config-guide.rst index d9f840b92..89be619fe 100644 --- a/doc/source/configuration/config-guide.rst +++ b/doc/source/configuration/config-guide.rst @@ -19,7 +19,7 @@ directory. auth properties:: [keystone_authtoken] - auth_uri = http://:5000/v3 + www_authenticate_uri = http://keystone1.example.com:5000/v3 identity_uri = http:// diff --git a/doc/source/install/mistralclient_guide.rst b/doc/source/install/mistralclient_guide.rst index b629a88dd..ead97315d 100644 --- a/doc/source/install/mistralclient_guide.rst +++ b/doc/source/install/mistralclient_guide.rst @@ -93,7 +93,7 @@ workflow on the `http://keystone2.example.com` cloud. The mistral.conf will look like:: [keystone_authtoken] - auth_uri = http://keystone1.example.com:5000/v3 + www_authenticate_uri = http://keystone1.example.com:5000/v3 ... The client side parameters will be:: diff --git a/lower-constraints.txt b/lower-constraints.txt index 30730cf07..388310163 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -43,7 +43,7 @@ jsonpointer==1.13 jsonschema==2.6.0 kazoo==2.2 keystoneauth1==3.4.0 -keystonemiddleware==4.17.0 +keystonemiddleware==4.18.0 kombu==4.0.0 linecache2==1.0.0 logutils==0.3.5 diff --git a/mistral/context.py b/mistral/context.py index cd28f1faa..567a8e582 100644 --- a/mistral/context.py +++ b/mistral/context.py @@ -167,7 +167,7 @@ def _extract_mistral_auth_params(headers): ) else: params = { - 'auth_uri': CONF.keystone_authtoken.auth_uri, + 'auth_uri': CONF.keystone_authtoken.www_authenticate_uri, 'auth_cacert': CONF.keystone_authtoken.cafile, 'insecure': False, 'region_name': headers.get('X-Region-Name'), diff --git a/mistral/utils/openstack/keystone.py b/mistral/utils/openstack/keystone.py index a61a22c8f..fc25a57e2 100644 --- a/mistral/utils/openstack/keystone.py +++ b/mistral/utils/openstack/keystone.py @@ -32,7 +32,7 @@ CONF = cfg.CONF def client(): ctx = context.ctx() - auth_url = ctx.auth_uri or CONF.keystone_authtoken.auth_uri + auth_url = ctx.auth_uri or CONF.keystone_authtoken.www_authenticate_uri cl = ks_client.Client( user_id=ctx.user_id, @@ -76,7 +76,7 @@ def get_session_and_auth(context, **kwargs): auth = Token(endpoint=endpoint, token=context.auth_token) - auth_uri = context.auth_uri or CONF.keystone_authtoken.auth_uri + auth_uri = context.auth_uri or CONF.keystone_authtoken.www_authenticate_uri ks_auth = Token( endpoint=auth_uri, token=context.auth_token @@ -94,7 +94,7 @@ def get_session_and_auth(context, **kwargs): def _admin_client(trust_id=None): if CONF.keystone_authtoken.auth_type is None: - auth_url = CONF.keystone_authtoken.auth_uri + auth_url = CONF.keystone_authtoken.www_authenticate_uri project_name = CONF.keystone_authtoken.admin_tenant_name # You can't use trust and project together @@ -271,7 +271,7 @@ def get_admin_session(): """Returns a keystone session from Mistral's service credentials.""" if CONF.keystone_authtoken.auth_type is None: auth = auth_plugins.Password( - CONF.keystone_authtoken.auth_uri, + CONF.keystone_authtoken.www_authenticate_uri, username=CONF.keystone_authtoken.admin_user, password=CONF.keystone_authtoken.admin_password, project_name=CONF.keystone_authtoken.admin_tenant_name, diff --git a/requirements.txt b/requirements.txt index ee6c20dfb..f21d2750f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ eventlet!=0.20.1,>=0.20.0 # MIT gnocchiclient>=3.3.1 # Apache-2.0 Jinja2>=2.10 # BSD License (3 clause) jsonschema<3.0.0,>=2.6.0 # MIT -keystonemiddleware>=4.17.0 # Apache-2.0 +keystonemiddleware>=4.18.0 # Apache-2.0 mistral-lib>=0.4.0 # Apache-2.0 networkx>=1.10 # BSD oslo.concurrency>=3.26.0 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index b8f5540f5..c2ce4d6c3 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0 croniter>=0.3.4 # MIT License doc8>=0.6.0 # Apache-2.0 fixtures>=3.0.0 # Apache-2.0/BSD -keystonemiddleware>=4.17.0 # Apache-2.0 +keystonemiddleware>=4.18.0 # Apache-2.0 mistral-lib>=0.4.0 # Apache-2.0 mock>=2.0.0 # BSD networkx>=1.10 # BSD