diff options
Diffstat (limited to 'metadata/Makefile')
-rw-r--r-- | metadata/Makefile | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/metadata/Makefile b/metadata/Makefile index 06e2eae7..a8affdfc 100644 --- a/metadata/Makefile +++ b/metadata/Makefile @@ -45,11 +45,21 @@ testMDUI: @for lang in `find $(SRCDIRS) -name \*.xml -exec cat {} \; | sed -n 's/.*xml:lang="\([^"]*\)".*/\1/p' | sort -u` ; do for x in `find $(SRCDIRS) -name \*.xml | xargs grep -l IDPSSODescriptor` ; do cat $$x | sed 's;\(</*\)[a-z0-9]*:;\1;g' | sed 's/xmlns="[^"]*"//' | xmllint --xpath "/EntityDescriptor/IDPSSODescriptor/Extensions/UIInfo/DisplayName[@xml:lang='$$lang']" - 2>/dev/null | sed 's/^[ ]*//;s/[ ]*$$//' | tr -d '\n' | sed 's;<[^>]*>\([^<]*\)</[^>]*>;\1\n;g' | sed "s;^; $$x $$lang ;" | sed 's/.*/[1;31m&[0m/' ; done | sort -k 3 | uniq -d -f 2 ; done | grep . && exit 1 || true testALlevel: + @echo "Check for IdP:s with AL3" + @for x in `grep -rl http://www.swamid.se/policy/assurance/al3 $(SRCDIRS)`; do \ + if ! grep -q http://www.swamid.se/policy/assurance/al2 $$x ; then echo " [1;31m$$x missing AL2 in assurance-certification[0m" ; fi ; \ + if [ ! "$$(awk '$$1 > 2 && $$2 == "'$$x'" {print $$2}' MaxALofIDP.txt)" == "$$x" ]; then echo " [1;31m$$x missing in MaxALofIDP.txt verify with SWAMID-Policy and update efter that![0m" ; fi ; \ + done + @echo "Check for IdP:s with AL2" + @for x in `grep -rl http://www.swamid.se/policy/assurance/al2 $(SRCDIRS)`; do \ + if ! grep -q http://www.swamid.se/policy/assurance/al1 $$x ; then echo " [1;31m$$x missing AL1 in assurance-certification[0m" ; fi ; \ + if [ ! "$$(awk '$$1 > 1 && $$2 == "'$$x'" {print $$2}' MaxALofIDP.txt)" == "$$x" ]; then echo " [1;31m$$x missing in MaxALofIDP.txt verify with SWAMID-Policy and update efter that![0m" ; fi ; \ + done + @echo "Check for IdP:s with AL1" + @for x in `grep -rl http://www.swamid.se/policy/assurance/al1 $(SRCDIRS)`; do \ + if [ ! "$$(awk '$$1 > 0 && $$2 == "'$$x'" {print $$2}' MaxALofIDP.txt)" == "$$x" ]; then echo " [1;31m$$x missing in MaxALofIDP.txt verify with SWAMID-Policy and update efter that![0m" ; fi ; \ + done @echo Fixa så att vi kollar!!!!! - @echo "Check for IdP:s with AL3 without AL2" - @for x in `find $(SRCDIRS) -name \*.xml`; do if grep -q http://www.swamid.se/policy/assurance/al3 $$x && ! grep -q http://www.swamid.se/policy/assurance/al2 $$x ; then echo " $$x" | sed 's/.*/[1;31m&[0m/' ; fi ; done - @echo "Check for IdP:s with AL2 without AL1" - @for x in `find $(SRCDIRS) -name \*.xml`; do if grep -q http://www.swamid.se/policy/assurance/al2 $$x && ! grep -q http://www.swamid.se/policy/assurance/al1 $$x ; then echo " $$x" | sed 's/.*/[1;31m&[0m/' ; fi ; done testBadStrings: @echo "Check for bad strings in metadata" |