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