From 4155e61cecfa2af094e4eb857e3eb6fa6016f39d Mon Sep 17 00:00:00 2001 From: Kristi Nikolla Date: Fri, 16 Feb 2018 17:07:03 -0500 Subject: [PATCH] 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 --- devstack/lib/federation.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/devstack/lib/federation.sh b/devstack/lib/federation.sh index de47e1f9fd..b93e259f44 100644 --- a/devstack/lib/federation.sh +++ b/devstack/lib/federation.sh @@ -74,7 +74,7 @@ function install_federation { fi } -function upload_sp_metadata { +function upload_sp_metadata_to_testshib { local metadata_fname=${HOST_IP//./}_"$RANDOM"_sp local metadata_url=http://$HOST_IP/Shibboleth.sso/Metadata @@ -113,8 +113,11 @@ function configure_federation { restart_service "devstack@keystone" fi - # Register the service provider - upload_sp_metadata + # TODO(knikolla): We should not be relying on an external service. This + # 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 {