Skip to content

Commit

Permalink
Validate UK-registered RegistrationPolicy values against previously u…
Browse files Browse the repository at this point in the history
…sed document URIs.
  • Loading branch information
iay committed Oct 1, 2013
1 parent a45ec88 commit 3be8c02
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
14 changes: 14 additions & 0 deletions mdx/uk/beans.xml
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,19 @@
</bean>


<!--
check_uk_mdrps
-->
<bean id="check_uk_mdrps" parent="XSLValidationStage"
p:id="check_uk_mdrps">
<property name="xslResource">
<bean parent="FilesystemResource">
<constructor-arg value="#{ systemProperties['basedir'] }/mdx/uk/check_uk_mdrps.xsl"/>
</bean>
</property>
</bean>


<!--
check_uk_urlenc
-->
Expand Down Expand Up @@ -388,6 +401,7 @@
<ref bean="checkSchemas"/>
<ref bean="CHECK_std"/>
<ref bean="check_ukreg"/>
<ref bean="check_uk_mdrps"/>
<ref bean="check_uk_urlenc"/>
<ref bean="mdui_dn_en_present"/>
<ref bean="mdui_dn_en_match"/>
Expand Down
36 changes: 36 additions & 0 deletions mdx/uk/check_uk_mdrps.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
check_uk_mdrps.xsl
UKf-specific check for appropriate RegistrationPolicy values.
Author: Ian A. Young <ian@iay.org.uk>
-->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
xmlns:mdrpi="urn:oasis:names:tc:SAML:metadata:rpi"
xmlns="urn:oasis:names:tc:SAML:2.0:metadata">

<!--
Common support functions.
-->
<xsl:import href="../_rules/check_framework.xsl"/>


<xsl:template match="mdrpi:RegistrationInfo[@registrationAuthority='http://ukfederation.org.uk']
/mdrpi:RegistrationPolicy
[.!='http://ukfederation.org.uk/doc/mdrps-20130902']
">
<xsl:call-template name="error">
<xsl:with-param name="m">
<xsl:text>invalid RegistrationPolicy value </xsl:text>
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:template>


</xsl:stylesheet>
1 change: 1 addition & 0 deletions mdx/uk/verbs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@
<ref bean="check_shibboleth"/>
<ref bean="check_uk_trust"/>

<ref bean="check_uk_mdrps"/>
<ref bean="check_uk_urlenc"/>
<ref bean="check_future"/>
<ref bean="check_imported"/>
Expand Down

0 comments on commit 3be8c02

Please sign in to comment.