diff options
-rw-r--r-- | metadata/acceptedSPs | 14 | ||||
-rwxr-xr-x | metadata/scripts/pull-and-verify.sh | 14 |
2 files changed, 28 insertions, 0 deletions
diff --git a/metadata/acceptedSPs b/metadata/acceptedSPs new file mode 100644 index 0000000..4c7b6ea --- /dev/null +++ b/metadata/acceptedSPs @@ -0,0 +1,14 @@ +https://fidustest.skolverket.se/shibboleth +https://sso.skolverket.sonet.com.au/module.php/saml/sp/metadata.php/sp1 +https://sso.am.uat.skolverket.sonet.com.au/module.php/saml/sp/metadata.php/sp1 +https://am-sso-int.skol.sonet.net.au/module.php/saml/sp/metadata.php/sp1 +https://am-sso-utb.skol.sonet.net.au/module.php/saml/sp/metadata.php/sp1 +https://am-sso.skol.sonet.net.au/module.php/saml/sp/metadata.php/sp1 +https://am-sso-uat.skol.sonet.net.au/module.php/saml/sp/metadata.php/sp1 +https://humhub-idp-proxy.sunet.se/sp +https://idpproxy.dev.eduid.se/sp +https://vfu-test.su.se/Shibboleth.sso +https://vfusyd-test.su.se/Shibboleth.sso +https://betyg.test.uhr.se/beda-inrapportering +https://betyg.uhr.se/beda-inrapportering +https://otc-skol-uat-sso.am.rm.com/module.php/saml/sp/metadata.php/sp1 diff --git a/metadata/scripts/pull-and-verify.sh b/metadata/scripts/pull-and-verify.sh index 1e89d0f..f1b11b2 100755 --- a/metadata/scripts/pull-and-verify.sh +++ b/metadata/scripts/pull-and-verify.sh @@ -23,5 +23,19 @@ if [ $? -ne 0 ]; then echo "Unable to import metadata from $URL: $?" exit 1 fi +for md in $TMPD/*.xml; do + if (grep -q 'xs:string' $md); then + echo "cleaning $md" + sed 's/ xsi:type="xs:string"//' $md > $md.c && mv $md.c $md + fi + if (! (grep -q 'IDPSSODescriptor ' $md)); then + # Check if SP is OK else remove + SP=$(grep "entityID=" $md | sed 's/.*entityID="\(.*[a-zA-Z0-9/]\)".*/\1/') + if (! grep -q "^$SP\$" acceptedSPs); then + rm $md + fi + + fi +done rsync -avz $TMPD/ $DIR rm -rf $TMPF $TMPD |