From feeed2f715c3a882973d8e3a39415c09c282ffe6 Mon Sep 17 00:00:00 2001 From: Alan Meadows Date: Tue, 6 Feb 2018 17:12:51 -0800 Subject: [PATCH] Resolves liberal building of keystone auth parameters that end up pulling in default configuration options from the keystone_authtoken sectiont hat are not supported by v3.Password This change strictly leverages the load_auth_from_conf_options to only pass through options that are supported from the configuration file Change-Id: I2e90ed0f28cdd1d9553c852f5b3b774d82048375 --- deckhand/barbican/client_wrapper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deckhand/barbican/client_wrapper.py b/deckhand/barbican/client_wrapper.py index c8df3db4..db88475f 100644 --- a/deckhand/barbican/client_wrapper.py +++ b/deckhand/barbican/client_wrapper.py @@ -12,8 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -from keystoneauth1.identity import v3 +from keystoneauth1 import loading from keystoneauth1 import session + from oslo_log import log as logging from deckhand.conf import config @@ -48,8 +49,7 @@ class BarbicanClientWrapper(object): # endpoint URL automatically. barbican_url = CONF.barbican.api_endpoint - keystone_auth = dict(CONF.keystone_authtoken) - auth = v3.Password(**keystone_auth) + auth = loading.load_auth_from_conf_options(CONF, 'keystone_authtoken') sess = session.Session(auth=auth) try: