From 97c0df9e991602f5020c321f87164278af23022a Mon Sep 17 00:00:00 2001 From: Björn Mattsson Date: Wed, 15 Nov 2017 13:15:20 +0100 Subject: Addes some more checks in Makefile. And fixed probles found by those checks. --- Makefile | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 0c0243eb..2b3e6887 100644 --- a/Makefile +++ b/Makefile @@ -183,13 +183,23 @@ testOrgData: testEntCat: @echo "Checking for entity-categories in SPSSODescriptors that should be moved to EntityDescriptor/Extensions" - @for x in `find $(SRCDIRS) -name \*.xml`; do if cat $$x | sed 's;\(/dev/null | grep -q entity-category ; then echo " $$x" | sed 's/.*/&/' ; fi ; done + @for x in `find $(SRCDIRS) -name \*.xml`; do if cat $$x | sed 's;\(/dev/null | grep -q entity-category ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true @echo "Checking for entity-categories in IDPSSODescriptor that should be moved to EntityDescriptor/Extensions" - @for x in `find $(SRCDIRS) -name \*.xml`; do if cat $$x | sed 's;\(/dev/null | grep -q entity-category ; then echo " $$x" | sed 's/.*/&/' ; fi ; done + @for x in `find $(SRCDIRS) -name \*.xml`; do if cat $$x | sed 's;\(/dev/null | grep -q entity-category ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true @echo "Checking for MDUI in EntityDescriptor/Extensions" - @for x in `find $(SRCDIRS) -name \*.xml`; do if cat $$x | sed 's;\(/dev/null | grep -q . ; then echo " $$x" | sed 's/.*/&/' ; exit 1 ; fi ; done + @for x in `find $(SRCDIRS) -name \*.xml`; do if cat $$x | sed 's;\(/dev/null | grep -q . ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true @echo "Checking for entitycategories for IdPs that should be entity-category-support" - @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l IDPSSODescriptor` ; do if cat $$x | sed 's;\(/dev/null | grep -q http://refeds.org/category/research-and-scholarship ; then echo " $$x" | sed 's/.*/&/' ; fi ; done + @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l IDPSSODescriptor` ; do if cat $$x | sed 's;\(/dev/null | grep -q http://refeds.org/category/research-and-scholarship ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true + @echo "Checking for wrong Name in EntityAttributes/Attribute" + @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l "Attribute "` ; do if cat $$x | sed 's;\(/dev/null | grep "Attribute " | sed 's/.* Name="//' | sed -e 's/ NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"//' -e 's/">//' | egrep -v "http://macedir.org/entity-category|http://macedir.org/entity-category-support|urn:oasis:names:tc:SAML:attribute:assurance-certification|http://www.swamid.se/assurance-requirement" ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true + @echo "Checking for wrong AttributeValue in EntityAttributes/Attribute http://macedir.org/entity-category" + @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l "http://macedir.org/entity-category"` ; do if cat $$x | sed 's;\(/dev/null | grep "AttributeValue" | egrep -v ">http://refeds.org/category/research-and-scholarship<|>http://www.geant.net/uri/dataprotection-code-of-conduct/v1<|>http://www.swamid.se/category/research-and-education<|>http://www.swamid.se/category/hei-service<|>http://www.swamid.se/category/nren-service<|>http://www.swamid.se/category/sfs-1993-1153<|>http://www.swamid.se/category/eu-adequate-protection<|>http://refeds.org/category/hide-from-discovery<" ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true + @echo "Checking for wrong AttributeValue in EntityAttributes/Attribute http://macedir.org/entity-category-support" + @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l "http://macedir.org/entity-category-support"` ; do if cat $$x | sed 's;\(/dev/null | grep "AttributeValue" | egrep -v ">http://refeds.org/category/research-and-scholarship<|>http://www.geant.net/uri/dataprotection-code-of-conduct/v1<" ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true + @echo "Checking for wrong AttributeValue in EntityAttributes/Attribute http://www.swamid.se/assurance-requirement" + @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l "http://www.swamid.se/assurance-requirement"` ; do if cat $$x | sed 's;\(/dev/null | grep "AttributeValue" | egrep -v ">http://www.swamid.se/policy/assurance/al1<|>http://www.swamid.se/policy/assurance/al2<" ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true + @echo "Checking for wrong AttributeValue in EntityAttributes/Attribute urn:oasis:names:tc:SAML:attribute:assurance-certification" + @for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l "urn:oasis:names:tc:SAML:attribute:assurance-certification"` ; do if cat $$x | sed 's;\(/dev/null | grep "AttributeValue" | egrep -v ">https://refeds.org/sirtfi<|>http://www.swamid.se/policy/assurance/al1<|>http://www.swamid.se/policy/assurance/al2<" ; then echo " $$x" | sed 's/.*/&/' ; fi ; done | grep . && exit 1 || true testSimpleSign: @echo "Check for new SP:s with SimpleSign (breaks ADFS IdP:s with Shib SP 2.5+)" -- cgit v1.2.3