Only upload SP metadata to testshib.org if IDP id is testshib

The upload_sp_metadata function is testshib specific and should
only be called when the identity provider is testshib.

Change-Id: I0dac596a51197417a3ceb8b2e1f4db5db108e84f
This commit is contained in:
Kristi Nikolla 2018-02-16 17:07:03 -05:00 committed by Kristi Nikolla
parent db91bfc8c8
commit 4155e61cec

View File

@ -74,7 +74,7 @@ function install_federation {
fi fi
} }
function upload_sp_metadata { function upload_sp_metadata_to_testshib {
local metadata_fname=${HOST_IP//./}_"$RANDOM"_sp local metadata_fname=${HOST_IP//./}_"$RANDOM"_sp
local metadata_url=http://$HOST_IP/Shibboleth.sso/Metadata local metadata_url=http://$HOST_IP/Shibboleth.sso/Metadata
@ -113,8 +113,11 @@ function configure_federation {
restart_service "devstack@keystone" restart_service "devstack@keystone"
fi fi
# Register the service provider # TODO(knikolla): We should not be relying on an external service. This
upload_sp_metadata # will be removed once we have an idp deployed during devstack install.
if [[ "$IDP_ID" == "testshib" ]]; then
upload_sp_metadata_to_testshib
fi
} }
function register_federation { function register_federation {