Skip to content

Commit

Permalink
Add a test to the utility for replacing HideFromWAYF element with hid…
Browse files Browse the repository at this point in the history
…e-from-disco Entity Category
  • Loading branch information
Alex Stuart committed Mar 1, 2017
1 parent a8e99a7 commit 042e774
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
6 changes: 5 additions & 1 deletion utilities/2017-02-27/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ Since there can only be a single Entity Attribute element in an entity fragment
we first check that there are no hidden IdPs that already have an Entity Attributes
element. If there are (and there are not too many) we edit these files manually.

Run the script on the entity fragment files: `xsltproc listHideFromWAYFandEA.xsl uk*.xml`
First, check that the XSLT will flag an entity fragment file that has an Entity
Attribute and the HideFromWAYF element. Run `xsltproc listHideFromWAYFandEA.xsl ./test.xml`.
This should report `https://idp.example.ac.uk/idp/shibboleth`.

Then run the script on all entity fragment files: `xsltproc listHideFromWAYFandEA.xsl uk*.xml`

## 2. Replace HideFromWAYF element with hide-from-disco Entity Category

Expand Down
20 changes: 20 additions & 0 deletions utilities/2017-02-27/test.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:mdattr="urn:oasis:names:tc:SAML:metadata:attribute"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:metadata saml-schema-metadata-2.0.xsd
urn:oasis:names:tc:SAML:metadata:attribute sstc-metadata-attr.xsd
urn:oasis:names:tc:SAML:2.0:assertion saml-schema-assertion-2.0.xsd
http://sdss.ac.uk/2006/06/WAYF uk-wayf.xsd"
ID="test000275" entityID="https://idp.example.ac.uk/idp/shibboleth">
<Extensions>
<mdattr:EntityAttributes>
<saml:Attribute Name="http://macedir.org/entity-category-support" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
<saml:AttributeValue>http://refeds.org/category/research-and-scholarship</saml:AttributeValue>
</saml:Attribute>
</mdattr:EntityAttributes>
<wayf:HideFromWAYF />
</Extensions>
</EntityDescriptor>

0 comments on commit 042e774

Please sign in to comment.