fc826d660f4e2249fad7aedcbf0aa7be22c420bc
[shibboleth/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     clockSkew="180">
7
8     <!-- By default, in-memory StorageService, ReplayCache, and ArtifactMap are used. -->
9     <SessionCache type="StorageService" cacheAssertions="false"
10                   cacheTimeout="3600" inprocTimeout="900" cleanupInterval="900"/>
11
12     <!-- To customize behavior, map hostnames and path components to applicationId and other settings. -->
13     <RequestMapper type="Native">
14         <RequestMap applicationId="default">
15             <!--
16             The example requires a session for documents in /secure on the containing host with http and
17             https on the default ports. Note that the name and port in the <Host> elements MUST match
18             Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element
19             below.
20             -->
21             <Host name="sp.example.org">
22                 <Path name="secure" authType="shibboleth" requireSession="true"/>
23             </Host>
24             <!-- Example of a second vhost mapped to a different applicationId. -->
25             <!--
26             <Host name="admin.example.org" applicationId="admin" authType="shibboleth" requireSession="true"/>
27             -->
28         </RequestMap>
29     </RequestMapper>
30
31     <!--
32     The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined.
33     Resource requests are mapped by the RequestMapper to an applicationId that
34     points into to this section.
35     -->
36     <ApplicationDefaults id="default" policyId="default"
37         entityID="https://sp.example.org/shibboleth"
38         REMOTE_USER="eppn persistent-id targeted-id"
39         signing="false" encryption="false">
40
41         <!--
42         Controls session lifetimes, address checks, cookie handling, and the protocol handlers.
43         You MUST supply an effectively unique handlerURL value for each of your applications.
44         The value can be a relative path, a URL with no hostname (https:///path) or a full URL.
45         The system can compute a relative value based on the virtual host. Using handlerSSL="true"
46         will force the protocol to be https. You should also add a cookieProps setting of "; path=/; secure"
47         in that case. Note that while we default checkAddress to "false", this has a negative
48         impact on the security of the SP. Stealing cookies/sessions is much easier with this disabled.
49         -->
50         <Sessions lifetime="28800" timeout="3600" checkAddress="false"
51             handlerURL="/Shibboleth.sso" handlerSSL="false"
52             idpHistory="false" idpHistoryDays="7">
53             
54             <!--
55             SessionInitiators handle session requests and relay them to a Discovery page,
56             or to an IdP if possible. Automatic session setup will use the default or first
57             element (or requireSessionWith can specify a specific id to use).
58             -->
59
60             <!-- Default directs to a specific IdP (favoring SAML 2 over Shib 1). -->
61             <SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="Login"
62                     relayState="cookie" entityID="https://idp.example.org/shibboleth">
63                 <SessionInitiator type="SAML2" acsIndex="1" template="bindingTemplate.html"/>
64                 <SessionInitiator type="Shib1" acsIndex="5"/>
65                 <!--
66                 To allow for >1 IdP, remove entityID property from Chaining element and add
67                 *either* of the SAMLDS or WAYF handlers below:
68                 
69                 <SessionInitiator type="SAMLDS" URL="https://ds.example.org/DS/WAYF"/>
70                 <SessionInitiator type="WAYF" acsIndex="5" URL="https://wayf.example.org/WAYF"/>
71                 -->
72             </SessionInitiator>
73             
74             <!--
75             md:AssertionConsumerService locations handle specific SSO protocol bindings,
76             such as SAML 2.0 POST or SAML 1.1 Artifact. The isDefault and index attributes
77             are used when sessions are initiated to determine how to tell the IdP where and
78             how to return the response.
79             -->
80             <md:AssertionConsumerService Location="/SAML2/POST" index="1"
81                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
82             <md:AssertionConsumerService Location="/SAML2/POST-SimpleSign" index="2"
83                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"/>
84             <md:AssertionConsumerService Location="/SAML2/Artifact" index="3"
85                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
86             <md:AssertionConsumerService Location="/SAML2/ECP" index="4"
87                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"/>
88             <md:AssertionConsumerService Location="/SAML/POST" index="5"
89                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/>
90             <md:AssertionConsumerService Location="/SAML/Artifact" index="6"
91                 Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/>
92
93             <!-- LogoutInitiators enable SP-initiated local or global/single logout of sessions. -->
94             <LogoutInitiator type="Chaining" Location="/Logout" relayState="cookie">
95                 <LogoutInitiator type="SAML2" template="bindingTemplate.html"/>
96                 <LogoutInitiator type="Local"/>
97             </LogoutInitiator>
98
99             <!-- md:SingleLogoutService locations handle single logout (SLO) protocol messages. -->
100             <md:SingleLogoutService Location="/SLO/SOAP"
101                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
102             <md:SingleLogoutService Location="/SLO/Redirect" conf:template="bindingTemplate.html"
103                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
104             <md:SingleLogoutService Location="/SLO/POST" conf:template="bindingTemplate.html"
105                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
106             <md:SingleLogoutService Location="/SLO/Artifact" conf:template="bindingTemplate.html"
107                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
108
109             <!-- md:ManageNameIDService locations handle NameID management (NIM) protocol messages. -->
110             <md:ManageNameIDService Location="/NIM/SOAP"
111                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
112             <md:ManageNameIDService Location="/NIM/Redirect" conf:template="bindingTemplate.html"
113                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
114             <md:ManageNameIDService Location="/NIM/POST" conf:template="bindingTemplate.html"
115                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
116             <md:ManageNameIDService Location="/NIM/Artifact" conf:template="bindingTemplate.html"
117                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
118
119             <!--
120             md:ArtifactResolutionService locations resolve artifacts issued when using the
121             SAML 2.0 HTTP-Artifact binding on outgoing messages, generally uses SOAP.
122             -->
123             <md:ArtifactResolutionService Location="/Artifact/SOAP" index="1"
124                 Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
125
126             <!-- Extension service that generates "approximate" metadata based on SP configuration. -->
127             <Handler type="MetadataGenerator" Location="/Metadata" signing="false"/>
128
129             <!-- Status reporting service. -->
130             <Handler type="Status" Location="/Status" acl="127.0.0.1"/>
131
132             <!-- Session diagnostic service. -->
133             <Handler type="Session" Location="/Session" showAttributeValues="false"/>
134
135         </Sessions>
136
137         <!--
138         Allows overriding of error template filenames. You can also add attributes with values
139         that can be plugged into the templates.
140         -->
141         <Errors supportContact="root@localhost"
142             logoLocation="/shibboleth-sp/logo.jpg"
143             styleSheet="/shibboleth-sp/main.css"/>
144         
145         <!-- Uncomment and modify to tweak settings for specific IdPs or groups. -->
146         <!-- <RelyingParty Name="SpecialFederation" keyName="SpecialKey"/> -->
147
148         <!-- Chains together all your metadata sources. -->
149         <MetadataProvider type="Chaining">
150             <!-- Example of remotely supplied batch of signed metadata. -->
151             <!--
152             <MetadataProvider type="XML" uri="http://federation.org/federation-metadata.xml"
153                  backingFilePath="federation-metadata.xml" reloadInterval="7200">
154                <MetadataFilter type="RequireValidUntil" maxValidityInterval="2419200"/>
155                <MetadataFilter type="Signature" certificate="fedsigner.pem"/>
156             </MetadataProvider>
157             -->
158
159             <!-- Example of locally maintained metadata. -->
160             <!--
161             <MetadataProvider type="XML" file="partner-metadata.xml"/>
162             -->
163         </MetadataProvider>
164
165         <!-- Chain the two built-in trust engines together. -->
166         <TrustEngine type="Chaining">
167             <TrustEngine type="ExplicitKey"/>
168             <TrustEngine type="PKIX"/>
169         </TrustEngine>
170
171         <!-- Map to extract attributes from SAML assertions. -->
172         <AttributeExtractor type="XML" validate="true" path="attribute-map.xml"/>
173         
174         <!-- Use a SAML query if no attributes are supplied during SSO. -->
175         <AttributeResolver type="Query" subjectMatch="true"/>
176
177         <!-- Default filtering policy for recognized attributes, lets other data pass. -->
178         <AttributeFilter type="XML" validate="true" path="attribute-policy.xml"/>
179
180         <!-- Simple file-based resolver for using a single keypair. -->
181         <CredentialResolver type="File" key="sp-key.pem" certificate="sp-cert.pem"/>
182
183         <!-- Example of a second application (using a second vhost) that has a different entityID. -->
184         <!-- <ApplicationOverride id="admin" entityID="https://admin.example.org/shibboleth"/> -->
185
186     </ApplicationDefaults>
187     
188     <!-- Policies that determine how to process and authenticate runtime messages. -->
189     <SecurityPolicyProvider type="XML" validate="true" path="security-policy.xml"/>
190
191 </SPConfig>