summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFredrik Domeij <fredrik.domeij@umu.se>2020-10-13 15:41:14 +0200
committerFredrik Domeij <fredrik.domeij@umu.se>2020-10-13 15:41:14 +0200
commit8eb93ef9f27d560d2d0e41e04dc73ee8275b4ee6 (patch)
treea785941b7fd840c082d42ebce930320bf2d70532
parent40f968a07444eaf361baf892ee3ae9668c6a2de3 (diff)
warn on known missing CoCo links in PrivacyStatementURL, error on other CoCo failures
-rw-r--r--Makefile10
-rw-r--r--sp-with-coco-errors16
2 files changed, 23 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 97002e1b..823a0849 100644
--- a/Makefile
+++ b/Makefile
@@ -131,7 +131,11 @@ testRefedsRnS:
testGeantCoCo:
@echo "Checking for Geant CoCo compliance"
- @for x in `cat swamid-edugain-sp-1.0.mxml swamid-edugain-testing-1.0.mxml swamid-sp-2.0.mxml swamid-testing-sp-1.0.mxml | grep -v "\.mxml$$" | grep "xi:include" | awk -F\" '{print $$2}' | xargs grep -l SPSSODescriptor | sort` ; do \
+ @for x in `cat swamid-edugain-sp-1.0.mxml swamid-edugain-testing-1.0.mxml swamid-sp-2.0.mxml swamid-testing-sp-1.0.mxml | grep -v "\.mxml$$" | grep "xi:include" | awk -F\" '{print $$2}' | xargs grep -l SPSSODescriptor | sort -u` ; do \
+ if grep -qx "$$x" sp-with-coco-errors ; then \
+ echo " Known missing link to CoCo in PrivacyStatementURL: $$x" 1>&2 ; \
+ continue ; \
+ fi ; \
got_geant_CoCo=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/Extensions/EntityAttributes/Attribute[@Name='http://macedir.org/entity-category']/AttributeValue" - 2>/dev/null | grep 'http://www.geant.net/uri/dataprotection-code-of-conduct/v1'` ; \
if [ -n "$$got_geant_CoCo" ] ; then \
( \
@@ -161,9 +165,9 @@ testGeantCoCo:
fi ; \
requestedAttribute=`cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/SPSSODescriptor/AttributeConsumingService/RequestedAttribute" - 2>/dev/null | grep 'RequestedAttribute'` ; \
if [ -z "$$requestedAttribute" ] ; then echo " Missing RequestedAttribute"'' ; fi ; \
- ) | sed "1s;..*; [1\;31m$$x\n&;" | grep . && echo ; \
+ ) | sed "1s;..*; [1\;31m$$x\n&;" | grep . && echo " " ; \
fi ; \
- done
+ done | grep . && exit 1 || exit 0
testEduGAINchecks:
@echo "Checking for attributes not allowed in entities exported to eduGAIN"
diff --git a/sp-with-coco-errors b/sp-with-coco-errors
new file mode 100644
index 00000000..96333f34
--- /dev/null
+++ b/sp-with-coco-errors
@@ -0,0 +1,16 @@
+swamid-2.0/brandkeeper.se-wsfed.xml
+swamid-2.0/dev-us.cloudmore.com-shibboleth.xml
+swamid-2.0/dev.cloudmore.com-shibboleth.xml
+swamid-2.0/digkonto-test.ita.chalmers.se.xml
+swamid-2.0/indico.test.uu.se-shibboleth.xml
+swamid-2.0/ki.alma.exlibrisgroup.com-mng-login.xml
+swamid-2.0/ki.primo.exlibrisgroup.com-mng-login.xml
+swamid-2.0/local.cloudmore.com-shibboleth.xml
+swamid-2.0/myaccount.chalmers.se.xml
+swamid-2.0/permitwinstaging1.caleaccess.com.xml
+swamid-2.0/prestaging.cloudmore.com-shibboleth.xml
+swamid-2.0/staging-us.cloudmore.com-shibboleth.xml
+swamid-2.0/staging.cloudmore.com-shibboleth.xml
+swamid-2.0/us.cloudmore.com-shibboleth.xml
+swamid-2.0/uuc-web003-t.its.uu.se-shibboleth.xml
+swamid-2.0/www.itslearning.com-integrations-samlmetadata-saml2v2-extensions-2.xml