Skip to content

Commit

Permalink
Handle mdui namespace for discovery user interface metadata. For now,…
Browse files Browse the repository at this point in the history
… this is explicitly excluded from the production and fallback aggregates, and only visible in the test aggregate.
  • Loading branch information
iay committed Aug 10, 2010
1 parent 3cf3cce commit bff284e
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 3 deletions.
21 changes: 21 additions & 0 deletions build/master_ukfederation.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,27 @@
</xsl:copy>
</xsl:template>

<!--
If an IdP's SSO or AA roles already includes an Extensions element, this may
already contain extensions other than scopes. We need to make sure that
if it does not also contain scopes, then any scopes declared at the entity
level are copied down.
-->
<xsl:template match="md:IDPSSODescriptor/md:Extensions |
md:AttributeAuthorityDescriptor/md:Extensions">
<xsl:copy>
<xsl:apply-templates select="node()"/>
<xsl:if test="not(shibmeta:Scope)">
<!-- copy scopes from EntityDescriptor extensions -->
<xsl:for-each select="ancestor::md:EntityDescriptor/md:Extensions/shibmeta:Scope">
<xsl:text> </xsl:text>
<xsl:copy-of select="."/>
<xsl:text>&#10; </xsl:text>
</xsl:for-each>
</xsl:if>
</xsl:copy>
</xsl:template>

<!--
Drop any explicit xsi:schemaLocation attributes from imported entity fragments.
-->
Expand Down
10 changes: 9 additions & 1 deletion build/uk_master_back.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:mdui="urn:oasis:names:tc:SAML:2.0:metadata:ui"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wayf="http://sdss.ac.uk/2006/06/WAYF"
xmlns:ukfedlabel="http://ukfederation.org.uk/2006/11/label"
Expand All @@ -27,7 +28,7 @@
extension-element-prefixes="date exsl mdxDates"

xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="wayf">
exclude-result-prefixes="mdui wayf">

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>
Expand Down Expand Up @@ -126,6 +127,13 @@
<!-- do nothing -->
</xsl:template>

<!--
Strip all discovery user interface elements entirely.
-->
<xsl:template match="mdui:*">
<!-- do nothing -->
</xsl:template>

<!--
Remove administrative contacts.
-->
Expand Down
1 change: 1 addition & 0 deletions build/uk_master_test.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
xmlns:elab="http://eduserv.org.uk/labels"
xmlns:idpdisc="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:mdui="urn:oasis:names:tc:SAML:2.0:metadata:ui"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand Down
12 changes: 10 additions & 2 deletions build/uk_master_unsigned.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:elab="http://eduserv.org.uk/labels"
xmlns:idpdisc="urn:oasis:names:tc:SAML:profiles:SSO:idp-discovery-protocol"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:mdui="urn:oasis:names:tc:SAML:2.0:metadata:ui"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
xmlns:shibmeta="urn:mace:shibboleth:metadata:1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Expand All @@ -27,7 +28,7 @@
extension-element-prefixes="date exsl mdxDates"

xmlns="urn:oasis:names:tc:SAML:2.0:metadata"
exclude-result-prefixes="md">
exclude-result-prefixes="md mdui">

<!--Force UTF-8 encoding for the output.-->
<xsl:output omit-xml-declaration="no" method="xml" encoding="UTF-8" indent="yes"/>
Expand Down Expand Up @@ -148,6 +149,13 @@
<!-- do nothing -->
</xsl:template>

<!--
Strip all discovery user interface elements entirely.
-->
<xsl:template match="mdui:*">
<!-- do nothing -->
</xsl:template>

<!--
Normalise namespace on IdP discovery elements.
-->
Expand Down

0 comments on commit bff284e

Please sign in to comment.