Skip to content

Commit

Permalink
Add validation for SAML subject identifier entity attribute
Browse files Browse the repository at this point in the history
See ukf/ukf-meta#176 for details
  • Loading branch information
Alex Stuart committed May 27, 2021
1 parent 842892f commit b508259
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions mdx/uk/check_uk_mdattr.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
[@Name != 'http://macedir.org/entity-category']
[@Name != 'http://macedir.org/entity-category-support']
[@Name != 'urn:oasis:names:tc:SAML:attribute:assurance-certification']
[@Name != 'urn:oasis:names:tc:SAML:profiles:subject-id:req']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
Expand Down Expand Up @@ -121,4 +122,22 @@
</xsl:call-template>
</xsl:template>

<!--
Validate SAML subject identifier requirement value.
-->
<xsl:template match="mdattr:EntityAttributes/saml:Attribute[@Name='urn:oasis:names:tc:SAML:profiles:subject-id:req']
/saml:AttributeValue
[. != 'subject-id']
[. != 'pairwise-id']
[. != 'none']
[. != 'any']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>unknown subject identifier requirement values </xsl:text>
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>

0 comments on commit b508259

Please sign in to comment.