Final? rename of SHAR/SHIRE sections
[shibboleth/sp.git] / configs / shibboleth.xml.in
1 <SPConfig xmlns="urn:mace:shibboleth:target:config:1.0"
2         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3         xsi:schemaLocation="urn:mace:shibboleth:target:config:1.0 @-PKGXMLDIR-@/shibboleth-targetconfig-1.0.xsd"
4         logger="@-PKGSYSCONFDIR-@/shibboleth.logger" clockSkew="180">
5
6         <!-- These extensions are "universal", loaded by all Shibboleth-aware processes. -->
7         <Extensions>
8                 <Library path="@-LIBEXECDIR-@/xmlproviders.so" fatal="true"/>
9         </Extensions>
10
11         <!-- The OutOfProcess section pertains to components that rely on a single long-lived process. -->
12         <OutOfProcess logger="@-PKGSYSCONFDIR-@/shibd.logger">
13                 
14                 <!--
15                 <Extensions>
16                         <Library path="@-LIBEXECDIR-@/shib-mysql-ccache.so" fatal="false"/>
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                 See deploy guide for details, but:
27                         cacheTimeout - how long before expired sessions are purged from the cache
28                         AATimeout - how long to wait for an AA to respond
29                         AAConnectTimeout - how long to wait while connecting to an AA
30                         defaultLifetime - if attributes come back without guidance, how long should they last?
31                         strictValidity - if we have expired attrs, and can't get new ones, keep using them?
32                         propagateErrors - suppress errors while getting attrs or let user see them?
33                         retryInterval - if propagateErrors is false and query fails, how long to wait before trying again
34                 Only one session cache can be defined.
35                 -->
36                 <MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
37                         defaultLifetime="1800" retryInterval="300" strictValidity="false" propagateErrors="false"/>
38                 <!--
39                 <MySQLSessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
40                         defaultLifetime="1800" retryInterval="300" strictValidity="false" propagateErrors="false"
41                         mysqlTimeout="14400" storeAttributes="false">
42                         <Argument>&#x2D;&#x2D;language=@-PREFIX-@/share/english</Argument>
43                         <Argument>&#x2D;&#x2D;datadir=@-PREFIX-@/data</Argument>
44                 </MySQLSessionCache>
45                 -->
46         
47                 <!-- Default replay cache is in-memory. -->
48                 <!--
49                 <MySQLReplayCache>
50                         <Argument>&#x2D;&#x2D;language=@-PREFIX-@/share/english</Argument>
51                         <Argument>&#x2D;&#x2D;datadir=@-PREFIX-@/data</Argument>
52                 </MySQLReplayCache>
53                 -->
54         </OutOfProcess>
55     
56         <!-- The InProcess section pertains to components that support transient process pools like most web servers. -->
57         <InProcess logger="@-PKGSYSCONFDIR-@/native.logger" localRelayState="true">
58                 <!--
59                 To customize behavior, map hostnames and path components to applicationId and other settings.
60                 The following provider types are available with the delivered code:
61                         type="edu.internet2.middleware.shibboleth.sp.provider.NativeRequestMapProvider"
62                                 - Web-server-specific plugin that allows native commands (like Apache's
63                                         ShibRequireSession) to override or supplement the XML syntax. The Apache
64                                         version also supplies an htaccess authz plugin for all content.
65
66                         type="edu.internet2.middleware.shibboleth.sp.provider.XMLRequestMapProvider"
67                                 - portable plugin that does not support the older Apache-specific commands and works
68                                         the same on all web platforms, this plugin does NOT support htaccess files
69                                         for authz unless you also place an <htaccess/> element somewhere in the map
70
71                         By default, the "native" plugin (the first one above) is used, since it matches older
72                         behavior on both Apache and IIS.
73                 -->
74                 <RequestMapProvider type="edu.internet2.middleware.shibboleth.sp.provider.NativeRequestMapProvider">
75                         <RequestMap applicationId="default">
76                                 <!--
77                                 This requires a session for documents in /secure on the containing host with http and
78                                 https on the default ports. Note that the name and port in the <Host> elements MUST match
79                                 Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element
80                                 below.
81                                 -->
82                                 <Host name="sp.example.org">
83                                         <Path name="secure" authType="shibboleth" requireSession="true" exportAssertion="true">
84                                                 <!-- Example shows the folder "/secure/admin" assigned to a separate <Application> -->
85                                                 <!--
86                                                 <Path name="admin" applicationId="foo-admin"/>
87                                                 -->
88                                         </Path>
89                                 </Host>
90                         </RequestMap>
91                 </RequestMapProvider>
92                 
93                 <Implementation>
94                         <ISAPI normalizeRequest="true">
95                                 <!--
96                                 Maps IIS Instance ID values to the host scheme/name/port/sslport. The name is
97                                 required so that the proper <Host> in the request map above is found without
98                                 having to cover every possible DNS/IP combination the user might enter.
99                                 The port and scheme can usually be omitted, so the HTTP request's port and
100                                 scheme will be used.
101                                 
102                                 <Alias> elements can specify alternate permissible client-specified server names.
103                                 If a client request uses such a name, normalized redirects will use it, but the
104                                 request map processing is still based on the default name attribute for the
105                                 site. This reduces duplicate data entry in the request map for every legal
106                                 hostname a site might permit. In the example below, only sp.example.org needs a
107                                 <Host> element in the map, but spalias.example.org could be used by a client
108                                 and those requests will map to sp.example.org for configuration settings.
109                                 -->
110                                 <Site id="1" name="sp.example.org">
111                                         <Alias>spalias.example.org</Alias>
112                                 </Site>
113                         </ISAPI>
114                 </Implementation>
115         </InProcess>
116
117         <!--
118         The Applications section is where most of Shibboleth's SAML bits are defined.
119         Resource requests are mapped in the Local section into an applicationId that
120         points into to this section.
121         -->
122         <Applications id="default" providerId="https://sp.example.org/shibboleth"
123                 homeURL="https://sp.example.org/index.html"
124                 xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
125                 xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata">
126
127                 <!--
128                 Controls session lifetimes, address checks, cookie handling, and the protocol handlers.
129                 You MUST supply an effectively unique handlerURL value for each of your applications.
130                 The value can be a relative path, a URL with no hostname (https:///path) or a full URL.
131                 The system can compute a relative value based on the virtual host. Using handlerSSL="true"
132                 will force the protocol to be https. You should also add a cookieProps setting of "; path=/; secure"
133                 in that case. Note that while we default checkAddress to "false", this has a negative
134                 impact on the security of the SP. Stealing cookies/sessions is much easier with this
135                 disabled.
136                 -->
137                 <Sessions lifetime="7200" timeout="3600" checkAddress="false"
138                         handlerURL="/Shibboleth.sso" handlerSSL="false" idpHistory="true" idpHistoryDays="7">
139                         
140                         <!--
141                         SessionInitiators handle session requests and relay them to a WAYF or directly
142                         to an IdP, if possible. Automatic session setup will use the default or first
143                         element (or requireSessionWith can specify a specific id to use). Lazy sessions
144                         can be started with any initiator by redirecting to it. The only Binding supported
145                         is the "urn:mace:shibboleth:sp:1.3:SessionInit" lazy session profile using query
146                         string parameters:
147                          *  target      the resource to direct back to later (or homeURL will be used)
148                          *  acsIndex    optional index of an ACS to use on the way back in
149                          *  providerId  optional direct invocation of a specific IdP
150                         -->
151                         
152                         <!-- This default example directs users to a specific IdP's SSO service. -->
153                         <SessionInitiator isDefault="true" id="example" Location="/WAYF/idp.example.org"
154                                 Binding="urn:mace:shibboleth:sp:1.3:SessionInit"
155                                 wayfURL="https://idp.example.org/shibboleth-idp/SSO"
156                                 wayfBinding="urn:mace:shibboleth:1.0:profiles:AuthnRequest"/>
157                                 
158                         <!-- This example directs users to a specific federation's WAYF service. -->
159                         <SessionInitiator id="IQ" Location="/WAYF/InQueue"
160                                 Binding="urn:mace:shibboleth:sp:1.3:SessionInit"
161                                 wayfURL="https://wayf.internet2.edu/InQueue/WAYF"
162                                 wayfBinding="urn:mace:shibboleth:1.0:profiles:AuthnRequest"/>
163                         
164                         <!--
165                         md:AssertionConsumerService elements replace the old shireURL function with an
166                         explicit handler for particular profiles, such as SAML 1.1 POST or Artifact.
167                         The isDefault and index attributes are used when sessions are initiated
168                         to determine how to tell the IdP where and how to return the response.
169                         -->
170                         <md:AssertionConsumerService Location="/SAML/POST" isDefault="true" index="1"
171                                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/>
172                         <md:AssertionConsumerService Location="/SAML/Artifact" index="2"
173                                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/>
174                         
175                         <!--
176                         md:SingleLogoutService elements are mostly a placeholder for 2.0, but a simple
177                         cookie-clearing option with a ResponseLocation or a return URL parameter is
178                         supported via the "urn:mace:shibboleth:sp:1.3:Logout" Binding value.
179                         -->
180                         <md:SingleLogoutService Location="/Logout" Binding="urn:mace:shibboleth:sp:1.3:Logout"/>
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                         rm="@-PKGSYSCONFDIR-@/rmError.html"
193                         access="@-PKGSYSCONFDIR-@/accessError.html"
194                         supportContact="root@localhost"
195                         logoLocation="/shibboleth-sp/logo.jpg"
196                         styleSheet="/shibboleth-sp/main.css"/>
197
198                 <!-- Indicates what credentials to use when communicating -->
199                 <CredentialUse TLS="defcreds" Signing="defcreds">
200                         <!-- RelyingParty elements can customize credentials for specific IdPs/sets. -->
201                         <!--
202                         <RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/>
203                         -->
204                 </CredentialUse>
205                         
206                 <!-- Use designators to request specific attributes or none to ask for all -->
207                 <!--
208                 <saml:AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"
209                         AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/>
210                 -->
211
212                 <!-- AAP can be inline or in a separate file -->
213                 <AAPProvider type="edu.internet2.middleware.shibboleth.aap.provider.XMLAAP" uri="@-PKGSYSCONFDIR-@/AAP.xml"/>
214                 
215                 <!-- Operational config consists of metadata and trust providers. Can be external or inline. -->
216
217                 <!-- Dummy metadata for private testing, delete for production deployments. -->
218                 <MetadataProvider type="edu.internet2.middleware.shibboleth.metadata.provider.XMLMetadata"
219                         uri="@-PKGSYSCONFDIR-@/example-metadata.xml"/>
220
221                 <!-- InQueue pilot federation, delete for production deployments. -->
222                 <MetadataProvider type="edu.internet2.middleware.shibboleth.metadata.provider.XMLMetadata"
223                         uri="@-PKGSYSCONFDIR-@/IQ-metadata.xml"/>
224                 
225                 <!-- The standard trust provider supports SAMLv2 metadata with path validation extensions. -->
226                 <TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.ShibbolethTrust"/>
227                                         
228                 <!--
229                 Zero or more SAML Audience condition matches (mainly for Shib 1.1 compatibility).
230                 If you get "policy mismatch errors, you probably need to supply metadata about
231                 your SP to the IdP if it's running 1.2. Adding an element here is only a partial fix.
232                 -->
233                 <saml:Audience>urn:mace:inqueue</saml:Audience>
234                 
235                 <!--
236                 You can customize behavior of specific applications here. The default elements inside the
237                 outer <Applications> element generally have to be overridden in an all or nothing fashion.
238                 That is, if you supply a <Sessions> or <Errors> override, you MUST include all attributes
239                 you want to apply, as they will not be inherited. Similarly, if you specify an element such as
240                 <MetadataProvider>, it is not additive with the defaults, but replaces them.
241                 
242                 Note that each application must have a handlerURL that maps uniquely to it and no other
243                 application in the <RequestMap>. Otherwise no sessions will reach the application.
244                 If each application lives on its own vhost, then a single handler at "/Shibboleth.sso"
245                 is sufficient, since the hostname will distinguish the application.
246                 
247                 The example below shows a special application that requires use of SSL when establishing
248                 sessions, restricts the session cookie to SSL and a specific folder, and inherits most other
249                 behavior except that it requests only EPPN from the origin instead of asking for all attributes.
250                 Note that it will inherit all of the handler endpoints defined for the default application
251                 but will append them to the handlerURL defined here.
252                 -->
253                 <!-- 
254                 <Application id="foo-admin">
255                         <Sessions lifetime="7200" timeout="3600" checkAddress="true"
256                                 handlerURL="/secure/admin/Shibboleth.sso" handlerSSL="true"
257                                 cookieProps="; path=/secure/admin; secure"/>
258                         <saml:AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonPrincipalName"
259                                 AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/>
260                 </Application>
261                 -->
262
263         </Applications>
264         
265         <!-- Define all the private keys and certificates here that you reference from <CredentialUse>. -->
266         <CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials">
267                 <Credentials xmlns="urn:mace:shibboleth:credentials:1.0">
268                         <FileResolver Id="defcreds">
269                                 <Key>
270                                         <Path>@-PKGSYSCONFDIR-@/sp-example.key</Path>
271                                 </Key>
272                                 <Certificate>
273                                         <Path>@-PKGSYSCONFDIR-@/sp-example.crt</Path>
274                                 </Certificate>
275                         </FileResolver>
276                         
277                         <!--
278                         Mostly you can define a single keypair above, but you can define and name a second
279                         keypair to be used only in specific cases and then specify when to use it inside a
280                         <CredentialUse> element.
281                         -->
282                         <!--
283                         <FileResolver Id="inqueuecreds">
284                                 <Key>
285                                         <Path>@-PKGSYSCONFDIR-@/inqueue.key</Path>
286                                 </Key>
287                                 <Certificate>
288                                         <Path>@-PKGSYSCONFDIR-@/inqueue.crt</Path>
289                                 </Certificate>
290                         </FileResolver>
291                         -->
292                 </Credentials>
293         </CredentialsProvider>
294
295         <!-- Specialized attribute handling for cases with complex syntax. -->
296         <AttributeFactory AttributeName="urn:oid:1.3.6.1.4.1.5923.1.1.1.10"
297                 type="edu.internet2.middleware.shibboleth.common.provider.TargetedIDFactory"/>
298
299 </SPConfig>
300