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