Merge "Configure auth_token middleware by auth plugin"
This commit is contained in:
commit
1631af891a
13
lib/heat
13
lib/heat
@ -115,7 +115,18 @@ function configure_heat {
|
|||||||
setup_colorized_logging $HEAT_CONF DEFAULT tenant user
|
setup_colorized_logging $HEAT_CONF DEFAULT tenant user
|
||||||
fi
|
fi
|
||||||
|
|
||||||
configure_auth_token_middleware $HEAT_CONF heat $HEAT_AUTH_CACHE_DIR
|
# NOTE(jamielennox): heat re-uses specific values from the
|
||||||
|
# keystone_authtoken middleware group and so currently fails when using the
|
||||||
|
# auth plugin setup. This should be fixed in heat. Heat is also the only
|
||||||
|
# service that requires the auth_uri to include a /v2.0. Remove this custom
|
||||||
|
# setup when bug #1300246 is resolved.
|
||||||
|
iniset $HEAT_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
|
||||||
|
iniset $HEAT_CONF keystone_authtoken auth_uri $KEYSTONE_SERVICE_URI/v2.0
|
||||||
|
iniset $HEAT_CONF keystone_authtoken admin_user heat
|
||||||
|
iniset $HEAT_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
|
||||||
|
iniset $HEAT_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
|
||||||
|
iniset $HEAT_CONF keystone_authtoken cafile $SSL_BUNDLE_FILE
|
||||||
|
iniset $HEAT_CONF keystone_authtoken signing_dir $HEAT_AUTH_CACHE_DIR
|
||||||
|
|
||||||
if is_ssl_enabled_service "key"; then
|
if is_ssl_enabled_service "key"; then
|
||||||
iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE
|
iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE
|
||||||
|
26
lib/keystone
26
lib/keystone
@ -415,15 +415,6 @@ function create_keystone_accounts {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure the API version for the OpenStack projects.
|
|
||||||
# configure_API_version conf_file version [section]
|
|
||||||
function configure_API_version {
|
|
||||||
local conf_file=$1
|
|
||||||
local api_version=$2
|
|
||||||
local section=${3:-keystone_authtoken}
|
|
||||||
iniset $conf_file $section auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v$api_version
|
|
||||||
}
|
|
||||||
|
|
||||||
# Configure the service to use the auth token middleware.
|
# Configure the service to use the auth token middleware.
|
||||||
#
|
#
|
||||||
# configure_auth_token_middleware conf_file admin_user signing_dir [section]
|
# configure_auth_token_middleware conf_file admin_user signing_dir [section]
|
||||||
@ -437,15 +428,16 @@ function configure_auth_token_middleware {
|
|||||||
local signing_dir=$3
|
local signing_dir=$3
|
||||||
local section=${4:-keystone_authtoken}
|
local section=${4:-keystone_authtoken}
|
||||||
|
|
||||||
iniset $conf_file $section auth_host $KEYSTONE_AUTH_HOST
|
iniset $conf_file $section auth_plugin password
|
||||||
iniset $conf_file $section auth_port $KEYSTONE_AUTH_PORT
|
iniset $conf_file $section auth_url $KEYSTONE_AUTH_URI
|
||||||
iniset $conf_file $section auth_protocol $KEYSTONE_AUTH_PROTOCOL
|
iniset $conf_file $section username $admin_user
|
||||||
iniset $conf_file $section identity_uri $KEYSTONE_AUTH_URI
|
iniset $conf_file $section password $SERVICE_PASSWORD
|
||||||
|
iniset $conf_file $section user_domain_id default
|
||||||
|
iniset $conf_file $section project_name $SERVICE_TENANT_NAME
|
||||||
|
iniset $conf_file $section project_domain_id default
|
||||||
|
|
||||||
|
iniset $conf_file $section auth_uri $KEYSTONE_SERVICE_URI
|
||||||
iniset $conf_file $section cafile $SSL_BUNDLE_FILE
|
iniset $conf_file $section cafile $SSL_BUNDLE_FILE
|
||||||
configure_API_version $conf_file $IDENTITY_API_VERSION $section
|
|
||||||
iniset $conf_file $section admin_tenant_name $SERVICE_TENANT_NAME
|
|
||||||
iniset $conf_file $section admin_user $admin_user
|
|
||||||
iniset $conf_file $section admin_password $SERVICE_PASSWORD
|
|
||||||
iniset $conf_file $section signing_dir $signing_dir
|
iniset $conf_file $section signing_dir $signing_dir
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user