Auto-wrap chained Application plugins, relax order child elements, add some logging.
[shibboleth/sp.git] / configs / example-shibboleth2.xml
1 <SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"\r
2     xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config"\r
3     xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"\r
4     xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"    \r
5     xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"\r
6     logger="syslog.logger" clockSkew="180">\r
7 \r
8     <!-- The OutOfProcess section contains properties affecting the shibd daemon. -->\r
9     <OutOfProcess logger="shibd.logger">\r
10         <!--\r
11         <Extensions>\r
12             <Library path="odbc-store.so" fatal="true"/>\r
13         </Extensions>\r
14         -->\r
15     </OutOfProcess>\r
16 \r
17     <!--\r
18     The InProcess section contains settings affecting web server modules.\r
19     Required for IIS, but can be removed when using other web servers.\r
20     -->\r
21     <InProcess logger="native.logger">\r
22         <ISAPI normalizeRequest="true" safeHeaderNames="true">\r
23             <!--\r
24             Maps IIS Instance ID values to the host scheme/name/port. The name is\r
25             required so that the proper <Host> in the request map above is found without\r
26             having to cover every possible DNS/IP combination the user might enter.\r
27             -->\r
28             <Site id="1" name="sp.example.org"/>\r
29             <!--\r
30             When the port and scheme are omitted, the HTTP request's port and scheme are used.\r
31             If these are wrong because of virtualization, they can be explicitly set here to\r
32             ensure proper redirect generation.\r
33             -->\r
34             <!--\r
35             <Site id="42" name="virtual.example.org" scheme="https" port="443"/>\r
36             -->\r
37         </ISAPI>\r
38     </InProcess>\r
39     \r
40     <!-- Only one listener can be defined, to connect in-process modules to shibd. -->\r
41     <UnixListener address="shibd.sock"/>\r
42     <!-- <TCPListener address="127.0.0.1" port="1600" acl="127.0.0.1"/> -->\r
43     \r
44     <!-- This set of components stores sessions and other persistent data in daemon memory. -->\r
45     <StorageService type="Memory" id="mem" cleanupInterval="900"/>\r
46     <SessionCache type="StorageService" StorageService="mem" cacheAssertions="false"\r
47                   cacheAllowance="900" inprocTimeout="900" cleanupInterval="900"/>\r
48     <ReplayCache StorageService="mem"/>\r
49     <ArtifactMap artifactTTL="180"/>\r
50 \r
51     <!-- This set of components stores sessions and other persistent data in an ODBC database. -->\r
52     <!--\r
53     <StorageService type="ODBC" id="db" cleanupInterval="900">\r
54         <ConnectionString>\r
55         DRIVER=drivername;SERVER=dbserver;UID=shibboleth;PWD=password;DATABASE=shibboleth;APP=Shibboleth\r
56         </ConnectionString>\r
57     </StorageService>\r
58     <SessionCache type="StorageService" StorageService="db" cacheAssertions="false"\r
59                   cacheTimeout="3600" inprocTimeout="900" cleanupInterval="900"/>\r
60     <ReplayCache StorageService="db"/>\r
61     <ArtifactMap StorageService="db" artifactTTL="180"/>\r
62     -->\r
63 \r
64     <!--\r
65     To customize behavior for specific resources on Apache, and to link vhosts or\r
66     resources to ApplicationOverride settings below, use web server options/commands.\r
67     See https://spaces.internet2.edu/display/SHIB2/NativeSPConfigurationElements for help.\r
68     \r
69     For examples with the RequestMap XML syntax instead, see the example-shibboleth2.xml\r
70     file, and the https://spaces.internet2.edu/display/SHIB2/NativeSPRequestMapHowTo topic.\r
71     -->\r
72     <RequestMapper type="Native">\r
73         <RequestMap>\r
74             <!--\r
75             The example requires a session for documents in /secure on the containing host with http and\r
76             https on the default ports. Note that the name and port in the <Host> elements MUST match\r
77             Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element above.\r
78             -->\r
79             <Host name="sp.example.org">\r
80                 <Path name="secure" authType="shibboleth" requireSession="true"/>\r
81             </Host>\r
82             <!-- Example of a second vhost mapped to a different applicationId. -->\r
83             <!--\r
84             <Host name="admin.example.org" applicationId="admin" authType="shibboleth" requireSession="true"/>\r
85             -->\r
86         </RequestMap>\r
87     </RequestMapper>\r
88 \r
89     <!--\r
90     The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined.\r
91     Resource requests are mapped by the RequestMapper to an applicationId that\r
92     points into to this section (or to the defaults here).\r
93     -->\r
94     <ApplicationDefaults entityID="https://sp.example.org/shibboleth"\r
95                          REMOTE_USER="eppn persistent-id targeted-id"\r
96                          signing="false" encryption="false">\r
97 \r
98         <!--\r
99         Controls session lifetimes, address checks, cookie handling, and the protocol handlers.\r
100         You MUST supply an effectively unique handlerURL value for each of your applications.\r
101         The value defaults to /Shibboleth.sso, and should be a relative path, with the SP computing\r
102         a relative value based on the virtual host. Using handlerSSL="true", the default, will force\r
103         the protocol to be https. You should also add a cookieProps setting of "; path=/; secure"\r
104         in that case. Note that while we default checkAddress to "false", this has a negative\r
105         impact on the security of the SP. Stealing cookies/sessions is much easier with this disabled.\r
106         -->\r
107         <Sessions lifetime="28800" timeout="3600" checkAddress="false"\r
108             handlerURL="/Shibboleth.sso" handlerSSL="false" relayState="ss:mem"\r
109             exportLocation="http://localhost/Shibboleth.sso/GetAssertion" exportACL="127.0.0.1"\r
110             idpHistory="false" idpHistoryDays="7">\r
111 \r
112             <!--\r
113             The "stripped down" files use the shorthand syntax for configuring handlers.\r
114             This uses the old "every handler specified directly" syntax. You can replace\r
115             or supplement the new syntax following these examples.\r
116             -->\r
117           \r
118             <!--\r
119             SessionInitiators handle session requests and relay them to a Discovery page,\r
120             or to an IdP if possible. Automatic session setup will use the default or first\r
121             element (or requireSessionWith can specify a specific id to use).\r
122             -->\r
123 \r
124             <!-- Default directs to a specific IdP (favoring SAML 2 over Shib 1). -->\r
125             <SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="Login"\r
126                               entityID="https://idp.example.org/shibboleth">\r
127               \r
128                 <SessionInitiator type="SAML2" template="bindingTemplate.html"/>\r
129                 <SessionInitiator type="Shib1"/>\r
130                 <!--\r
131                 To allow for >1 IdP, remove entityID property from Chaining element and add\r
132                 *either* of the SAMLDS or WAYF handlers below:\r
133                 \r
134                 <SessionInitiator type="SAMLDS" URL="https://ds.example.org/DS/WAYF"/>\r
135                 <SessionInitiator type="WAYF" URL="https://wayf.example.org/WAYF"/>\r
136                 -->\r
137             </SessionInitiator>\r
138             \r
139             <!--\r
140             md:AssertionConsumerService locations handle specific SSO protocol bindings,\r
141             such as SAML 2.0 POST or SAML 1.1 Artifact. The isDefault and index attributes\r
142             are used when sessions are initiated to determine how to tell the IdP where and\r
143             how to return the response.\r
144             -->\r
145             <md:AssertionConsumerService Location="/SAML2/POST" index="1"\r
146                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>\r
147             <md:AssertionConsumerService Location="/SAML2/POST-SimpleSign" index="2"\r
148                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"/>\r
149             <md:AssertionConsumerService Location="/SAML2/Artifact" index="3"\r
150                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>\r
151             <md:AssertionConsumerService Location="/SAML2/ECP" index="4"\r
152                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"/>\r
153             <md:AssertionConsumerService Location="/SAML/POST" index="5"\r
154                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/>\r
155             <md:AssertionConsumerService Location="/SAML/Artifact" index="6"\r
156                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/>\r
157 \r
158             <!-- LogoutInitiators enable SP-initiated local or global/single logout of sessions. -->\r
159             <LogoutInitiator type="Chaining" Location="/Logout">\r
160                 <LogoutInitiator type="SAML2" template="bindingTemplate.html"/>\r
161                 <LogoutInitiator type="Local"/>\r
162             </LogoutInitiator>\r
163 \r
164             <!-- md:SingleLogoutService locations handle single logout (SLO) protocol messages. -->\r
165             <md:SingleLogoutService Location="/SLO/SOAP"\r
166                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>\r
167             <md:SingleLogoutService Location="/SLO/Redirect" conf:template="bindingTemplate.html"\r
168                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>\r
169             <md:SingleLogoutService Location="/SLO/POST" conf:template="bindingTemplate.html"\r
170                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>\r
171             <md:SingleLogoutService Location="/SLO/Artifact" conf:template="bindingTemplate.html"\r
172                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>\r
173 \r
174             <!-- md:ManageNameIDService locations handle NameID management (NIM) protocol messages. -->\r
175             <md:ManageNameIDService Location="/NIM/SOAP"\r
176                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>\r
177             <md:ManageNameIDService Location="/NIM/Redirect" conf:template="bindingTemplate.html"\r
178                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>\r
179             <md:ManageNameIDService Location="/NIM/POST" conf:template="bindingTemplate.html"\r
180                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>\r
181             <md:ManageNameIDService Location="/NIM/Artifact" conf:template="bindingTemplate.html"\r
182                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>\r
183 \r
184             <!--\r
185             md:ArtifactResolutionService locations resolve artifacts issued when using the\r
186             SAML 2.0 HTTP-Artifact binding on outgoing messages, generally uses SOAP.\r
187             -->\r
188             <md:ArtifactResolutionService Location="/Artifact/SOAP" index="1"\r
189                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>\r
190 \r
191             <!-- Extension service that generates "approximate" metadata based on SP configuration. -->\r
192             <Handler type="MetadataGenerator" Location="/Metadata" signing="false"/>\r
193 \r
194             <!-- Status reporting service. -->\r
195             <Handler type="Status" Location="/Status" acl="127.0.0.1"/>\r
196 \r
197             <!-- Session diagnostic service. -->\r
198             <Handler type="Session" Location="/Session" showAttributeValues="false"/>\r
199 \r
200         </Sessions>\r
201 \r
202         <!--\r
203         Allows overriding of error template filenames. You can also add attributes with values\r
204         that can be plugged into the templates.\r
205         -->\r
206         <Errors supportContact="root@localhost"\r
207             logoLocation="/shibboleth-sp/logo.jpg"\r
208             styleSheet="/shibboleth-sp/main.css"/>\r
209         \r
210         <!--\r
211         Uncomment and modify to tweak settings for specific IdPs or groups. Settings here\r
212         generally match those allowed by the <ApplicationDefaults> element.\r
213         -->\r
214         <!--\r
215         <RelyingParty Name="SpecialFederation" keyName="SpecialKey"/>\r
216         -->\r
217 \r
218         <!-- Example of remotely supplied batch of signed metadata. -->\r
219         <!--\r
220         <MetadataProvider type="XML" uri="http://federation.org/federation-metadata.xml"\r
221               backingFilePath="federation-metadata.xml" reloadInterval="7200">\r
222             <MetadataFilter type="RequireValidUntil" maxValidityInterval="2419200"/>\r
223             <MetadataFilter type="Signature" certificate="fedsigner.pem"/>\r
224         </MetadataProvider>\r
225         -->\r
226 \r
227         <!-- Example of locally maintained metadata. -->\r
228         <!--\r
229         <MetadataProvider type="XML" file="partner-metadata.xml"/>\r
230         -->\r
231 \r
232         <!-- TrustEngines run in order to evaluate peer keys and certificates. -->\r
233         <TrustEngine type="ExplicitKey"/>\r
234         <TrustEngine type="PKIX"/>\r
235 \r
236         <!-- Map to extract attributes from SAML assertions. -->\r
237         <AttributeExtractor type="XML" validate="true" path="attribute-map.xml"/>\r
238         \r
239         <!-- Use a SAML query if no attributes are supplied during SSO. -->\r
240         <AttributeResolver type="Query" subjectMatch="true"/>\r
241 \r
242         <!-- Default filtering policy for recognized attributes, lets other data pass. -->\r
243         <AttributeFilter type="XML" validate="true" path="attribute-policy.xml"/>\r
244 \r
245         <!-- Simple file-based resolver for using a single keypair. -->\r
246         <CredentialResolver type="File" key="sp-key.pem" certificate="sp-cert.pem"/>\r
247 \r
248         <!--\r
249         The default settings can be overridden by creating ApplicationOverride elements (see\r
250         the https://spaces.internet2.edu/display/SHIB2/NativeSPApplicationOverride topic).\r
251         Resource requests are mapped by web server commands, or the RequestMapper, to an\r
252         applicationId setting.\r
253         \r
254         Example of a second application (for a second vhost) that has a different entityID.\r
255         Resources on the vhost would map to an applicationId of "admin":\r
256         -->\r
257         <!--\r
258         <ApplicationOverride id="admin" entityID="https://admin.example.org/shibboleth"/>\r
259         -->\r
260     </ApplicationDefaults>\r
261     \r
262     <!-- Policies that determine how to process and authenticate runtime messages. -->\r
263     <SecurityPolicyProvider type="XML" validate="true" path="security-policy.xml"/>\r
264 \r
265     <!-- Low-level configuration about protocols and bindings available for use. -->\r
266     <ProtocolProvider type="XML" validate="true" reloadChanges="false" path="protocols.xml"/>\r
267 \r
268 </SPConfig>\r