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