diff options
author | Björn Mattsson <bjorn@sunet.se> | 2023-07-26 17:13:05 +0200 |
---|---|---|
committer | Björn Mattsson <bjorn@sunet.se> | 2023-07-26 17:13:05 +0200 |
commit | a71115b7410bf8df127fafff27a59f52a12b8b8e (patch) | |
tree | 8690fc6591993fe94ca7901cbbdc856aa99cfacd | |
parent | 5053487b80e7fe1c1ddf5911cf91460f1d91a956 (diff) |
Remove all SP:s not allowed in feedfidus-metadata-2023-07-26-v05
-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 |