-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a checking ruleset for the ADFS metadata profile. Note that one c…
…heck is being held down to "warning" level until an existing entity which breaks the rule in question is corrected.
- Loading branch information
Showing
2 changed files
with
83 additions
and
1 deletion.
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 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,81 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!-- | ||
| check_adfs.xsl | ||
| Checking ruleset containing rules associated with the ADFS metadata profile, | ||
| as described here: | ||
| https://spaces.internet2.edu/display/SHIB/ADFSMetadataProfile | ||
| 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:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xmlns="urn:oasis:names:tc:SAML:2.0:metadata"> | ||
|
|
||
| <!-- | ||
| Common support functions. | ||
| --> | ||
| <xsl:import href="check_framework.xsl"/> | ||
|
|
||
| <!-- | ||
| An IdP's SSO descriptor must contain a SingleSignOn element with | ||
| the appropriate binding. | ||
| --> | ||
| <xsl:template match="md:IDPSSODescriptor | ||
| [contains(@protocolSupportEnumeration, 'http://schemas.xmlsoap.org/ws/2003/07/secext')] | ||
| [not(md:SingleSignOnService/@Binding = 'http://schemas.xmlsoap.org/ws/2003/07/secext')]"> | ||
| <xsl:call-template name="fatal"> | ||
| <xsl:with-param name="m">ADFS IdP role lacks SSO service with appropriate Binding</xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| An SP's SSO descriptor must contain an AssertionConsumerService element with | ||
| the appropriate binding. | ||
| --> | ||
| <xsl:template match="md:SPSSODescriptor | ||
| [contains(@protocolSupportEnumeration, 'http://schemas.xmlsoap.org/ws/2003/07/secext')] | ||
| [not(md:AssertionConsumerService/@Binding = 'http://schemas.xmlsoap.org/ws/2003/07/secext')]"> | ||
| <!-- | ||
| The current UK federation metadata has one entity which breaks this rule at present. | ||
| Change this from "warning" to "fatal" once that has been resolved. | ||
| --> | ||
| <xsl:call-template name="warning"> | ||
| <xsl:with-param name="m">ADFS SP role lacks SSO service with appropriate Binding</xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
| <!-- | ||
| If the ADFS binding appears on any service, the parent role's protocol support | ||
| enumeration must include the appropruate URI. | ||
| --> | ||
| <xsl:template match="md:SingleSignOnService | ||
| [@Binding='http://schemas.xmlsoap.org/ws/2003/07/secext'] | ||
| [not(contains(../@protocolSupportEnumeration, 'http://schemas.xmlsoap.org/ws/2003/07/secext'))]"> | ||
| <xsl:call-template name="fatal"> | ||
| <xsl:with-param name="m">ADFS SingleSignOnService requires appropriate protocolSupportEnumeration</xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template match="md:AssertionConsumerService | ||
| [@Binding='http://schemas.xmlsoap.org/ws/2003/07/secext'] | ||
| [not(contains(../@protocolSupportEnumeration, 'http://schemas.xmlsoap.org/ws/2003/07/secext'))]"> | ||
| <xsl:call-template name="fatal"> | ||
| <xsl:with-param name="m">ADFS AssertionConsumerService requires appropriate protocolSupportEnumeration</xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
| <xsl:template match="md:SingleLogoutService | ||
| [@Binding='http://schemas.xmlsoap.org/ws/2003/07/secext'] | ||
| [not(contains(../@protocolSupportEnumeration, 'http://schemas.xmlsoap.org/ws/2003/07/secext'))]"> | ||
| <xsl:call-template name="fatal"> | ||
| <xsl:with-param name="m">ADFS SingleLogoutService requires appropriate protocolSupportEnumeration</xsl:with-param> | ||
| </xsl:call-template> | ||
| </xsl:template> | ||
|
|
||
| </xsl:stylesheet> |