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