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