tag for release
[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" signAssertions="always" 
59                                  encryptAssertions="conditional" encryptNameIds="never"/>
60         
61     </rp:DefaultRelyingParty>
62         
63     
64     <!-- ========================================== -->
65     <!--      Metadata Configuration                -->
66     <!-- ========================================== -->
67     <!-- MetadataProvider the combining other MetadataProviders -->
68     <metadata:MetadataProvider id="ShibbolethMetadata" xsi:type="metadata:ChainingMetadataProvider">
69     
70         <!-- Load the IdP's own metadata.  This is necessary for artifact support. -->
71         <metadata:MetadataProvider id="IdPMD" xsi:type="metadata:ResourceBackedMetadataProvider">
72             <metadata:MetadataResource xsi:type="resource:FilesystemResource" file="$IDP_HOME$/metadata/idp-metadata.xml"/>
73         </metadata:MetadataProvider>
74         
75         <!-- Example metadata provider. -->
76         <!-- Reads metadata from a URL and store a backup copy on the file system. -->
77         <!-- Validates the signature of the metadata and filters out all by SP entities in order to save memory -->
78         <!-- To use: fill in 'metadataURL' and 'backingFile' properties on MetadataResource element -->
79         <!--
80         <metadata:MetadataProvider id="URLMD" xsi:type="metadata:FileBackedHTTPMetadataProvider"
81                           metadataURL="http://example.org/metadata.xml"
82                           backingFile="$IDP_HOME$/metadata/some-metadata.xml">
83             <metadata:MetadataFilter xsi:type="metadata:ChainingFilter">
84                 <metadata:MetadataFilter xsi:type="metadata:RequiredValidUntil" 
85                                 maxValidityInterval="P7D" />
86                 <metadata:MetadataFilter xsi:type="metadata:SignatureValidation"
87                                 trustEngineRef="shibboleth.MetadataTrustEngine"
88                                 requireSignedMetadata="true" />
89                     <metadata:MetadataFilter xsi:type="metadata:EntityRoleWhiteList">
90                     <metadata:RetainedRole>samlmd:SPSSODescriptor</metadata:RetainedRole>
91                 </metadata:MetadataFilter>
92             </metadata:MetadataFilter>
93         </metadata:MetadataProvider>
94         -->
95         
96     </metadata:MetadataProvider>
97
98     
99     <!-- ========================================== -->
100     <!--     Security Configurations                -->
101     <!-- ========================================== -->
102     <security:Credential id="IdPCredential" xsi:type="security:X509Filesystem">
103         <security:PrivateKey>$IDP_HOME$/credentials/idp.key</security:PrivateKey>
104         <security:Certificate>$IDP_HOME$/credentials/idp.crt</security:Certificate>
105     </security:Credential>
106     
107     <!-- Trust engine used to evaluate the signature on loaded metadata. -->
108     <!--
109     <security:TrustEngine id="shibboleth.MetadataTrustEngine" xsi:type="security:StaticExplicitKeySignature">
110         <security:Credential id="MyFederation1Credentials" xsi:type="security:X509Filesystem">
111             <security:Certificate>$IDP_HOME$/credentials/federation1.crt</security:Certificate>
112         </security:Credential>
113     </security:TrustEngine>
114      -->
115      
116     <!-- DO NOT EDIT BELOW THIS POINT -->
117     <!-- 
118         The following trust engines and rules control every aspect of security related to incoming messages. 
119         Trust engines evaluate various tokens (like digital signatures) for trust worthiness while the 
120         security policies establish a set of checks that an incoming message must pass in order to be considered
121         secure.  Naturally some of these checks require the validation of the tokens evaluated by the trust 
122         engines and so you'll see some rules that reference the declared trust engines.
123     -->
124     <security:TrustEngine id="shibboleth.SignatureTrustEngine" xsi:type="security:SignatureChaining">
125         <security:TrustEngine id="shibboleth.SignatureMetadataExplicitKeyTrustEngine" xsi:type="security:MetadataExplicitKeySignature" metadataProviderRef="ShibbolethMetadata"/>                              
126         <security:TrustEngine id="shibboleth.SignatureMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXSignature" metadataProviderRef="ShibbolethMetadata"/>
127     </security:TrustEngine>
128     
129     <security:TrustEngine id="shibboleth.CredentialTrustEngine" xsi:type="security:Chaining">
130         <security:TrustEngine id="shibboleth.CredentialMetadataExplictKeyTrustEngine" xsi:type="security:MetadataExplicitKey" metadataProviderRef="ShibbolethMetadata"/>
131         <security:TrustEngine id="shibboleth.CredentialMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXX509Credential" metadataProviderRef="ShibbolethMetadata"/>
132     </security:TrustEngine>
133      
134     <security:SecurityPolicy id="shibboleth.ShibbolethSSOSecurityPolicy" xsi:type="security:SecurityPolicyType">
135         <security:Rule xsi:type="samlsec:Replay" required="false"/>
136         <security:Rule xsi:type="samlsec:IssueInstant" required="false"/>
137         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
138     </security:SecurityPolicy>
139     
140     <security:SecurityPolicy id="shibboleth.SAML1AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType">
141         <security:Rule xsi:type="samlsec:Replay"/>
142         <security:Rule xsi:type="samlsec:IssueInstant"/>
143         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
144         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
145         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
146         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
147     </security:SecurityPolicy>
148     
149     <security:SecurityPolicy id="shibboleth.SAML1ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType">
150         <security:Rule xsi:type="samlsec:Replay"/>
151         <security:Rule xsi:type="samlsec:IssueInstant"/>
152         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
153         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
154         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
155         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
156     </security:SecurityPolicy>
157
158     <security:SecurityPolicy id="shibboleth.SAML2SSOSecurityPolicy" xsi:type="security:SecurityPolicyType">
159         <security:Rule xsi:type="samlsec:Replay"/>
160         <security:Rule xsi:type="samlsec:IssueInstant"/>
161         <security:Rule xsi:type="samlsec:SAML2AuthnRequestsSigned"/>
162         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
163         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
164         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
165         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
166     </security:SecurityPolicy>
167
168     <security:SecurityPolicy id="shibboleth.SAML2AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType">
169         <security:Rule xsi:type="samlsec:Replay"/>
170         <security:Rule xsi:type="samlsec:IssueInstant"/>
171         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
172         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
173         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
174         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
175         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
176         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
177     </security:SecurityPolicy>
178     
179     <security:SecurityPolicy id="shibboleth.SAML2ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType">
180         <security:Rule xsi:type="samlsec:Replay"/>
181         <security:Rule xsi:type="samlsec:IssueInstant"/>
182         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
183         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
184         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
185         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
186         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
187         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
188     </security:SecurityPolicy>
189     
190     <security:SecurityPolicy id="shibboleth.SAML2SLOSecurityPolicy" xsi:type="security:SecurityPolicyType">
191         <security:Rule xsi:type="samlsec:Replay"/>
192         <security:Rule xsi:type="samlsec:IssueInstant"/>
193         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine"/>
194         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
195         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine"/>
196         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine"/>
197         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
198         <security:Rule xsi:type="security:MandatoryMessageAuthentication"/>
199     </security:SecurityPolicy>
200     
201 </rp:RelyingPartyGroup>