Merge "Update auth_uri option to www_authenticate_uri"
This commit is contained in:
commit
54b242fe71
|
@ -201,7 +201,7 @@ function configure_murano {
|
|||
|
||||
# Setup murano_auth section
|
||||
configure_auth_token_middleware $MURANO_CONF_FILE $MURANO_ADMIN_USER $MURANO_AUTH_CACHE_DIR murano_auth
|
||||
iniset $MURANO_CONF_FILE murano_auth auth_uri $KEYSTONE_AUTH_URI
|
||||
iniset $MURANO_CONF_FILE murano_auth www_authenticate_uri $KEYSTONE_AUTH_URI
|
||||
|
||||
configure_murano_rpc_backend
|
||||
|
||||
|
|
|
@ -118,7 +118,7 @@ Install the API service and engine
|
|||
...
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_uri = 'http://%OPENSTACK_HOST_IP%:5000'
|
||||
www_authenticate_uri = 'http://%OPENSTACK_HOST_IP%:5000'
|
||||
auth_host = '%OPENSTACK_HOST_IP%'
|
||||
auth_port = 5000
|
||||
auth_protocol = http
|
||||
|
|
|
@ -69,7 +69,7 @@ broker in a few simple steps:
|
|||
...
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_uri = 'http://%OPENSTACK_HOST_IP%:5000/v3'
|
||||
www_authenticate_uri = 'http://%OPENSTACK_HOST_IP%:5000/v3'
|
||||
auth_host = '%OPENSTACK_HOST_IP%'
|
||||
auth_port = 5000
|
||||
auth_protocol = http
|
||||
|
|
|
@ -115,7 +115,7 @@ Install the API service and Engine
|
|||
...
|
||||
|
||||
[keystone_authtoken]
|
||||
auth_uri = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
|
||||
www_authenticate_uri = 'http://%OPENSTACK_HOST_IP%:5000/v2.0'
|
||||
auth_host = '%OPENSTACK_HOST_IP%'
|
||||
auth_port = 5000
|
||||
auth_protocol = http
|
||||
|
|
|
@ -165,7 +165,7 @@ class MuranoTestRunner(object):
|
|||
|
||||
def _validate_keystone_opts(self, args):
|
||||
ks_opts_to_config = {
|
||||
'auth_url': 'auth_uri',
|
||||
'auth_url': 'www_authenticate_uri',
|
||||
'username': 'admin_user',
|
||||
'password': 'admin_password',
|
||||
'project_name': 'admin_project_name'}
|
||||
|
|
|
@ -65,13 +65,15 @@ def get_client_session(execution_session=None, conf=None):
|
|||
|
||||
|
||||
def get_token_client_session(token=None, project_id=None, conf=None):
|
||||
auth_uri = cfg.CONF[CFG_MURANO_AUTH_GROUP].auth_uri
|
||||
if not auth_uri:
|
||||
www_authenticate_uri = \
|
||||
cfg.CONF[CFG_MURANO_AUTH_GROUP].www_authenticate_uri
|
||||
if not www_authenticate_uri:
|
||||
versionutils.report_deprecated_feature(
|
||||
LOG, 'Please configure auth_uri in ' + CFG_MURANO_AUTH_GROUP +
|
||||
' group')
|
||||
auth_uri = cfg.CONF[CFG_KEYSTONE_GROUP].auth_uri
|
||||
auth_url = auth_uri.replace('v2.0', 'v3')
|
||||
LOG, 'Please configure www_authenticate_uri in ' +
|
||||
CFG_MURANO_AUTH_GROUP + 'group')
|
||||
www_authenticate_uri = \
|
||||
cfg.CONF[CFG_KEYSTONE_GROUP].www_authenticate_uri
|
||||
auth_url = www_authenticate_uri.replace('v2.0', 'v3')
|
||||
if token is None or project_id is None:
|
||||
execution_session = helpers.get_execution_session()
|
||||
token = execution_session.token
|
||||
|
|
|
@ -263,7 +263,7 @@ home_region = cfg.StrOpt(
|
|||
# Unfortuntely we cannot use murano_auth.auth_url, since it
|
||||
# is private to the actual authentication plugin used.
|
||||
murano_auth_opts = [
|
||||
cfg.StrOpt('auth_uri',
|
||||
cfg.StrOpt('www_authenticate_uri',
|
||||
help='Identity API endpoint for authenticating with tokens.')]
|
||||
|
||||
|
||||
|
|
|
@ -48,8 +48,8 @@ class TestAuthUtils(base.MuranoTestCase):
|
|||
cfg.CONF.set_override('auth_type',
|
||||
'password',
|
||||
auth_utils.CFG_MURANO_AUTH_GROUP)
|
||||
cfg.CONF.set_override('auth_uri',
|
||||
'foo_auth_uri',
|
||||
cfg.CONF.set_override('www_authenticate_uri',
|
||||
'foo_www_authenticate_uri',
|
||||
auth_utils.CFG_MURANO_AUTH_GROUP)
|
||||
cfg.CONF.set_override('auth_url',
|
||||
'foo_auth_url',
|
||||
|
@ -158,8 +158,8 @@ class TestAuthUtils(base.MuranoTestCase):
|
|||
def test_get_token_client_session(
|
||||
self, mock_get_execution_session, mock_identity,
|
||||
mock_get_session):
|
||||
cfg.CONF.set_override('auth_uri',
|
||||
'foo_auth_uri/v2.0',
|
||||
cfg.CONF.set_override('www_authenticate_uri',
|
||||
'foo_www_authenticate_uri/v2.0',
|
||||
auth_utils.CFG_MURANO_AUTH_GROUP)
|
||||
|
||||
mock_get_execution_session.return_value = \
|
||||
|
@ -173,7 +173,7 @@ class TestAuthUtils(base.MuranoTestCase):
|
|||
|
||||
mock_get_execution_session.assert_called_once_with()
|
||||
mock_identity.Token.assert_called_once_with(
|
||||
'foo_auth_uri/v3', token=mock.sentinel.token,
|
||||
'foo_www_authenticate_uri/v3', token=mock.sentinel.token,
|
||||
project_id=mock.sentinel.project_id)
|
||||
mock_get_session.assert_called_once_with(
|
||||
auth=mock.sentinel.auth,
|
||||
|
|
Loading…
Reference in New Issue