Skip to content

Commit

Permalink
Add specific bindings checks for AssertionConsumerService, ManageName…
Browse files Browse the repository at this point in the history
…IDService and SingleLogoutService.

Add a generic check for other bindings, but make it present warnings.
The AssertionConsumerService check is held in future_6 as we have entities failing it at present.
  • Loading branch information
iay committed Mar 15, 2012
1 parent 1048a04 commit 316e733
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 26 deletions.
54 changes: 54 additions & 0 deletions mdx/check_bindings.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,41 @@
</xsl:call-template>
</xsl:template>

<xsl:template match="md:ManageNameIDService
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>invalid binding '</xsl:text>
<xsl:value-of select="@Binding"/>
<xsl:text>' on </xsl:text>
<xsl:value-of select="name()"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

<xsl:template match="md:SingleLogoutService
[@Binding != 'http://schemas.xmlsoap.org/ws/2003/07/secext']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>invalid binding '</xsl:text>
<xsl:value-of select="@Binding"/>
<xsl:text>' on </xsl:text>
<xsl:value-of select="name()"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

<xsl:template match="md:SingleSignOnService
[@Binding != 'urn:mace:shibboleth:1.0:profiles:AuthnRequest']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST']
Expand All @@ -50,4 +85,23 @@
</xsl:call-template>
</xsl:template>

<xsl:template match="md:*
[@Binding]
[local-name() != 'ArtifactResolutionService']
[local-name() != 'AssertionConsumerService']
[local-name() != 'AttributeService']
[local-name() != 'ManageNameIDService']
[local-name() != 'SingleLogoutService']
[local-name() != 'SingleSignOnService']
">
<xsl:call-template name="warning">
<xsl:with-param name="m">
<xsl:text>unknown binding '</xsl:text>
<xsl:value-of select="@Binding"/>
<xsl:text>' on </xsl:text>
<xsl:value-of select="name()"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>
26 changes: 0 additions & 26 deletions mdx/check_future_5.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,4 @@
-->
<xsl:import href="../build/check_framework.xsl"/>


<xsl:template match="md:*
[local-name() != 'ArtifactResolutionService']
[local-name() != 'AttributeService']
[local-name() != 'SingleSignOnService']
[@Binding != 'http://schemas.xmlsoap.org/ws/2003/07/secext']
[@Binding != 'urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding']
[@Binding != 'urn:oasis:names:tc:SAML:1.0:profiles:artifact-01']
[@Binding != 'urn:oasis:names:tc:SAML:1.0:profiles:browser-post']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:PAOS']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>invalid binding '</xsl:text>
<xsl:value-of select="@Binding"/>
<xsl:text>' on </xsl:text>
<xsl:value-of select="name()"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>
18 changes: 18 additions & 0 deletions mdx/check_future_6.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,23 @@
-->
<xsl:import href="../build/check_framework.xsl"/>

<xsl:template match="md:AssertionConsumerService
[@Binding != 'http://schemas.xmlsoap.org/ws/2003/07/secext']
[@Binding != 'urn:oasis:names:tc:SAML:1.0:profiles:artifact-01']
[@Binding != 'urn:oasis:names:tc:SAML:1.0:profiles:browser-post']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign']
[@Binding != 'urn:oasis:names:tc:SAML:2.0:bindings:PAOS']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>invalid binding '</xsl:text>
<xsl:value-of select="@Binding"/>
<xsl:text>' on </xsl:text>
<xsl:value-of select="name()"/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>

</xsl:stylesheet>

0 comments on commit 316e733

Please sign in to comment.