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