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