Add support for www_authentication_uri
We do currently not support www_authentication_uri at all, which is the new standard, as auth_uri has long been deprecated. * Make sure we support both auth_uri and www_authenticate_uri. * Switched to www_authenticate_uri for devstack. * Fixed a bug where a bad exception would be thrown if auth_uri was not set. Story: 2004271 Task: 27819 Change-Id: Ibc932d35f3d6ba2ac7ffb6193aa37bd4a3d4422e
This commit is contained in:
parent
83fa9d1b4e
commit
718cb9c9b4
@ -160,7 +160,7 @@ function create_magnum_conf {
|
|||||||
configure_auth_token_middleware $MAGNUM_CONF magnum $MAGNUM_AUTH_CACHE_DIR
|
configure_auth_token_middleware $MAGNUM_CONF magnum $MAGNUM_AUTH_CACHE_DIR
|
||||||
|
|
||||||
iniset $MAGNUM_CONF keystone_auth auth_url $KEYSTONE_AUTH_URI_V3
|
iniset $MAGNUM_CONF keystone_auth auth_url $KEYSTONE_AUTH_URI_V3
|
||||||
iniset $MAGNUM_CONF keystone_authtoken auth_uri $KEYSTONE_SERVICE_URI_V3
|
iniset $MAGNUM_CONF keystone_authtoken www_authenticate_uri $KEYSTONE_SERVICE_URI_V3
|
||||||
iniset $MAGNUM_CONF keystone_authtoken auth_url $KEYSTONE_AUTH_URI_V3
|
iniset $MAGNUM_CONF keystone_authtoken auth_url $KEYSTONE_AUTH_URI_V3
|
||||||
iniset $MAGNUM_CONF keystone_authtoken auth_version v3
|
iniset $MAGNUM_CONF keystone_authtoken auth_version v3
|
||||||
|
|
||||||
|
@ -44,7 +44,12 @@ class KeystoneClientV3(object):
|
|||||||
def auth_url(self):
|
def auth_url(self):
|
||||||
# FIXME(pauloewerton): auth_url should be retrieved from keystone_auth
|
# FIXME(pauloewerton): auth_url should be retrieved from keystone_auth
|
||||||
# section by default
|
# section by default
|
||||||
return CONF[ksconf.CFG_LEGACY_GROUP].auth_uri.replace('v2.0', 'v3')
|
conf = CONF[ksconf.CFG_LEGACY_GROUP]
|
||||||
|
auth_uri = (getattr(conf, 'www_authenticate_uri', None) or
|
||||||
|
getattr(conf, 'auth_uri', None))
|
||||||
|
if auth_uri:
|
||||||
|
auth_uri = auth_uri.replace('v2.0', 'v3')
|
||||||
|
return auth_uri
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def auth_token(self):
|
def auth_token(self):
|
||||||
|
@ -68,7 +68,7 @@ function create_test_data {
|
|||||||
local magnum_api_ip=$(iniget /etc/magnum/magnum.conf api host)
|
local magnum_api_ip=$(iniget /etc/magnum/magnum.conf api host)
|
||||||
local magnum_api_port=$(iniget /etc/magnum/magnum.conf api port)
|
local magnum_api_port=$(iniget /etc/magnum/magnum.conf api port)
|
||||||
local magnum_url="http://"$magnum_api_ip":"$magnum_api_port"/v1"
|
local magnum_url="http://"$magnum_api_ip":"$magnum_api_port"/v1"
|
||||||
local keystone_auth_url=$(iniget /etc/magnum/magnum.conf keystone_authtoken auth_uri)
|
local keystone_auth_url=$(iniget /etc/magnum/magnum.conf keystone_authtoken www_authenticate_uri)
|
||||||
|
|
||||||
# pass the appropriate variables via a config file
|
# pass the appropriate variables via a config file
|
||||||
CREDS_FILE=$MAGNUM_DIR/functional_creds.conf
|
CREDS_FILE=$MAGNUM_DIR/functional_creds.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user