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