Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Fold what remains of check.xsl into check_ukreg.
Duplicate check_ukreg as check_ukreg_mda, a version which requires a members bean to be provided as a parameter, for use within the aggregator.
Showing
7 changed files
with
159 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
check_ukreg_mda.xsl | ||
Checking ruleset containing rules that only apply to metadata registered | ||
by the UK federation's registrar function. | ||
Identical to check_ukreg except that it assumes a members bean passed | ||
as parameter rather than loading one itself. | ||
Author: Ian A. Young <ian@iay.org.uk> | ||
--> | ||
<xsl:stylesheet version="1.0" | ||
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" | ||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | ||
|
||
xmlns:mdxMail="xalan://uk.ac.sdss.xalan.md.Mail" | ||
xmlns:ukfxMembers="xalan://uk.org.ukfederation.members.Members" | ||
extension-element-prefixes="mdxMail ukfxMembers" | ||
|
||
xmlns="urn:oasis:names:tc:SAML:2.0:metadata"> | ||
|
||
<!-- | ||
Common support functions. | ||
--> | ||
<xsl:import href="check_framework.xsl"/> | ||
|
||
|
||
<!-- | ||
Parameters. | ||
--> | ||
<xsl:param name="members"/> | ||
|
||
|
||
<!-- | ||
Check EntityDescriptor elements. | ||
--> | ||
<xsl:template match="md:EntityDescriptor"> | ||
|
||
<!-- tests on OrganizationName --> | ||
<xsl:choose> | ||
|
||
<!-- | ||
Check for entities which do not have an OrganizationName at all. | ||
--> | ||
<xsl:when test="not(md:Organization/md:OrganizationName)"> | ||
<xsl:call-template name="error"> | ||
<xsl:with-param name="m">entity lacks OrganizationName</xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:when> | ||
|
||
<xsl:otherwise> | ||
<!-- | ||
Check for entities with OrganizationName elements which don't correspond to | ||
a canonical owner name. | ||
--> | ||
<xsl:if test="not(ukfxMembers:isOwnerName($members, md:Organization/md:OrganizationName))"> | ||
<xsl:call-template name="error"> | ||
<xsl:with-param name="m">unknown owner name: <xsl:value-of select="md:Organization/md:OrganizationName"/></xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:if> | ||
</xsl:otherwise> | ||
|
||
</xsl:choose> | ||
|
||
<!-- apply tests to child elements --> | ||
<xsl:apply-templates/> | ||
</xsl:template> | ||
|
||
|
||
<!-- | ||
Check for badly formatted e-mail addresses. | ||
--> | ||
<xsl:template match="md:EmailAddress[mdxMail:dodgyAddress(.)]"> | ||
<xsl:call-template name="error"> | ||
<xsl:with-param name="m">badly formatted e-mail address: '<xsl:value-of select='.'/>'</xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:template> | ||
|
||
|
||
<!-- | ||
Check for https:// locations that use an explicit but redundant port specifier. | ||
--> | ||
<xsl:template match="*[@Location and starts-with(@Location, 'https://') | ||
and contains(@Location,':443/')]"> | ||
<xsl:call-template name="error"> | ||
<xsl:with-param name="m"> | ||
<xsl:value-of select='local-name()'/> | ||
<xsl:text> Location </xsl:text> | ||
<xsl:value-of select="@Location"/> | ||
<xsl:text> not in standard form</xsl:text> | ||
</xsl:with-param> | ||
</xsl:call-template> | ||
</xsl:template> | ||
|
||
|
||
</xsl:stylesheet> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters