Guess at some IdP settings.
[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="@-LIBEXECDIR-@/adfs.so" fatal="true"/>
16                         <Library path="@-LIBEXECDIR-@/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="@-LIBEXECDIR-@/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"
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
107                 disabled.
108                 -->
109                 <Sessions lifetime="28800" timeout="3600" checkAddress="false"
110                         handlerURL="/Shibboleth.sso" handlerSSL="false"
111                         exportLocation="http://localhost/Shibboleth.sso/GetAssertion"
112                         idpHistory="true" idpHistoryDays="7">
113                         
114                         <!--
115                         SessionInitiators handle session requests and relay them to a Discovery page,
116                         or to an IdP if possible. Automatic session setup will use the default or first
117                         element (or requireSessionWith can specify a specific id to use).
118                         -->
119
120                         <!-- Default example directs to a specific IdP's SSO service (favoring SAML 2 over Shib 1). -->
121                         <SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="idp.example.org"
122                                         relayState="cookie" entityID="https://idp.example.org/shibboleth">
123                                 <SessionInitiator type="SAML2" defaultACSIndex="1" template="@-PKGSYSCONFDIR-@/bindingTemplate.html"/>
124                                 <SessionInitiator type="Shib1" defaultACSIndex="4"/>
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="4"/>
131                                 <SessionInitiator type="WAYF" defaultACSIndex="4" URL="https://wayf.example.org/WAYF"/>
132                         </SessionInitiator>
133
134                         <!-- An example supporting the new-style of discovery service. -->
135                         <SessionInitiator type="Chaining" Location="/DS" id="DS" relayState="cookie">
136                                 <SessionInitiator type="SAML2" defaultACSIndex="1" template="@-PKGSYSCONFDIR-@/bindingTemplate.html"/>
137                                 <SessionInitiator type="Shib1" defaultACSIndex="4"/>
138                                 <SessionInitiator type="SAMLDS" URL="https://ds.example.org/DS"/>
139                         </SessionInitiator>
140                         
141                         <!--
142                         md:AssertionConsumerService locations handle specific SSO protocol bindings,
143                         such as SAML 2.0 POST or SAML 1.1 Artifact. The isDefault and index attributes
144                         are used when sessions are initiated to determine how to tell the IdP where and
145                         how to return the response.
146                         -->
147                         <md:AssertionConsumerService Location="/SAML2/POST" index="1"
148                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
149                         <md:AssertionConsumerService Location="/SAML2/POST-SimpleSign" index="2"
150                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"/>
151                         <md:AssertionConsumerService Location="/SAML2/Artifact" index="3"
152                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
153                         <md:AssertionConsumerService Location="/SAML/POST" index="4"
154                                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/>
155                         <md:AssertionConsumerService Location="/SAML/Artifact" index="5"
156                                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/>
157
158                         <!-- LogoutInitiators enable SP-initiated local or global/single logout of sessions. -->
159                         <LogoutInitiator type="Chaining" Location="/Logout">
160                                 <LogoutInitiator type="SAML2" template="@-PKGSYSCONFDIR-@/bindingTemplate.html"/>
161                                 <LogoutInitiator type="Local"/>
162                         </LogoutInitiator>
163
164                         <!-- md:SingleLogoutService locations handle single logout (SLO) protocol messages. -->
165                         <md:SingleLogoutService Location="/SLO/SOAP"
166                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
167                         <md:SingleLogoutService Location="/SLO/Redirect" conf:template="@-PKGSYSCONFDIR-@/bindingTemplate.html"
168                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
169                         <md:SingleLogoutService Location="/SLO/POST" conf:template="@-PKGSYSCONFDIR-@/bindingTemplate.html"
170                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
171                         <md:SingleLogoutService Location="/SLO/Artifact" conf:template="@-PKGSYSCONFDIR-@/bindingTemplate.html"
172                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
173
174                         <!--
175                         md:ArtifactResolutionService locations resolve artifacts issued when using the
176                         SAML 2.0 HTTP-Artifact binding on outgoing messages, generally uses SOAP.
177                         -->
178                         <md:ArtifactResolutionService Location="/Artifact/SOAP" index="1"
179                                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
180
181                 </Sessions>
182
183                 <!--
184                 You should customize these pages! You can add attributes with values that can be plugged
185                 into your templates. You can remove the access attribute to cause the module to return a
186                 standard 403 Forbidden error code if authorization fails, and then customize that condition
187                 using your web server.
188                 -->
189                 <Errors session="@-PKGSYSCONFDIR-@/sessionError.html"
190                         metadata="@-PKGSYSCONFDIR-@/metadataError.html"
191                         access="@-PKGSYSCONFDIR-@/accessError.html"
192                         ssl="@-PKGSYSCONFDIR-@/sslError.html"
193                         supportContact="root@localhost"
194                         logoLocation="/shibboleth-sp/logo.jpg"
195                         styleSheet="/shibboleth-sp/main.css"/>
196                 
197                 <!-- Configure handling of outgoing messages and SOAP authentication. -->
198                 <DefaultRelyingParty authType="TLS" artifactEndpointIndex="1" signing="front" encryption="front">
199                         <!-- Uncomment and modify to tweak settings for specific IdPs or groups. -->
200                         <!--
201                         <RelyingParty Name="SpecialFederation" keyName="SpecialKey"/>
202                         -->
203                 </DefaultRelyingParty>
204
205                 <!-- Chains together all your metadata sources. -->
206                 <MetadataProvider type="Chaining">
207                         <!-- Dummy metadata for private testing, delete for production deployments. -->
208                         <MetadataProvider type="XML" path="@-PKGSYSCONFDIR-@/example-metadata.xml"/>
209                 </MetadataProvider>
210
211                 <!-- Chain the two built-in trust engines together. -->
212                 <TrustEngine type="Chaining">
213                         <TrustEngine type="ExplicitKey"/>
214                         <TrustEngine type="PKIX"/>
215                 </TrustEngine>
216
217                 <!-- Map to extract attributes from SAML assertions. -->
218                 <AttributeExtractor type="XML" path="@-PKGSYSCONFDIR-@/attribute-map.xml"/>
219                 
220                 <!-- Use a SAML query if no attributes are supplied during SSO. -->
221                 <AttributeResolver type="Query"/>
222
223                 <!-- Default filtering policy for recognized attributes, lets other data pass. -->
224                 <AttributeFilter type="XML" path="@-PKGSYSCONFDIR-@/attribute-policy.xml"/>
225
226                 <!-- Simple file-based resolver for using a single keypair. -->
227                 <CredentialResolver type="File">
228                         <Key>
229                                 <Path>@-PKGSYSCONFDIR-@/sp-example.key</Path>
230                         </Key>
231                         <Certificate>
232                                 <Path>@-PKGSYSCONFDIR-@/sp-example.crt</Path>
233                         </Certificate>
234                 </CredentialResolver>
235
236                 <!-- Advanced resolver allowing for multiple keypairs. -->
237                 <!--
238                 <CredentialResolver type="Chaining">
239                         <CredentialResolver type="File">
240                                 <Key>
241                                         <Name>DefaultKey</Name>
242                                         <Path>@-PKGSYSCONFDIR-@/sp-example.key</Path>
243                                 </Key>
244                                 <Certificate>
245                                         <Path>@-PKGSYSCONFDIR-@/sp-example.crt</Path>
246                                 </Certificate>
247                         </CredentialResolver>
248                         <CredentialResolver type="File">
249                                 <Key>
250                                         <Name>SpecialKey</Name>
251                                         <Path>@-PKGSYSCONFDIR-@/special.key</Path>
252                                 </Key>
253                                 <Certificate>
254                                         <Path>@-PKGSYSCONFDIR-@/special.crt</Path>
255                                 </Certificate>
256                         </CredentialResolver>
257                 </CredentialResolver>
258                 -->
259         </Applications>
260         
261         <!-- Each policy defines a set of rules to use to secure SAML and SOAP messages. -->
262         <SecurityPolicies>
263                 <!-- The predefined policy handles SAML 1 and 2 protocols and permits signing and client TLS. -->
264                 <Policy id="default"
265                         validate="false"
266                         signedAssertions="false"
267                         requireConfidentiality="true"
268                         requireTransportAuth="true"
269                         chunkedEncoding="false"
270                         connectTimeout="15" timeout="30"
271                         >
272                         <Rule type="MessageFlow" checkReplay="true" expires="60"/>
273                         <Rule type="ClientCertAuth" errorFatal="true"/>
274                         <Rule type="XMLSigning" errorFatal="true"/>
275                         <Rule type="SimpleSigning" errorFatal="true"/>
276                 </Policy>
277         </SecurityPolicies>
278
279 </SPConfig>
280