clean up service token

This commit is contained in:
Vishvananda Ishaya 2011-11-06 11:18:26 -08:00
parent 5f03932626
commit 9812ffb998
2 changed files with 7 additions and 10 deletions

View file

@ -124,4 +124,4 @@ auth_host = 127.0.0.1
auth_port = 35357
auth_protocol = http
auth_uri = http://127.0.0.1:5000/
admin_token = 999888777666
admin_token = %SERVICE_TOKEN%

View file

@ -562,15 +562,12 @@ fi
# ----
if [[ "$ENABLED_SERVICES" =~ "n-api" ]]; then
# We are going to use the sample http middleware configuration from the
# keystone project to launch nova. This paste config adds the configuration
# required for nova to validate keystone tokens - except we need to switch
# the config to use our service token instead (instead of the invalid token
# 999888777666).
if [ ! -e $NOVA_DIR/bin/nova-api-paste.ini ]; then
# We are going to use a sample http middleware configuration based on the
# one from the keystone project to launch nova. This paste config adds
# the configuration required for nova to validate keystone tokens. We add
# our own service token to the configuration.
cp $FILES/nova-api-paste.ini $NOVA_DIR/bin
sed -e "s,999888777666,$SERVICE_TOKEN,g" -i $NOVA_DIR/bin/nova-api-paste.ini
fi
sed -e "s,%SERVICE_TOKEN%,$SERVICE_TOKEN,g" -i $NOVA_DIR/bin/nova-api-paste.ini
fi
if [[ "$ENABLED_SERVICES" =~ "n-cpu" ]]; then