Add RequiredValidUntil filter in to default config
[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="RequiredValidUntil" xmlns="urn:mace:shibboleth:2.0:metadata" 
102                                 maxValidityInterval="604800" />
103                 <MetadataFilter xsi:type="SignatureValidation" xmlns="urn:mace:shibboleth:2.0:metadata"
104                                 trustEngineRef="shibboleth.MetadataTrustEngine"
105                                 requireSignedMetadata="true" />
106                     <MetadataFilter xsi:type="EntityRoleWhiteList" xmlns="urn:mace:shibboleth:2.0:metadata">
107                     <RetainedRole>samlmd:SPSSODescriptor</RetainedRole>
108                 </MetadataFilter>
109             </MetadataFilter>
110         </MetadataProvider>
111         -->
112         
113     </MetadataProvider>
114
115     
116     <!-- ========================================== -->
117     <!--     Security Configurations                -->
118     <!-- ========================================== -->
119     <security:Credential id="IdPCredential" xsi:type="security:X509Filesystem">
120         <security:PrivateKey>$IDP_HOME$/credentials/idp.key</security:PrivateKey>
121         <security:Certificate>$IDP_HOME$/credentials/idp.crt</security:Certificate>
122     </security:Credential>
123     
124     <!-- Trust engine used to evaluate the signature on loaded metadata. -->
125     <!--
126     <security:TrustEngine id="shibboleth.MetadataTrustEngine" xsi:type="security:StaticExplicitKeySignature">
127         <security:Credential id="MyFederation1Credentials" xsi:type="security:X509Filesystem">
128             <security:Certificate>$IDP_HOME$/credentials/federation1.crt</security:Certificate>
129         </security:Credential>
130     </security:TrustEngine>
131      -->
132      
133     <!-- DO NOT EDIT BELOW THIS POINT -->
134     <!-- 
135         The following trust engines and rules control every aspect of security related to incoming messages. 
136         Trust engines evaluate various tokens (like digital signatures) for trust worthiness while the 
137         security policies establish a set of checks that an incoming message must pass in order to be considered
138         secure.  Naturally some of these checks require the validation of the tokens evaluated by the trust 
139         engines and so you'll see some rules that reference the declared trust engines.
140     -->
141     <security:TrustEngine id="shibboleth.SignatureTrustEngine" xsi:type="security:SignatureChaining">
142         <security:TrustEngine id="shibboleth.SignatureMetadataExplicitKeyTrustEngine" xsi:type="security:MetadataExplicitKeySignature"
143                               metadataProviderRef="ShibbolethMetadata" />                              
144         <security:TrustEngine id="shibboleth.SignatureMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXSignature"
145                               metadataProviderRef="ShibbolethMetadata" />
146     </security:TrustEngine>
147     
148     <security:TrustEngine id="shibboleth.CredentialTrustEngine" xsi:type="security:Chaining">
149         <security:TrustEngine id="shibboleth.CredentialMetadataExplictKeyTrustEngine" xsi:type="security:MetadataExplicitKey"
150                               metadataProviderRef="ShibbolethMetadata" />
151         <security:TrustEngine id="shibboleth.CredentialMetadataPKIXTrustEngine" xsi:type="security:MetadataPKIXX509Credential"
152                               metadataProviderRef="ShibbolethMetadata" />
153     </security:TrustEngine>
154      
155     <security:SecurityPolicy id="shibboleth.ShibbolethSSOSecurityPolicy" xsi:type="security:SecurityPolicyType">
156         <security:Rule xsi:type="samlsec:IssueInstant" required="false"/>
157         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
158     </security:SecurityPolicy>
159     
160     <security:SecurityPolicy id="shibboleth.SAML1AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType">
161         <security:Rule xsi:type="samlsec:Replay"/>
162         <security:Rule xsi:type="samlsec:IssueInstant"/>
163         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" />
164         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" />
165         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
166         <security:Rule xsi:type="security:MandatoryMessageAuthentication" />
167     </security:SecurityPolicy>
168     
169     <security:SecurityPolicy id="shibboleth.SAML1ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType">
170         <security:Rule xsi:type="samlsec:Replay"/>
171         <security:Rule xsi:type="samlsec:IssueInstant"/>
172         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" />
173         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" />
174         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
175         <security:Rule xsi:type="security:MandatoryMessageAuthentication" />
176     </security:SecurityPolicy>
177
178     <security:SecurityPolicy id="shibboleth.SAML2SSOSecurityPolicy" xsi:type="security:SecurityPolicyType">
179         <security:Rule xsi:type="samlsec:Replay"/>
180         <security:Rule xsi:type="samlsec:IssueInstant"/>
181         <security:Rule xsi:type="samlsec:SAML2AuthnRequestsSigned"/>
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:SecurityPolicy>
188
189     <security:SecurityPolicy id="shibboleth.SAML2AttributeQuerySecurityPolicy" xsi:type="security:SecurityPolicyType">
190         <security:Rule xsi:type="samlsec:Replay"/>
191         <security:Rule xsi:type="samlsec:IssueInstant"/>
192         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" />
193         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" />
194         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" />
195         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" />
196         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
197         <security:Rule xsi:type="security:MandatoryMessageAuthentication" />
198     </security:SecurityPolicy>
199     
200     <security:SecurityPolicy id="shibboleth.SAML2ArtifactResolutionSecurityPolicy" xsi:type="security:SecurityPolicyType">
201         <security:Rule xsi:type="samlsec:Replay"/>
202         <security:Rule xsi:type="samlsec:IssueInstant"/>
203         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" />
204         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" />
205         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" />
206         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" />
207         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
208         <security:Rule xsi:type="security:MandatoryMessageAuthentication" />
209     </security:SecurityPolicy>
210     
211     <security:SecurityPolicy id="shibboleth.SAML2SLOSecurityPolicy" xsi:type="security:SecurityPolicyType">
212         <security:Rule xsi:type="samlsec:Replay"/>
213         <security:Rule xsi:type="samlsec:IssueInstant"/>
214         <security:Rule xsi:type="samlsec:ProtocolWithXMLSignature" trustEngineRef="shibboleth.SignatureTrustEngine" />
215         <security:Rule xsi:type="samlsec:SAML2HTTPRedirectSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" />
216         <security:Rule xsi:type="samlsec:SAML2HTTPPostSimpleSign" trustEngineRef="shibboleth.SignatureTrustEngine" />
217         <security:Rule xsi:type="security:ClientCertAuth" trustEngineRef="shibboleth.CredentialTrustEngine" />
218         <security:Rule xsi:type="samlsec:MandatoryIssuer"/>
219         <security:Rule xsi:type="security:MandatoryMessageAuthentication" />
220     </security:SecurityPolicy>
221     
222 </RelyingPartyGroup>