Merge remote branch 'tags/2.3.3'
[java-idp.git] / src / installer / resources / conf-tmpl / relying-party.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3     This file is an EXAMPLE configuration file.
4
5     This file specifies relying party dependent configurations for the IdP, for example, whether SAML assertions to a 
6     particular relying party should be signed.  It also includes metadata provider and credential definitions used 
7     when answering requests to a relying party.
8 -->
9 <rp:RelyingPartyGroup xmlns:rp="urn:mace:shibboleth:2.0:relying-party" xmlns:saml="urn:mace:shibboleth:2.0:relying-party:saml" xmlns:metadata="urn:mace:shibboleth:2.0:metadata" xmlns:resource="urn:mace:shibboleth:2.0:resource" xmlns:security="urn:mace:shibboleth:2.0:security" xmlns:samlsec="urn:mace:shibboleth:2.0:security:saml" xmlns:samlmd="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mace:shibboleth:2.0:relying-party classpath:/schema/shibboleth-2.0-relying-party.xsd                                        urn:mace:shibboleth:2.0:relying-party:saml classpath:/schema/shibboleth-2.0-relying-party-saml.xsd                                        urn:mace:shibboleth:2.0:metadata classpath:/schema/shibboleth-2.0-metadata.xsd                                        urn:mace:shibboleth:2.0:resource classpath:/schema/shibboleth-2.0-resource.xsd                                        urn:mace:shibboleth:2.0:security classpath:/schema/shibboleth-2.0-security.xsd                                        urn:mace:shibboleth:2.0:security:saml classpath:/schema/shibboleth-2.0-security-policy-saml.xsd                                        urn:oasis:names:tc:SAML:2.0:metadata classpath:/schema/saml-schema-metadata-2.0.xsd">
10                                        
11     <!-- ========================================== -->
12     <!--      Relying Party Configurations          -->
13     <!-- ========================================== -->
14     <rp:AnonymousRelyingParty provider="$IDP_ENTITY_ID$" defaultSigningCredentialRef="IdPCredential"/>
15     
16     <rp:DefaultRelyingParty provider="$IDP_ENTITY_ID$" defaultSigningCredentialRef="IdPCredential">
17         <!-- 
18             Each attribute in these profiles configuration is set to its default value,
19             that is, the values that would be in effect if those attributes were not present.
20             We list them here so that people are aware of them (since they seem reluctant to 
21             read the documentation).
22         -->
23         <rp:ProfileConfiguration xsi:type="saml:ShibbolethSSOProfile" includeAttributeStatement="false" assertionLifetime="PT5M" signResponses="conditional" signAssertions="never"/>
24                               
25         <rp:ProfileConfiguration xsi:type="saml:SAML1AttributeQueryProfile" assertionLifetime="PT5M" signResponses="conditional" signAssertions="never"/>
26         
27         <rp:ProfileConfiguration xsi:type="saml:SAML1ArtifactResolutionProfile" signResponses="conditional" signAssertions="never"/>
28         
29         <rp:ProfileConfiguration xsi:type="saml:SAML2SSOProfile" includeAttributeStatement="true" assertionLifetime="PT5M" assertionProxyCount="0" signResponses="never" signAssertions="always" encryptAssertions="conditional" encryptNameIds="never"/>
30
31         <rp:ProfileConfiguration xsi:type="saml:SAML2ECPProfile" includeAttributeStatement="true" assertionLifetime="PT5M" assertionProxyCount="0" signResponses="never" signAssertions="always" encryptAssertions="conditional" encryptNameIds="never"/>
32
33         <rp:ProfileConfiguration xsi:type="saml:SAML2AttributeQueryProfile" assertionLifetime="PT5M" assertionProxyCount="0" signResponses="conditional" signAssertions="never" encryptAssertions="conditional" encryptNameIds="never"/>
34         
35         <rp:ProfileConfiguration xsi:type="saml:SAML2ArtifactResolutionProfile" 
36                               signResponses="never"
37                               signAssertions="always"
38                               encryptAssertions="conditional"
39                               encryptNameIds="never"/>
40
41         <rp:ProfileConfiguration xsi:type="saml:SAML2LogoutRequestProfile"
42                               signResponses="always"
43                               signAssertions="never"
44                               encryptAssertions="never"
45                               encryptNameIds="conditional" />
46         <rp:ProfileConfiguration xsi:type="saml:SAML2ArtifactResolutionProfile" signResponses="never" signAssertions="always" encryptAssertions="conditional" encryptNameIds="never"/>
47         
48     </rp:DefaultRelyingParty>
49         
50     
51     <!-- ========================================== -->
52     <!--      Metadata Configuration                -->
53     <!-- ========================================== -->
54     <!-- MetadataProvider the combining other MetadataProviders -->
55     <metadata:MetadataProvider id="ShibbolethMetadata" xsi:type="metadata:ChainingMetadataProvider">
56     
57         <!-- Load the IdP's own metadata.  This is necessary for artifact support. -->
58         <metadata:MetadataProvider id="IdPMD" xsi:type="metadata:ResourceBackedMetadataProvider">
59             <metadata:MetadataResource xsi:type="resource:FilesystemResource" file="$IDP_HOME$/metadata/idp-metadata.xml"/>
60         </metadata:MetadataProvider>
61         
62         <!-- Example metadata provider. -->
63         <!-- Reads metadata from a URL and store a backup copy on the file system. -->
64         <!-- Validates the signature of the metadata and filters out all by SP entities in order to save memory -->
65         <!-- To use: fill in 'metadataURL' and 'backingFile' properties on MetadataResource element -->
66         <!--
67         <metadata:MetadataProvider id="URLMD" xsi:type="metadata:FileBackedHTTPMetadataProvider"
68                           metadataURL="http://example.org/metadata.xml"
69                           backingFile="$IDP_HOME$/metadata/some-metadata.xml">
70             <metadata:MetadataFilter xsi:type="metadata:ChainingFilter">
71                 <metadata:MetadataFilter xsi:type="metadata:RequiredValidUntil" 
72                                 maxValidityInterval="P7D" />
73                 <metadata:MetadataFilter xsi:type="metadata:SignatureValidation"
74                                 trustEngineRef="shibboleth.MetadataTrustEngine"
75                                 requireSignedMetadata="true" />
76                     <metadata:MetadataFilter xsi:type="metadata:EntityRoleWhiteList">
77                     <metadata:RetainedRole>samlmd:SPSSODescriptor</metadata:RetainedRole>
78                 </metadata:MetadataFilter>
79             </metadata:MetadataFilter>
80         </metadata:MetadataProvider>
81         -->
82         
83     </metadata:MetadataProvider>
84
85     
86     <!-- ========================================== -->
87     <!--     Security Configurations                -->
88     <!-- ========================================== -->
89     <security:Credential id="IdPCredential" xsi:type="security:X509Filesystem">
90         <security:PrivateKey>$IDP_HOME$/credentials/idp.key</security:PrivateKey>
91         <security:Certificate>$IDP_HOME$/credentials/idp.crt</security:Certificate>
92     </security:Credential>
93     
94     <!-- Trust engine used to evaluate the signature on loaded metadata. -->
95     <!--
96     <security:TrustEngine id="shibboleth.MetadataTrustEngine" xsi:type="security:StaticExplicitKeySignature">
97         <security:Credential id="MyFederation1Credentials" xsi:type="security:X509Filesystem">
98             <security:Certificate>$IDP_HOME$/credentials/federation1.crt</security:Certificate>
99         </security:Credential>
100     </security:TrustEngine>
101      -->
102      
103     <!-- DO NOT EDIT BELOW THIS POINT -->
104     <!-- 
105         The following trust engines and rules control every aspect of security related to incoming messages. 
106         Trust engines evaluate various tokens (like digital signatures) for trust worthiness while the 
107         security policies establish a set of checks that an incoming message must pass in order to be considered
108         secure.  Naturally some of these checks require the validation of the tokens evaluated by the trust 
109         engines and so you'll see some rules that reference the declared trust engines.
110     -->
111     <security:TrustEngine id="shibboleth.SignatureTrustEngine" xsi:type="security:SignatureChaining">
112         <security:TrustEngine id="shibboleth.SignatureMetadataExplicitKeyTrustEngine" xsi:type="security:MetadataExplicitKeySignature" metadataProviderRef="ShibbolethMetadata"/>                              
113         <security:TrustEngine id="shibboleth.SignatureMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXSignature" metadataProviderRef="ShibbolethMetadata"/>
114     </security:TrustEngine>
115     
116     <security:TrustEngine id="shibboleth.CredentialTrustEngine" xsi:type="security:Chaining">
117         <security:TrustEngine id="shibboleth.CredentialMetadataExplictKeyTrustEngine" xsi:type="security:MetadataExplicitKey" metadataProviderRef="ShibbolethMetadata"/>
118         <security:TrustEngine id="shibboleth.CredentialMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXX509Credential" metadataProviderRef="ShibbolethMetadata"/>
119     </security:TrustEngine>
120      
121     <security:SecurityPolicy id="shibboleth.ShibbolethSSOSecurityPolicy" xsi:type="security:SecurityPolicyType">
122         <security:Rule xsi:type="samlsec:Replay" required="false"/>
123         <security:Rule xsi:type="samlsec:IssueInstant" required="false"/>
124         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
125     </security:SecurityPolicy>
126     
127     <security:SecurityPolicy id="shibboleth.SAML1AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType">
128         <security:Rule xsi:type="samlsec:Replay"/>
129         <security:Rule xsi:type="samlsec:IssueInstant"/>
130         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
131         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
132         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
133         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
134     </security:SecurityPolicy>
135     
136     <security:SecurityPolicy id="shibboleth.SAML1ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType">
137         <security:Rule xsi:type="samlsec:Replay"/>
138         <security:Rule xsi:type="samlsec:IssueInstant"/>
139         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
140         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
141         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
142         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
143     </security:SecurityPolicy>
144
145     <security:SecurityPolicy id="shibboleth.SAML2SSOSecurityPolicy" xsi:type="security:SecurityPolicyType">
146         <security:Rule xsi:type="samlsec:Replay"/>
147         <security:Rule xsi:type="samlsec:IssueInstant"/>
148         <security:Rule xsi:type="samlsec:SAML2AuthnRequestsSigned"/>
149         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
150         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
151         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
152         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
153     </security:SecurityPolicy>
154
155     <security:SecurityPolicy id="shibboleth.SAML2AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType">
156         <security:Rule xsi:type="samlsec:Replay"/>
157         <security:Rule xsi:type="samlsec:IssueInstant"/>
158         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
159         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
160         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
161         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
162         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
163         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
164     </security:SecurityPolicy>
165     
166     <security:SecurityPolicy id="shibboleth.SAML2ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType">
167         <security:Rule xsi:type="samlsec:Replay"/>
168         <security:Rule xsi:type="samlsec:IssueInstant"/>
169         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
170         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
171         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
172         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
173         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
174         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
175     </security:SecurityPolicy>
176     
177     <security:SecurityPolicy id="shibboleth.SAML2SLOSecurityPolicy" xsi:type="security:SecurityPolicyType">
178         <security:Rule xsi:type="samlsec:Replay"/>
179         <security:Rule xsi:type="samlsec:IssueInstant"/>
180         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
181         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
182         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
183         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
184         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
185         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
186     </security:SecurityPolicy>
187     
188 </rp:RelyingPartyGroup>