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