Cleaner app override example.
[shibboleth/sp.git] / configs / shibboleth2.xml
1 <SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"
2     xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config"
3     xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
4     xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"    
5     xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
6     logger="syslog.logger" clockSkew="180">
7
8     <!-- The OutOfProcess section contains properties affecting the shibd daemon. -->
9     <OutOfProcess logger="shibd.logger">
10         <!--
11         <Extensions>
12             <Library path="odbc-store.so" fatal="true"/>
13         </Extensions>
14         -->
15     </OutOfProcess>
16     
17     <!-- The InProcess section conrains settings affecting web server modules/filters. -->
18     <InProcess logger="native.logger">
19         <ISAPI normalizeRequest="true">
20             <!--
21             Maps IIS Instance ID values to the host scheme/name/port/sslport. The name is
22             required so that the proper <Host> in the request map above is found without
23             having to cover every possible DNS/IP combination the user might enter.
24             The port and scheme can usually be omitted, so the HTTP request's port and
25             scheme will be used.
26             -->
27             <Site id="1" name="sp.example.org"/>
28         </ISAPI>
29     </InProcess>
30
31     <!-- Only one listener can be defined, to connect in process modules to shibd. -->
32     <UnixListener address="shibd.sock"/>
33     <!-- <TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/> -->
34     
35     <!-- This set of components stores sessions and other persistent data in daemon memory. -->
36     <StorageService type="Memory" id="mem" cleanupInterval="900"/>
37     <SessionCache type="StorageService" StorageService="mem" cacheTimeout="3600" inprocTimeout="900" cleanupInterval="900"/>
38     <ReplayCache StorageService="mem"/>
39     <ArtifactMap artifactTTL="180"/>
40
41     <!-- This set of components stores sessions and other persistent data in an ODBC database. -->
42     <!--
43     <StorageService type="ODBC" id="db" cleanupInterval="900">
44         <ConnectionString>
45         DRIVER=drivername;SERVER=dbserver;UID=shibboleth;PWD=password;DATABASE=shibboleth;APP=Shibboleth
46         </ConnectionString>
47     </StorageService>
48     <SessionCache type="StorageService" StorageService="db" cacheTimeout="3600" inprocTimeout="900" cleanupInterval="900"/>
49     <ReplayCache StorageService="db"/>
50     <ArtifactMap StorageService="db" artifactTTL="180"/>
51     -->
52
53     <!-- To customize behavior, map hostnames and path components to applicationId and other settings. -->
54     <RequestMapper type="Native">
55         <RequestMap applicationId="default">
56             <!--
57             The example requires a session for documents in /secure on the containing host with http and
58             https on the default ports. Note that the name and port in the <Host> elements MUST match
59             Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element
60             below.
61             -->
62             <Host name="sp.example.org">
63                 <Path name="secure" authType="shibboleth" requireSession="true"/>
64             </Host>
65             <!-- Example of a second vhost mapped to a different applicationId. -->
66             <!--
67             <Host name="admin.example.org" applicationId="admin" authType="shibboleth" requireSession="true"/>
68             -->
69         </RequestMap>
70     </RequestMapper>
71
72     <!--
73     The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined.
74     Resource requests are mapped by the RequestMapper to an applicationId that
75     points into to this section.
76     -->
77     <ApplicationDefaults id="default" policyId="default"
78         entityID="https://sp.example.org/shibboleth"
79         homeURL="https://sp.example.org/index.html"
80         REMOTE_USER="eppn persistent-id targeted-id"
81         signing="false" encryption="false"
82         >
83
84         <!--
85         Controls session lifetimes, address checks, cookie handling, and the protocol handlers.
86         You MUST supply an effectively unique handlerURL value for each of your applications.
87         The value can be a relative path, a URL with no hostname (https:///path) or a full URL.
88         The system can compute a relative value based on the virtual host. Using handlerSSL="true"
89         will force the protocol to be https. You should also add a cookieProps setting of "; path=/; secure"
90         in that case. Note that while we default checkAddress to "false", this has a negative
91         impact on the security of the SP. Stealing cookies/sessions is much easier with this disabled.
92         -->
93         <Sessions lifetime="28800" timeout="3600" checkAddress="false"
94             handlerURL="/Shibboleth.sso" handlerSSL="false"
95             exportLocation="http://localhost/Shibboleth.sso/GetAssertion"
96             idpHistory="false" idpHistoryDays="7">
97             
98             <!--
99             SessionInitiators handle session requests and relay them to a Discovery page,
100             or to an IdP if possible. Automatic session setup will use the default or first
101             element (or requireSessionWith can specify a specific id to use).
102             -->
103
104             <!-- Default example directs to a specific IdP's SSO service (favoring SAML 2 over Shib 1). -->
105             <SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="Intranet"
106                     relayState="cookie" entityID="https://idp.example.org/shibboleth">
107                 <SessionInitiator type="SAML2" defaultACSIndex="1" template="bindingTemplate.html"/>
108                 <SessionInitiator type="Shib1" defaultACSIndex="5"/>
109             </SessionInitiator>
110             
111             <!-- An example using an old-style WAYF, which means Shib 1 only unless an entityID is provided. -->
112             <SessionInitiator type="Chaining" Location="/WAYF" id="WAYF" relayState="cookie">
113                 <SessionInitiator type="SAML2" defaultACSIndex="1" template="bindingTemplate.html"/>
114                 <SessionInitiator type="Shib1" defaultACSIndex="5"/>
115                 <SessionInitiator type="WAYF" defaultACSIndex="5" URL="https://wayf.example.org/WAYF"/>
116             </SessionInitiator>
117
118             <!-- An example supporting the new-style of discovery service. -->
119             <SessionInitiator type="Chaining" Location="/DS" id="DS" relayState="cookie">
120                 <SessionInitiator type="SAML2" defaultACSIndex="1" template="bindingTemplate.html"/>
121                 <SessionInitiator type="Shib1" defaultACSIndex="5"/>
122                 <SessionInitiator type="SAMLDS" URL="https://ds.example.org/DS"/>
123             </SessionInitiator>
124             
125             <!--
126             md:AssertionConsumerService locations handle specific SSO protocol bindings,
127             such as SAML 2.0 POST or SAML 1.1 Artifact. The isDefault and index attributes
128             are used when sessions are initiated to determine how to tell the IdP where and
129             how to return the response.
130             -->
131             <md:AssertionConsumerService Location="/SAML2/POST" index="1"
132                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
133             <md:AssertionConsumerService Location="/SAML2/POST-SimpleSign" index="2"
134                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"/>
135             <md:AssertionConsumerService Location="/SAML2/Artifact" index="3"
136                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
137             <md:AssertionConsumerService Location="/SAML2/ECP" index="4"
138                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"/>
139             <md:AssertionConsumerService Location="/SAML/POST" index="5"
140                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/>
141             <md:AssertionConsumerService Location="/SAML/Artifact" index="6"
142                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/>
143
144             <!-- LogoutInitiators enable SP-initiated local or global/single logout of sessions. -->
145             <LogoutInitiator type="Chaining" Location="/Logout" relayState="cookie">
146                 <LogoutInitiator type="SAML2" template="bindingTemplate.html"/>
147                 <LogoutInitiator type="Local"/>
148             </LogoutInitiator>
149
150             <!-- md:SingleLogoutService locations handle single logout (SLO) protocol messages. -->
151             <md:SingleLogoutService Location="/SLO/SOAP"
152                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
153             <md:SingleLogoutService Location="/SLO/Redirect" conf:template="bindingTemplate.html"
154                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
155             <md:SingleLogoutService Location="/SLO/POST" conf:template="bindingTemplate.html"
156                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
157             <md:SingleLogoutService Location="/SLO/Artifact" conf:template="bindingTemplate.html"
158                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
159
160             <!-- md:ManageNameIDService locations handle NameID management (NIM) protocol messages. -->
161             <md:ManageNameIDService Location="/NIM/SOAP"
162                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
163             <md:ManageNameIDService Location="/NIM/Redirect" conf:template="bindingTemplate.html"
164                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
165             <md:ManageNameIDService Location="/NIM/POST" conf:template="bindingTemplate.html"
166                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
167             <md:ManageNameIDService Location="/NIM/Artifact" conf:template="bindingTemplate.html"
168                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
169
170             <!--
171             md:ArtifactResolutionService locations resolve artifacts issued when using the
172             SAML 2.0 HTTP-Artifact binding on outgoing messages, generally uses SOAP.
173             -->
174             <md:ArtifactResolutionService Location="/Artifact/SOAP" index="1"
175                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
176
177             <!-- Extension service that generates "approximate" metadata based on SP configuration. -->
178             <Handler type="MetadataGenerator" Location="/Metadata" signing="false"/>
179
180             <!-- Status reporting service. -->
181             <Handler type="Status" Location="/Status" acl="127.0.0.1"/>
182
183             <!-- Session diagnostic service. -->
184             <Handler type="Session" Location="/Session"/>
185
186         </Sessions>
187
188         <!--
189         You should customize these pages! You can add attributes with values that can be plugged
190         into your templates. You can remove the access attribute to cause the module to return a
191         standard 403 Forbidden error code if authorization fails, and then customize that condition
192         using your web server.
193         -->
194         <Errors session="sessionError.html"
195             metadata="metadataError.html"
196             access="accessError.html"
197             ssl="sslError.html"
198             localLogout="localLogout.html"
199             globalLogout="globalLogout.html"
200             supportContact="root@localhost"
201             logoLocation="/shibboleth-sp/logo.jpg"
202             styleSheet="/shibboleth-sp/main.css"/>
203         
204         <!-- Uncomment and modify to tweak settings for specific IdPs or groups. -->
205         <!-- <RelyingParty Name="SpecialFederation" keyName="SpecialKey"/> -->
206
207         <!-- Chains together all your metadata sources. -->
208         <MetadataProvider type="Chaining">
209             <!-- Example of remotely supplied batch of signed metadata. -->
210             <!--
211             <MetadataProvider type="XML" uri="http://federation.org/federation-metadata.xml"
212                  backingFilePath="federation-metadata.xml" reloadInterval="7200">
213                <SignatureMetadataFilter certificate="fedsigner.pem"/>
214             </MetadataProvider>
215             -->
216
217             <!-- Example of locally maintained metadata. -->
218             <!--
219             <MetadataProvider type="XML" file="partner-metadata.xml"/>
220             -->
221         </MetadataProvider>
222
223         <!-- Chain the two built-in trust engines together. -->
224         <TrustEngine type="Chaining">
225             <TrustEngine type="ExplicitKey"/>
226             <TrustEngine type="PKIX"/>
227         </TrustEngine>
228
229         <!-- Map to extract attributes from SAML assertions. -->
230         <AttributeExtractor type="XML" path="attribute-map.xml"/>
231         
232         <!-- Use a SAML query if no attributes are supplied during SSO. -->
233         <AttributeResolver type="Query"/>
234
235         <!-- Default filtering policy for recognized attributes, lets other data pass. -->
236         <AttributeFilter type="XML" path="attribute-policy.xml"/>
237
238         <!-- Simple file-based resolver for using a single keypair. -->
239         <CredentialResolver type="File" key="sp-key.pem" certificate="sp-cert.pem"/>
240
241         <!-- Example of a second application (using a second vhost) that has a different entityID. -->
242         <!-- <ApplicationOverride id="admin" entityID="https://admin.example.org/shibboleth"/> -->
243
244     </ApplicationDefaults>
245     
246     <!-- Each policy defines a set of rules to use to secure messages. -->
247     <SecurityPolicies>
248         <!-- The predefined policy enforces replay/freshness and permits signing and client TLS. -->
249         <Policy id="default" validate="false">
250             <Rule type="MessageFlow" checkReplay="true" expires="60"/>
251             <Rule type="ClientCertAuth" errorFatal="true"/>
252             <Rule type="XMLSigning" errorFatal="true"/>
253             <Rule type="SimpleSigning" errorFatal="true"/>
254         </Policy>
255     </SecurityPolicies>
256
257 </SPConfig>
258