From 4f9c789628cccffa46e042daf3c19c78c3f89b78 Mon Sep 17 00:00:00 2001 From: Tom Scavo Date: Tue, 20 Dec 2016 13:17:52 -0500 Subject: [PATCH] Test for IdP entityID --- bin/probe_saml_idp.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bin/probe_saml_idp.sh b/bin/probe_saml_idp.sh index 53e0916..ce21f23 100755 --- a/bin/probe_saml_idp.sh +++ b/bin/probe_saml_idp.sh @@ -357,6 +357,12 @@ if [ "$exit_status" -ne 0 ]; then exit 3 fi +# short-circuit if this is not an IdP +if ! echo "$entityDescriptor" | $_GREP -Fq 'IDPSSODescriptor '; then + echo "ERROR: $script_name: entity is not an IdP: $entityID" >&2 + exit 3 +fi + # extract the registrar ID from the entity descriptor registrarID=$( echo "$entityDescriptor" \ | $_GREP -F -m 1 ' registrationAuthority=' \