From b1996170fb0880ef643722ba137dad0cf31f27aa Mon Sep 17 00:00:00 2001 From: Alex Stuart Date: Mon, 30 Nov 2020 14:53:33 +0000 Subject: [PATCH] Add UK-specific check for IdPs suppporting REFEDS R&S entity category Similar to the check for SPs, we ensure that any IdP that supports the category will have a valid MDRPS in metadata. See ukf/ukf-meta#281 for details --- mdx/uk/check_uk_rands.xsl | 23 ++++++++++++++++++- tests/manual/ukf-meta-281/README.md | 9 ++++++++ .../manual/ukf-meta-281/has-ec-has-policy.xml | 18 +++++++++++++++ .../manual/ukf-meta-281/has-ec-no-policy.xml | 16 +++++++++++++ .../manual/ukf-meta-281/no-ec-has-policy.xml | 13 +++++++++++ tests/manual/ukf-meta-281/no-ec-no-policy.xml | 5 ++++ .../ukf-meta-281/sirtfi-ec-no-policy.xml | 18 +++++++++++++++ 7 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 tests/manual/ukf-meta-281/README.md create mode 100644 tests/manual/ukf-meta-281/has-ec-has-policy.xml create mode 100644 tests/manual/ukf-meta-281/has-ec-no-policy.xml create mode 100644 tests/manual/ukf-meta-281/no-ec-has-policy.xml create mode 100644 tests/manual/ukf-meta-281/no-ec-no-policy.xml create mode 100644 tests/manual/ukf-meta-281/sirtfi-ec-no-policy.xml diff --git a/mdx/uk/check_uk_rands.xsl b/mdx/uk/check_uk_rands.xsl index 6ad2ee94..331aa9d5 100644 --- a/mdx/uk/check_uk_rands.xsl +++ b/mdx/uk/check_uk_rands.xsl @@ -3,7 +3,8 @@ check_uk_rands.xsl - UKf-specific check for SPs asserting R&S entity category + UKf-specific checks for SPs asserting R&S entity category + or for IdPs supporting the entity category. --> + + + + + IdP supports R&S entity category but has no RegistrationPolicy element. + + + + diff --git a/tests/manual/ukf-meta-281/README.md b/tests/manual/ukf-meta-281/README.md new file mode 100644 index 00000000..b1bd1e2d --- /dev/null +++ b/tests/manual/ukf-meta-281/README.md @@ -0,0 +1,9 @@ +# Tests for UK-specific check for R and S + +If the entity supports R&S, it must have a RegistrationPolicy + +Other checks ensure that the RegistrationPolicy is valid + +Run tests like this: + +`for i in *.xml; do echo "Test: $i ==="; xsltproc ../../../mdx/uk/check_uk_rands.xsl $i; done` diff --git a/tests/manual/ukf-meta-281/has-ec-has-policy.xml b/tests/manual/ukf-meta-281/has-ec-has-policy.xml new file mode 100644 index 00000000..e431bf6a --- /dev/null +++ b/tests/manual/ukf-meta-281/has-ec-has-policy.xml @@ -0,0 +1,18 @@ + + + + + http://ukfederation.org.uk/doc/mdrps-20130902 + + + + http://refeds.org/category/research-and-scholarship + + + + diff --git a/tests/manual/ukf-meta-281/has-ec-no-policy.xml b/tests/manual/ukf-meta-281/has-ec-no-policy.xml new file mode 100644 index 00000000..e1b7218d --- /dev/null +++ b/tests/manual/ukf-meta-281/has-ec-no-policy.xml @@ -0,0 +1,16 @@ + + + + + + + + http://refeds.org/category/research-and-scholarship + + + + diff --git a/tests/manual/ukf-meta-281/no-ec-has-policy.xml b/tests/manual/ukf-meta-281/no-ec-has-policy.xml new file mode 100644 index 00000000..c82a2c97 --- /dev/null +++ b/tests/manual/ukf-meta-281/no-ec-has-policy.xml @@ -0,0 +1,13 @@ + + + + + http://ukfederation.org.uk/doc/mdrps-20130902 + + + diff --git a/tests/manual/ukf-meta-281/no-ec-no-policy.xml b/tests/manual/ukf-meta-281/no-ec-no-policy.xml new file mode 100644 index 00000000..7d9301f7 --- /dev/null +++ b/tests/manual/ukf-meta-281/no-ec-no-policy.xml @@ -0,0 +1,5 @@ + + diff --git a/tests/manual/ukf-meta-281/sirtfi-ec-no-policy.xml b/tests/manual/ukf-meta-281/sirtfi-ec-no-policy.xml new file mode 100644 index 00000000..1bf29ae2 --- /dev/null +++ b/tests/manual/ukf-meta-281/sirtfi-ec-no-policy.xml @@ -0,0 +1,18 @@ + + + + + http://ukfederation.org.uk/doc/mdrps-20130902 + + + + https://refeds.org/sirtfi + + + +