Browse code

Merge "Configure auth_token middleware by auth plugin"

Jenkins authored on 2015/01/26 23:06:15
Showing 2 changed files
... ...
@@ -115,7 +115,18 @@ function configure_heat {
115 115
         setup_colorized_logging $HEAT_CONF DEFAULT tenant user
116 116
     fi
117 117
 
118
-    configure_auth_token_middleware $HEAT_CONF heat $HEAT_AUTH_CACHE_DIR
118
+    # NOTE(jamielennox): heat re-uses specific values from the
119
+    # keystone_authtoken middleware group and so currently fails when using the
120
+    # auth plugin setup. This should be fixed in heat.  Heat is also the only
121
+    # service that requires the auth_uri to include a /v2.0. Remove this custom
122
+    # setup when bug #1300246 is resolved.
123
+    iniset $HEAT_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
124
+    iniset $HEAT_CONF keystone_authtoken auth_uri $KEYSTONE_SERVICE_URI/v2.0
125
+    iniset $HEAT_CONF keystone_authtoken admin_user heat
126
+    iniset $HEAT_CONF keystone_authtoken admin_password $SERVICE_PASSWORD
127
+    iniset $HEAT_CONF keystone_authtoken admin_tenant_name $SERVICE_TENANT_NAME
128
+    iniset $HEAT_CONF keystone_authtoken cafile $SSL_BUNDLE_FILE
129
+    iniset $HEAT_CONF keystone_authtoken signing_dir $HEAT_AUTH_CACHE_DIR
119 130
 
120 131
     if is_ssl_enabled_service "key"; then
121 132
         iniset $HEAT_CONF clients_keystone ca_file $SSL_BUNDLE_FILE
... ...
@@ -415,15 +415,6 @@ function create_keystone_accounts {
415 415
     fi
416 416
 }
417 417
 
418
-# Configure the API version for the OpenStack projects.
419
-# configure_API_version conf_file version [section]
420
-function configure_API_version {
421
-    local conf_file=$1
422
-    local api_version=$2
423
-    local section=${3:-keystone_authtoken}
424
-    iniset $conf_file $section auth_uri $KEYSTONE_SERVICE_PROTOCOL://$KEYSTONE_SERVICE_HOST:$KEYSTONE_SERVICE_PORT/v$api_version
425
-}
426
-
427 418
 # Configure the service to use the auth token middleware.
428 419
 #
429 420
 # configure_auth_token_middleware conf_file admin_user signing_dir [section]
... ...
@@ -437,15 +428,16 @@ function configure_auth_token_middleware {
437 437
     local signing_dir=$3
438 438
     local section=${4:-keystone_authtoken}
439 439
 
440
-    iniset $conf_file $section auth_host $KEYSTONE_AUTH_HOST
441
-    iniset $conf_file $section auth_port $KEYSTONE_AUTH_PORT
442
-    iniset $conf_file $section auth_protocol $KEYSTONE_AUTH_PROTOCOL
443
-    iniset $conf_file $section identity_uri $KEYSTONE_AUTH_URI
440
+    iniset $conf_file $section auth_plugin password
441
+    iniset $conf_file $section auth_url $KEYSTONE_AUTH_URI
442
+    iniset $conf_file $section username $admin_user
443
+    iniset $conf_file $section password $SERVICE_PASSWORD
444
+    iniset $conf_file $section user_domain_id default
445
+    iniset $conf_file $section project_name $SERVICE_TENANT_NAME
446
+    iniset $conf_file $section project_domain_id default
447
+
448
+    iniset $conf_file $section auth_uri $KEYSTONE_SERVICE_URI
444 449
     iniset $conf_file $section cafile $SSL_BUNDLE_FILE
445
-    configure_API_version $conf_file $IDENTITY_API_VERSION $section
446
-    iniset $conf_file $section admin_tenant_name $SERVICE_TENANT_NAME
447
-    iniset $conf_file $section admin_user $admin_user
448
-    iniset $conf_file $section admin_password $SERVICE_PASSWORD
449 450
     iniset $conf_file $section signing_dir $signing_dir
450 451
 }
451 452