diff options
author | Björn Mattsson <bjorn@sunet.se> | 2024-05-06 18:57:15 +0200 |
---|---|---|
committer | Björn Mattsson <bjorn@sunet.se> | 2024-05-06 18:57:15 +0200 |
commit | c4b4a97c9db5ca7523f54f65918d6a28854c184f (patch) | |
tree | 01a478075009c4ac94844d99556826a599a7307e /metadata/Makefile | |
parent | b3bf5c7feddfe41a2e6d2c9727f56b261fd25c9d (diff) |
Added AL-check for IdP:s
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" |