*** empty log message ***
[shibboleth/sp.git] / doc / DEPLOY-GUIDE-TARGET.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3
4 <head>
5 <title>Shibboleth Target Deployment Guide</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <style type="text/css">
8
9 html
10 {       
11 background-color: #FFFFFF;
12 color: #000000;
13 margin: .5em;
14 }
15 a:visited
16 {
17 color: #990000;
18 }
19 a:link
20 {
21 color: #990000;
22 }
23 a:active
24 {
25 color: #440000;
26 }
27 a.fixedlink:visited
28 {
29 font-family: monospace;
30 font-size: 90%;
31 color: #121212;
32 text-decoration: none;
33 }
34 a.fixedlink:link
35 {
36 font-family: monospace;
37 font-size: 90%;
38 color: #121212;
39 text-decoration: none;
40 }
41 a.fixedlink:active
42 {
43 font-family: monospace;
44 font-size: 90%;
45 color: #121212;
46 text-decoration: none;
47 }
48 dl
49 {
50 border-width:2px; background-color: #DDDDDD;
51 background-image: url('none');
52 margin: 5px;
53 padding: 0px;
54 border-style: solid;
55 }
56 dt
57 {
58 background-color: #DDDDDD;
59 background-image: url('none');
60 margin: 1px;
61 padding: 1px
62 }
63 dd
64 {
65 background-color: #DDDDDD;
66 background-image: url('none');
67 margin: 0px;
68 padding: 1px
69 }
70 .attribute
71 {
72 font-size: 115%;
73 font-color: #000000;
74 text-align: left;
75 background-color: #DDDDDD;
76 border: 1px inset black;
77 background-image: url('none');
78 margin: 0px;
79 padding: 2px
80 }
81 .attributeopt
82 {
83 font-size: 115%;
84 font-color: #000000;
85 text-align: left;
86 background-color: #EEEEEE;
87 border: 1px inset black;
88 background-image: url('none');
89 margin: 0px;
90 padding: 2px
91 }
92 .value
93 {
94 font-color: #000000;
95 text-align: left;
96 background-color: #EEEEEE;
97 background-image: url('none');
98 padding-top: 0em;
99 padding-bottom: 0.5em;
100 padding-right: 1em;
101 padding-left: 5em;
102 border-bottom-width: none;
103 border-top-width: none;
104 border-left-width: 1px;
105 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
106 }
107 .mandatory
108 {
109 font-color: #000000;
110 background-color: #FFCCFF;
111 }
112 .demo
113 {
114 background-color: #EEEEEE;
115 padding: 3px;
116 }
117 .fixed
118 {
119 font-family: monospace;
120 font-size: 90%;
121 font-color: #121212;
122 }
123 .feature
124 {
125 color: #00FF00
126 }
127
128     </style>
129 </head>
130
131 <body link="red" vlink="red" alink="black" bgcolor="white">
132
133 <center>
134 <h2>Shibboleth Target Deployment Guide</h2>
135 </center>
136 <p>Shibboleth Target Deployment Guide<br>
137 Shibboleth Version 1.2<br />
138 May 10, 2004<br />
139 <h3>This version of the deploy guide is for Shibboleth v1.2. For documentation 
140 related to prior versions of Shibboleth, please consult the appropriate branch 
141 in the Shibboleth CVS.</h3>
142 <h3>The default configuration of Shibboleth is <b>not</b> secure and should not be
143 used for protection of production content. The example private key bundled with the
144 distribution is publically available, widely circulated, and well-known; also, the
145 default federation and trust metadata is for testing purposes only. For information
146 about securing a Shibboleth deployment, please refer to the production guide.
147 Shibboleth should only be used to protect sensitive content when deployed carefully
148 in conjunction with proper trust settings and policies.</h3>
149
150 <p>The Shibboleth target implementation has been substantially redesigned for this release. Most of the
151 configuration process has changed to accomodate more complex deployments but many of the defaults work
152 fine for testing and simpler applications. For a list of new features, please refer to the NEWS.txt
153 file in the doc/ folder of the distribution.</p>
154
155 <p>Before starting, please sign up for all applicable
156 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing 
157 lists</a>. Announcements pertinent to Shibboleth deployments and developments 
158 and resources for deployment assistance can be found here.</p>
159 <p>Please send any questions, concerns, or eventual confusion to
160 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>. 
161 This should include, but not be limited to, questions about the documentation, 
162 undocumented problems, installation or operational issues, and anything else 
163 that arises.</p>
164 <p><br>
165 </p>
166 <hr>
167 <p><br>
168 <br>
169 </p>
170 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
171 <ol type="1">
172     <li>
173     <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
174     <ol type="a">
175         <li><a href="#1.a."><font color="black">Origin</font></a></li>
176         <li><a href="#1.b."><font color="black">Target</font></a></li>
177         <li><a href="#1.c."><font color="black">WAYF</font></a></li>
178         <li><a href="#1.d."><font color="black">Federations</font></a></li>
179         <li><a href="#1.e."><font color="black">Relying Parties</font></a></li>
180         <li><a href="#1.f."><font color="black">Applications</font></a></li>
181         <li><a href="#1.g."><font color="black">Sessions</font></a></li>
182     </ol>
183     </li>
184     <li>
185     <h4><a href="#2."><font color="black">Planning</font></a></h4>
186     <ol type="a">
187         <li><a href="#2.a."><font color="black">Requirements</font></a></li>
188         <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
189         <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
190         <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
191         <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
192         <li><a href="#2.f."><font color="black">Attribute Acceptance Policies</font></a></li>
193         <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
194         <li><a href="#2.h."><font color="black">Clocks</font></a></li>
195         <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
196     </ol>
197     </li>
198     <li>
199     <h4><a href="#3."><font color="black">Installation</font></a></h4>
200     <ol type="a">
201         <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
202         <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
203         <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
204         <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
205         <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
206     </ol>
207     </li>
208     <li>
209     <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
210     <ol type="a">
211         <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
212         shibboleth.xml</span></font></a></li>
213         <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
214         <li><a href="#4.c."><font color="black">Key Generation and Certificate 
215         Installation</font></a></li>
216         <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
217         <li><a href="#4.e."><font color="black">Defining Attributes and 
218         Acceptance Policies</font></a></li>
219         <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
220         <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
221         <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
222         <li><a href="#4.i."><font color="black">Using Lazy Sessions</font></a></li>
223     </ol>
224     </li>
225     <li>
226     <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
227     <ol type="a">
228         <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
229         <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
230     </ol>
231     </li>
232 </ol>
233 <p><br>
234 </p>
235 <hr>
236 <p><br>
237 </p>
238 <h3><a name="1."></a>1. Shibboleth Overview</h3>
239 <p>Shibboleth is a system designed to exchange attributes across realms for the 
240 primary purpose of authorization. It provides a secure framework for one 
241 organization to transmit attributes about a web-browsing individual across 
242 security domains to another institution. In the primary usage case, when a user 
243 attempts to access a resource at a remote domain, the user&#39;s own home security 
244 domain can send certain information about that user to the target site in a 
245 trusted exchange. These attributes can then be used by the resource to help 
246 determine whether to grant the user access to the resource. The user may have 
247 the ability to decide whether to release specific attributes to certain sites by 
248 specifying personal Attribute Release Policies (ARP&#39;s), effectively preserving 
249 privacy while still granting access based on trusted information.</p>
250 <p>When a user first tries to access a resource protected by Shibboleth, they 
251 are redirected to a service which asks the user to specify the organization from 
252 which they want to authenticate. If the user has not yet locally authenticated 
253 to a WebISO service, the user will then be redirected to their home 
254 institution&#39;s authentication system. After the user authenticates, the 
255 Shibboleth components at the local institution will generate a temporary 
256 reference to the user, known as a handle, for the individual and send this to 
257 the target site. The target site can then use the handle to ask for attributes 
258 about this individual. Based on these attributes, the target can decide whether 
259 or not to grant access to the resource. The user may then be allowed to access 
260 the requested materials.</p>
261 <p>There are several controls on privacy in Shibboleth, and mechanisms are 
262 provided to allow users to determine exactly which information about them is 
263 released. A user&#39;s actual identity isn&#39;t necessary for many access control 
264 decisions, so privacy often is needlessly compromised. Instead, the resource 
265 often utilizes other attributes such as faculty member or member of a certain 
266 class. While these are commonly determined using the identity of the user, 
267 Shibboleth provides a way to mutually refer to the same principal without 
268 revealing that principal&#39;s identity. Because the user is initially known to the 
269 target site only by a randomly generated temporary handle, if sufficient, the 
270 target site might know no more about the user than that the user is a member of 
271 the origin organization. This handle should never be used to decide whether or 
272 not to grant access, and is intended only as a temporary reference for 
273 requesting attributes.</p>
274 <h4><a name="1.a."></a>1.a. Origin</h4>
275 <blockquote>
276     <p>There are four primary components to the origin side in Shibboleth: the 
277     Attribute Authority (AA), the Handle Service (HS), the directory service, 
278     and the local sign-on system (SSO). The AA and HS are provided with 
279     Shibboleth, and an open-source WebISO solution Pubcookie is also supplied; 
280     the directory is provided by the origin site. Shibboleth is able to 
281     interface with a directory exporting an LDAP interface or a SQL database 
282     containing user attributes, and is designed such that programming interfaces 
283     to other repositories should be readily implemented. Shibboleth relies on 
284     standard web server mechanisms to trigger local authentication. A .htaccess 
285     file can be easily used to trigger either the local WebISO system or the web 
286     server&#39;s own Basic Auth mechanism, which will likely utilize an enterprise 
287     authentication system, such as Kerberos.</p>
288     <p>From the origin site&#39;s point of view, the first contact will be the 
289     redirection of a user to the handle service, which will then consult the SSO 
290     system to determine whether the user has already been authenticated. If not, 
291     then the browser user will be asked to authenticate, and then sent back to 
292     the target URL with a handle bundled in an attribute assertion. Next, a 
293     request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA 
294     which will include the previously mentioned handle. The AA then consults the 
295     ARP&#39;s for the directory entry corresponding to the handle, queries the 
296     directory for these attributes, and releases to the SHAR all attributes the 
297     SHAR is entitled to know about that user.</p>
298 </blockquote>
299 <h4><a name="1.b."></a>1.b. Target</h4>
300 <blockquote>
301     <p>There are three primary components to the target side in Shibboleth: the 
302     Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute 
303     Requester (SHAR), and the resource manager (RM). An implementation of each 
304     of these is included in the standard Shibboleth distribution. These 
305     components are intended to run on the same web server.</p>
306     <p>From the target&#39;s point of view, a browser will hit the RM with a request 
307     for a Shibboleth-protected resource. The RM then allows the SHIRE to step 
308     in, which will use the WAYF to acquire the name of a handle service to ask 
309     about the user. The handle service (HS) will then reply with a SAML 
310     authentication assertion containing a handle, which the SHIRE then hands off 
311     to the SHAR. The SHAR uses the handle and the supplied address of the 
312     corresponding attribute authority (AA) to request all attributes it is 
313     allowed to know about the handle. The SHAR performs some basic validation 
314     and analysis based on attribute acceptance policies (AAP&#39;s). These 
315     attributes are then handed off to the RM, which is responsible for using 
316     these attributes to decide whether to grant access.</p>
317 </blockquote>
318 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
319 <blockquote>
320     <p>The WAYF service can be either outsourced and operated by a federation or 
321     deployed as part of the SHIRE. It is responsible for allowing a user to 
322     associate themself with an institution of their specification, then 
323     redirecting the user to the known address for the handle service of that 
324     institution.</p>
325 </blockquote>
326 <h4><a name="1.d."></a>1.d. Federations</h4>
327 <blockquote>
328     <p>A federation is one way to provide part of the underlying trust required 
329     for function of the Shibboleth architecture. A federation in the context of 
330     Shibboleth is a group of organizations(universities, corporations, content 
331     providers, etc.) who agree to exchange attributes using the SAML/Shibboleth 
332     protocols and abide by a common set of policies and practices. In so doing, 
333     they must implicitly or explicitly agree to a common set of guidelines. 
334     Joining a federation is not explicitly necessary for operation of 
335     Shibboleth, but it dramatically expands the number of targets and origins 
336     that can interact without defining bilateral agreements between all these 
337     parties.</p>
338     <p>A federation can be created in a variety of formats and trust models, but 
339     to support Shibboleth, it must provide a certain set of services to 
340     federation members. It needs to supply a registry to process applications to 
341     the federation and distribute membership information to the origin and 
342     target sites. This must include distribution of the PKI components necessary 
343     for trust between origins and targets. There also needs to be a set of 
344     agreements and best practices defined by the federation governing the 
345     exchange, use, and population of attributes before and after transit, and 
346     there should be a way to find information on local authentication and 
347     authorization practices for federation members.</p>
348 </blockquote>
349 <h4><a name="1.e."></a>1.e. Relying Parties</h4>
350 <blockquote>
351     <p>Some aspects of both origin and target configuration can vary and be
352     expressed in terms of the &quot;relying party&quot;. To an origin, a target
353     is a relying party, while targets consider origins to be relying
354     parties (it's a matter of perspective). Certificates, policies, and
355     other aspects of an interaction are specified on the basis of the relying
356     party, and may or may not vary between relying parties depending on the
357     deployment's needs.</p>
358     <p>Each origin and target is assigned a URI, a unique identifier to enable
359     control over configuration down to the level of an individual partner (a single
360     relying party). By convention, this is termed a &quot;providerId&quot;. More
361     frequently, an entire federation will be viewed by an origin or target as a
362     single relying party to simplify management. An individual origin or target
363     with which this deployment exchanges information may sometimes be part of
364     multiple relying parties if there are multiple trust agreements
365     under which these transactions are performed. Care should be taken to avoid
366     conflicting or inconsistent configuration in such cases.</p>
367 </blockquote>
368 <h4><a name="1.f."></a>1.f. Applications</h4>
369 <blockquote>
370     <p>Shibboleth &quot;applications&quot; are the primary unit of target
371     configuration. Applications as viewed by the target implementation
372     are not necessarily defined by the same metrics as in other contexts.  An
373     individual application represents a set of web resources that operates
374     using the same attribute handling and trust configuration and shares a common
375     <a href="#1.g.">session</a> with the browser user. As a user navigates between
376     resources on a server that cross an application boundary, a new session is
377     established, though user interaction may not be required. As a consequence of
378     the relationship between applications and sessions (which are tracked with
379     a cookie), an application usually does not span more than one virtual host.
380     Apart from cookie-based constraints, web resources can be aggregated into
381     applications in arbitrary ways.</p>
382     <p>A single target deployment may support a large number of applications,
383     but it need not register or publish information about each one with the
384     origins it accepts information from. Instead it can communicate using a
385     more limited set of distinct &quot;providerId&quot; values (often just a
386     single one). This allows targets with a complex internal configuration
387     to be treated as a single entity by origins for the purposes of attribute
388     release.</p>
389 </blockquote>
390 <h4><a name="1.g."></a>1.g. Sessions</h4>
391 <blockquote>
392     <p>Much of the target implementation is concerned with establishing, and
393     subsequently maintaining, sessions with the browser user on behalf of the
394     <a href="#1.f.">applications</a> at the target. A session consists of a
395     cookie passed between the browser and web server, associated with a
396     security context. The context contains the user's authentication information,
397     and generally a set of attributes that make up the user's identity. Each
398     application maintains distinct sessions with the browser by means of separate
399     cookies. It is important to note that all such sessions are independent and
400     distinct: any session can exist with or without any other session, and the
401     expiration of any one session does not imply the expiration of any other
402     session.  Shibboleth also does not support any logout functionality beyond the
403     termination of individual application sessions by deletion of respective
404     cookies; also, there is no way for the target to cause origin-side sessions,
405     such as a user's SSO login, to expire.</p>
406     <p>A browser user accessing a Shibboleth-protected resource may have two
407     outcomes: standard session establishment, and lazy session
408     establishment.  The standard session establishment mechanism in which
409     Shibboleth protects the resource in all circumstances results in the
410     establishment of a cookie-based browser session and a set of attributes
411     cached for that application. Shibboleth 1.2 also supports so-called lazy
412     session establishment, in which the resource may be accessed without prior
413     authentication.  This means the application must be intelligent enough to
414     determine whether authentication is necessary, and then construct the proper URL
415     to initiate a browser redirect to request authentication; if the
416     application determines none is necessary or uses other authorization
417     mechanisms, then the request for authentication may not need to be triggered.
418     This complex functionality is mostly useful to protect a single URL with
419     different access mechanisms, or to require authenticated access only in
420     instances where the application deems it necessary.</p>
421     <p>Independently of this, a web-based application protected by Shibboleth
422     may have a need to establish its own session with the user.  This session
423     may persist well beyond the Shibboleth session, and logouts from this
424     session, if supported, will not terminate a Shibboleth session initiated to
425     access the resource.  Application administrators should carefully evaluate
426     the expiration of all sessions to limit vulnerability to attacks or user
427     negligence. Logging out of the entire desktop session is usually the
428     only (relatively) foolproof logout mechanism on the web.</p>
429 </blockquote>
430 <hr>
431 <h3><a name="2."></a>2. Planning</h3>
432 <p>There are several essential elements that must be present in the environment 
433 to ensure Shibboleth functions well, both political and technical. Shibboleth 
434 currently runs on a specific range of platforms and web server environments. The 
435 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations 
436 and requirements for a successful implementation of a Shibboleth target.</p>
437 <h4><a name="2.a."></a>2.a. Requirements</h4>
438 <blockquote>
439     <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and 
440     Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a 
441     separate SHAR process. The plugins use the Sun/ONC RPC mechanism to communicate 
442     with the SHAR over Unix domain or TCP sockets. The target&#39;s web servers must 
443     be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a> 
444     1.3+, 2.0+, or Microsoft IIS 4.0+ More precise technical 
445     details are discussed in <a href="#3.a.">3.a</a>.</p>
446 </blockquote>
447 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
448 <blockquote>
449     <p>While it is not necessary for a target or origin to join a federation, 
450     doing so greatly facilitates the implementation of multilateral trust 
451     relationships. Each federation will have a different application process.</p>
452     <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or 
453     the Shibboleth v1.0 architectural document.</p>
454     <p>For testing in a private environment, Shibboleth comes with a default
455     configuration that demonstrates how to implement a local peered agreement
456     and supports testing both origin and target on the same box using localhost
457     URLs. The sample key and certificate is for ease of testing only, and should
458     always be replaced for real world use.</p>
459 </blockquote>
460 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
461 <blockquote>
462     <p>Shibboleth&#39;s protocols and software have been extensively engineered to 
463     provide protection against many attacks. However, the most secure protocol 
464     can be compromised if it is placed in an insecure environment. To ensure 
465     Shibboleth is as secure as possible, there are several recommended security 
466     precautions which should be in place at local sites.</p>
467     <ol type="i">
468         <li>SSL use is optional for target sites, but should be used if at all 
469         possible, at least in the processing of incoming sessions (called the 
470         SHIRE URL or assertion consumer service). Federation guidelines should 
471         be considered when determining whether to implement SSL, and, in 
472         general, SSL should be used for interactions with client machines to 
473         provide the necessary authentication and encryption to ensure protection 
474         from man-in-the-middle attacks. It is strongly suggested that all 
475         password traffic or similarly sensitive data should be SSL-protected. 
476         Assessment of the risk tradeoff against possible performance degradation 
477         should be performed for all applications.</li>
478         <li>Many other attacks can be made on the several redirection steps that 
479         Shibboleth takes to complete attribute transfer. The best protection 
480         against this is safeguarding the WAYF service and ensuring that rogue 
481         targets and origins are not used, generally by development of the trust 
482         model underneath Shibboleth. Shibboleth also leverages DNS for security, 
483         which is not uncommon, but attacks concerning domain name lookups
484         should be considered.</li>
485         <li>Information regarding origin users is generally provided by the 
486         authoritative enterprise directory, and the acceptance of requests from 
487         target applications can be carefully restricted to ensure that all 
488         requests the SHAR performs are authorized and all information the origin 
489         provides is accurate. Proper security measures should also be in place 
490         on directory access and population(see
491         <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/#AccessControl">
492         Access Control</a> in the
493         <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/">LDAP 
494         recipe</a> for more information). Use of plaintext passwords is strongly 
495         advised against.</li>
496         <li>Server platforms should be properly secured, commensurate with the 
497         level that would be expected for an organization&#39;s other security 
498         services, and cookie stores on client machines should be well protected.</li>
499     </ol>
500 </blockquote>
501 <h4><a name="2.d."></a>2.d. Server Certs</h4>
502 <blockquote>
503     <p>In the Shibboleth architecture, the origin and target software must all have 
504     various client and/or server certificates for use in signing assertions and 
505     creating SSL connections These should be issued by a commonly accepted CA, 
506     which may be stipulated by your federation. After understanding the CA&#39;s 
507     acceptible to your federations, consult chapter <a href="#4.c.">4.c</a> for 
508     information on certificate and key generation.</p>
509 </blockquote>
510 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
511 <blockquote>
512     <p>The Attribute Authority maintains a set of policies called Attribute 
513     Release Policies (or ARP&#39;s) that govern the sharing of user attributes with 
514     Shibboleth target sites. When a user attempts to access a 
515     Shibboleth-protected resource, that resource&#39;s SHAR queries the user&#39;s AA 
516     for all attributes to which it is entitled. The SHAR provides its own name 
517     and the URI of the requesting application. The 
518     AA finds the attributes associated with the browser user, determines an 
519     &quot;Effective ARP&quot; for this user, and then sends to the SHAR only the 
520     attribute-value pairs allowed in this policy.</p>
521     <p>An ARP may be thought of as a sort of filter for outbound attributes; it 
522     cannot create attributes or data that aren&#39;t originally present, but it can 
523     limit the attributes released and the values those attributes may have when 
524     released. It does not change the information in the data sources in any way.</p>
525     <p>Each ARP is comprised of one or more rules that specify which attributes
526     and values may be released to a given application and that SHAR. The
527     assignment of rules to various targets is quite flexible and includes
528     mechanisms for specifying: that a rule should affect all targets (default
529     rule), exact SHAR names for which a rule is applicable, regular expressions
530     against which SHAR names should be matched to determine if a rule is
531     applicable, and individual applications that may span hosts and URL's as
532     necessary.</p>
533     <p>For each request, an Effective ARP is determined by locating all ARP&#39;s 
534     applicable to the designated user and extracting each rule that matches the 
535     querying SHAR and resource. Attributes and values that are specified for 
536     release are included in the effective ARP, while those specified for denial 
537     are blocked from release. See section <a href="#5.b.i.">5.b.i</a> for 
538     details on how ARP&#39;s are processed.</p>
539     <p>Various ARP&#39;s may be combined in forming the Effective ARP. For instance, 
540     the Site ARP is administratively maintained and applies to all users for 
541     which the AA is answerable. User ARP&#39;s apply to a specific user only, and 
542     can be maintained either administratively or by the users themselves. All 
543     ARP&#39;s are specified using the same syntax and semantics.</p>
544 </blockquote>
545 <h4><a name="2.f."></a>2.f. Attribute Acceptance Policies</h4>
546 <blockquote>
547     <p>When a target receives a set of attributes, it must evaluate them in the 
548     context of the Attribute Authority that is providing them, to assess their 
549     &quot;reasonableness&quot;. For example, if the value of an attribute is expected to 
550     be from a small set of enumerated choices, the value should be compared 
551     against that list. If a particular attribute or value is only trusted when 
552     asserted by specific origins, that too should be checked.</p>
553     <p>Targets are configured to accept specific attributes that they understand 
554     and care about, and are also configured with the rules to apply before 
555     accepting the attributes for use by the RM or an application. Attributes and 
556     values that don&#39;t meet the target&#39;s requirements are filtered out. The set 
557     of configuration rules to make these decisions is called an Attribute 
558     Acceptance Policy (AAP).</p>
559 </blockquote>
560 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
561 <blockquote>
562     <p>A primary Shibboleth design consideration was to require very little or 
563     no modification to client machines. The only requirement is that a browser 
564     is used which supports cookies, redirection and SSL. Browser users will have 
565     to perform an additional click to submit the authentication assertion if 
566     JavaScript is not functional.</p>
567 </blockquote>
568 <h4><a name="2.h."></a>2.h. Clocks</h4>
569 <blockquote>
570     <p><a href="http://www.ntp.org/">NTP</a> should be run on all 
571     web servers. Shibboleth employs a short assertion acceptance window to protect 
572     against replay attacks. Because of this, any significant degree of clock 
573     skew can hinder the ability of users to access sites successfully.</p>
574 </blockquote>
575 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
576 <blockquote>
577     <p>Especially for higher education, there are a handful of laws enacted 
578     which may have important ramifications on the disclosure of personal 
579     information and attributes. Since Shibboleth does not necessarily need to 
580     transmit identity, it is an ideal solution for many higher education 
581     situations. Nevertheless, all parties within the United States of America 
582     are strongly advised to consult the
583     <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights 
584     and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal 
585     legislation before deploying Shibboleth.</p>
586 </blockquote>
587 <hr>
588 <h3><a name="3."></a>3. Installation</h3>
589 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
590 <p>The Shibboleth project makes binary packages available only for Windows,
591 that are precompiled against recent releases of various required libraries such 
592 as OpenSSL. Binaries for other platforms may be available on a limited or ad hoc
593 basis. It is highly advisable to build from source when using Shibboleth in 
594 a production environment in order to permit patching or updating of packages as 
595 security holes and bugs are fixed. Building from source is necessary to give you 
596 complete control over your deployment platform. The binary packages represent a 
597 snapshot in time only. To build from source, see the <span class="fixed">
598 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source 
599 distributions.</p>
600 <p>The software requirements listed correspond to the binary distribution. In 
601 general, source builds should work against all recent versions of the operating 
602 systems and software dependencies listed below. For specific questions, inquire 
603 to the support mailing list, or give it a try. Note that OpenSSL releases 
604 frequent security updates; the version listed may not be the most current, but 
605 most minor &quot;letter&quot; updates should be usable.</p>
606 <blockquote>
607     <p><b>General Requirements and Notes:</b></p>
608     <ul type="circle">
609         <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.x</a>
610         <blockquote>
611             <p>Apache 1.3.x must be compiled with mod_so for DSO module support, and
612             should include SSL support (preferably using <span class="fixed">mod_ssl</span>),
613             and EAPI support (which <span class="fixed">mod_ssl</span> requires and provides).</p>
614             <p><b>Portions of the <span class="fixed">libphp4</span> Apache 
615             module are written in C++, as is Shibboleth. There is a known conflict on Unix
616             platforms between the PHP extensions <span class="fixed">libpspell.so</span> 
617             and <span class="fixed">libsablot.so</span> which will manifest 
618             itself as segmentation faults when starting Apache. If a site wants 
619             to use <span class="fixed">libphp4.so</span> and Shibboleth at the same time, 
620             then one of the following may be done:</b></p>
621             <ol>
622                 <li>Remove the options <span class="fixed">--with-pspell</span> 
623                 and <span class="fixed">--with-xslt-sablot</span> from PHP&#39;s 
624                 configuration.</li>
625                 <li>Rebuild these two modules using the same version of GCC that 
626                 was used to compile Shibboleth.</li>
627             </ol>
628         </blockquote>
629         </li>
630         <li><a href="http://www.apache.org/dist/httpd/">Apache 2.0.x</a>
631         <blockquote>
632             <p>Apache 2.0.x must be compiled with mod_so for DSO module support, and
633             should include SSL support which is available but not included by default.
634             See also the note about PHP above.</p>
635         </blockquote>
636         </li>
637         <li>IIS 4.0+
638             <blockquote>
639             <p>When installing under Windows 2003, if the server is not in a
640             domain before installing IIS 6, there may be issues surrounding
641             permissions on directories because of new restrictions on IIS
642             extensions accessing files.</p>
643             </blockquote>
644         </li>
645         <li><a href="http://www.openssl.org">OpenSSL</a>
646         <blockquote>
647             <p>Verions 0.9.6 and 0.9.7 are both supported, but 0.9.7 should be used
648             if possible, as support for 0.9.6 may be dropped in a future release.
649             Support for threads and shared libraries <b>must</b> be included during
650             configuration using the <i>threads</i> and <i>shared</i> options.</p>
651         </blockquote>
652         </li>
653         </ul>
654     <p>Most other required libraries are either easy to update or not found on
655     typical systems. See the <span class="fixed">INSTALL.txt</span> files in the
656     OpenSAML and Shibboleth source distributions for specific requirements of a
657     given release. The important requirements are for pthreads support and
658     shared libraries on Unix platforms. Without both, building will be hard and
659     stability unlikely.</p>
660     <p><b>Operating System Specific Notes:</b></p>
661     <ul type="circle">
662         <li>Windows NT/2000/XP/2003
663             <ul type="disc">
664                 <li>
665                 <p>Any Apache modules used, and Apache itself, must be compiled 
666                 with the Microsoft DLL-based runtime, selected by compiling with 
667                 the /MD switch. The binary distribution was built against Apache
668                 versions 1.3.29 (with EAPI patches from mod_ssl 2.8.16) and 2.0.48.
669                 Forward compatibility is likely, but errors will result if an
670                 Apache implementation such as IBM's IHS product or any other
671                 non-EAPI version of 1.3 is used. In such cases, you must build
672                 the Shibboleth Apache modules from source.</p>
673                 </li>
674                 <li>
675                 <p>The installer will prompt for an install path, change default 
676                 configuration files as appropriate for Windows, and set various 
677                 environment variables for you. A default SHAR service can also 
678                 be installed, or you can install it manually using the 
679                 instructions in this guide.</p>
680                 <p>Note that debug/symbol versions of the libraries and software 
681                 are included, and may be used by appending &quot;debug&quot; to the 
682                 Shibboleth library path and using the corresponding modules and 
683                 binaries. If you do so, be aware that Apache and other modules 
684                 must also be compiled with Microsoft&#39;s debug runtime (via the /MDd 
685                 compiler option). In most cases, you can safely ignore or even 
686                 delete the debug versions.</p>
687                 </li>
688             </ul>
689         </li>
690         <li>RedHat Linux 7.2,7.3:
691             <ul type="disc">
692             <li>
693                 <p>The most recent Red Hat RPM for Apache (1.3.27-2 as of this writing) is sufficient for
694                 use with Shibboleth. You can use the older version of OpenSSL included with the OS, for this
695                 release, but be advised this may change in the future.</p>
696             </li>
697             <li>
698                 <p>The version of GCC that comes with this system is too old to build Shibboleth.
699                 Special update RPMs are available for GCC 3.04 that will work provided you
700                 configure packages with CC and CXX set to gcc3 and g++3 respectively. Newer
701                 GCC versions also work but may require a glibc upgrade and necessitate a lot
702                 of unrelated package updates.</p>
703             </li>
704             </ul>
705         </li>
706         <li>RedHat Linux 9 / Fedora
707             <ul type="disc">
708             <li>
709                 <p>Apache 2.0 is included as the default Apache version in this release.</p>
710             </li>
711             </ul>
712         </li>
713         <li>RedHat Enterprise Linux
714             <ul type="disc">
715             <li>
716                 <p>Apache 2.0 is included as the default Apache version in this release.</p>
717             </li>
718             </ul>
719         </li>
720         <li>Debian Linux
721             <ul type="disc">
722             <li>
723                 <p>Shibboleth requires that Apache and Apache-SSL be built with
724                 <span class="fixed">libpthread</span>, or loading the
725                 <span class="fixed">mod_shib_13</span> or <span class="fixed">mod_shib_20</span>
726                 modules will cause Apache to fail. While RedHat&#39;s Apache is compatible,
727                 Debian&#39;s Apache must be rebuilt with <span class="fixed">libpthread</span>:</p>
728                 <blockquote>
729                     <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
730                     $ apt-build --rebuild --reinstall install \<br>
731 &nbsp;&nbsp;&nbsp; apache-common apache apache-ssl</span></p>
732                 </blockquote>
733             </li>
734             </ul>
735         </li>
736         <li>Solaris 2.6+:
737             <ul type="disc">
738             <li>
739                 <p>The shared library version of OpenSSL is required by 
740                 Shibboleth. The static libraries may be installed as well if 
741                 necessary for other applications, but cannot be linked into
742                 mod_ssl or any other Apache modules. If mod_ssl's libssl.so
743                 module is linked against the static version, bus errors will
744                 result.</p>
745                 <p>To check how mod_ssl was built, run the <span class="fixed">
746                 ldd</span> command against <span class="fixed">libssl.so</span> 
747                 in the Apache <span class="fixed">libexec/</span> folder and 
748                 check the output for references to <span class="fixed">
749                 libssl.so.0.9.7</span>. If you see an earlier version 
750                 mentioned, or no mention of it at all, then OpenSSL 0.9.7 must be
751                 built with shared libraries from source, and the Apache module rebuilt with it.</p>
752                 <p>openssl-0.9.7d, the latest security fix release, has been tested,
753                 but any 0.9.7 version should work.</p>
754             </li>
755             <li>
756                 <p>Solaris does not come with GCC 3, but various versions can be obtained
757                 from <a href="http://www.sunfreeware.com">http://www.sunfreeware.com</a>.
758                 If building your own, GCC must be configured to use Sun's linker. Note that
759                 you should use a consistent version of GCC across any other C++ libraries
760                 in use within Apache, but other C++ code on your server can freely use a
761                 different version as long as the necessary <span class="fixed">libstdc++.so</span>
762                 for a given version is available</p>
763             </li>
764             <li>
765                 <p>Use of GCC is recommended, but new releases of Sun's Forte compiler have
766                 been used successfully with some tinkering with configuration scripts.</p>
767             </li>
768         </ul>
769         </li>
770     </ul>
771 </blockquote>
772 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
773 <blockquote>
774     <p>For the sake of clarity, this deployment guide assumes that standard 
775     directories are used for all installations. These directories may be changed 
776     for local implementations, but must be done so consistently.</p>
777     <p>On Unix, the build documentation suggests building into
778     <span class="fixed">/opt/shibboleth</span>. If you use a different layout or
779     location, most of the essential configuration files will be tweaked for you,
780     but watch for any exceptions.</p>
781     <p>On Windows, use of the installer is recommended. Visual Studio 6.0
782     project files are included with the OpenSAML and Shibboleth source
783     distributions for source builds if maximum flexibility to deal with
784     security issues or Apache variants is desired.</p>
785 </blockquote>
786 <h4><a name="3.c."></a>3.c. Configure Apache</h4>
787 <blockquote>
788     <ol type="1">
789         <li>Shibboleth includes configuration directives in the files
790         <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span> 
791         and <span class="fixed">/opt/shibboleth/etc/shibboleth/apache2.config</span>
792         which must be added to the <span class="fixed">httpd.conf</span> file used
793         locally. It is recommended that these directives simply be added to the end of the 
794         existing <span class="fixed">httpd.conf</span> file rather than trying 
795         to merge it in-line; <a href="#3.c.2.">step 2</a> describes the 
796         necessary modifications to the Apache startup script. The default 
797         configuration will often work, but if customization is necessary, these 
798         options may be modified:<dl>
799             <dd class="attribute"><span class="fixed">LoadModule &lt;module&gt; &lt;pathname&gt;</span></dd>
800             <dd class="value">Specifies the name and location of the module,
801             installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shib_13.so</span>
802             or <span class="fixed">/opt/shibboleth/libexec/mod_shib_20.so</span></dd>
803             
804             <dd class="attribute"><span class="fixed">ShibConfig &lt;pathname&gt;</span></dd>
805             <dd class="value">Specifies the <span class="fixed">pathname</span> 
806             of the Shibboleth configuration file. Defaults to <span class="fixed">
807             /opt/shibboleth/etc/shibboleth/shibboleth.xml</span>.</dd>
808             
809             <dd class="attribute"><span class="fixed">ShibSchemaDir &lt;path&gt;</span></dd>
810             <dd class="value">Specifies the <span class="fixed">path</span> 
811             of the Shibboleth schema folder. Defaults to <span class="fixed">
812             /opt/shibboleth/etc/shibboleth</span>.</dd>
813             
814             <dd class="attribute"><span class="fixed">&lt;Location <i>url</i>&gt;<br>
815             &nbsp;&nbsp;SetHandler &lt;method&gt;<br>
816             &lt;/Location&gt;</span></dd>
817             <dd class="value"><p>(Apache 1.3 only) Specifies the relative <span class="fixed">path</span>
818             and the <span class="fixed">handler</span> the target uses to process 
819             incoming sessions and lazy session startup for Shibboleth-protected
820             resources. This works in concert with the <span class="fixed">shireURL</span>
821             settings in the XML configuration file. Any virtual locations that are to be
822             used for this purpose should be defined to Apache here.</p>
823             <p>Another option for some sites is to configure Shibboleth globally in
824             &quot;lazy&quot; session mode for all content. This allows the module to
825             detect session requests and pass them to the handler without the need to
826             configure the handler itself.</p>
827             </dd>
828         </dl>
829         </li>
830         <li>If the OpenSSL libraries are not in the system&#39;s search path, they 
831         should be added to the <span class="fixed">LD_LIBRARY_PATH</span> used by
832         Apache. You will also usually need to add <span class="fixed">/opt/shibboleth/lib</span>
833         to <span class="fixed">LD_LIBRARY_PATH</span> as well.</li>
834         <li>The SHAR must be started along with Apache. Among other methods on 
835         Unix, this can be done either by creating a separate SHAR startup script 
836         or by modifying Apache&#39;s RC script to start/stop the <span class="fixed">
837         SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is 
838         suggested that Apache&#39;s script be modified by adding:<blockquote>
839             <p><span class="fixed">/opt/shibboleth/bin/shar -f &amp;</span> </p>
840         </blockquote>
841         <p>In most cases, the build process insures that the SHAR can locate
842         the configuration file and schemas, but the SHIBCONFIG and SHIBSCHEMAS
843         environment variables may be used as well. Command line options can also
844         be used to specify them.</p>
845         <p>On Windows, the SHAR is a service and is managed separately.</li>
846         <li>By default, the Shibboleth modules are configured to log information
847         on behalf of Apache to the file <span class="fixed">
848         /opt/shibboleth/var/log/shibboleth/shire.log</span>, though this can be
849         changed by modifying the <span class="fixed">.logger</span> files
850         pointed to by <a href="#4.a.">configuration elements</a>. For this log
851         to be created, Apache must have permission to write to this file, which
852         may require that the file be manually created and permissions assigned
853         to whatever user Apache is configured to run under. If the file does not
854         appear when Apache runs with the modules loaded, check for permission
855         problems.</li>
856         <li>The options in <span class="fixed">shibboleth.xml</span> must be 
857         configured as documented in <a href="#4.a.">4.a</a>. Apache content may 
858         then need to be modified for Shibboleth authentication. This is 
859         discussed in <a href="#4.d.">4.d</a>. It is recommended that the target 
860         then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
861     </ol>
862 </blockquote>
863 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
864 <blockquote>
865     <ol type="1">
866         <li>The package includes an ISAPI filter and bundled extension for 
867         session startup in a single library, <span class="fixed">libexec\isapi_shib.dll</span>. 
868         This filter is configured using commands in <span class="fixed">
869         C:\opt\shibboleth\etc\shibboleth\shibboleth.xml</span> (or wherever you've
870         installed the software). Make sure you or the installer has added the lib
871         directory to the path as directed in <a href="#3.b.">section 3.b.</a>
872         You will generally need to restart the system after installation.
873         <p>Installing the extension into IIS is a two step process:
874         <ol type="1">
875             <li type="a">First, add the filter using the Internet Services 
876             Manager MMC console. Right click on the machine icon on the left, 
877             and edit the WWW Service master properties. On the &quot;ISAPI Filters&quot; 
878             tab, add a new filter called Shibboleth and specify the DLL named 
879             above. The priority should be High, and once the filter is loaded, 
880             make sure it appears in the list <b>below</b> the &quot;sspifilt&quot; entry. 
881             Restart IIS and make sure the filter shows up with a green arrow. 
882             Check the Windows event log if it fails to load.</li>
883             <li type="a">Secondly, map a special, distinct file extension, such as
884             <span class="fixed">.shire</span>, to the ISAPI library so that 
885             virtual URLs can be specified to invoke the extension handler for each 
886             web site. Right click on the machine icon on the left, and edit the 
887             WWW Service master properties. On the &quot;Home Directory&quot; tab, add a 
888             script mapping using the &quot;Configuration&quot; button. The &quot;Executable&quot; 
889             box should point to <span class="fixed">isapi_shib.dll</span>, and the 
890             &quot;Extension&quot; can be set to anything unlikely to conflict, but
891             <span class="fixed">.shire</span> is assumed (and the dot must be 
892             included). You should NOT select the option to limit verbs, and 
893             you MUST uncheck the &quot;Check that file exists&quot; box. On newer
894             versions of IIS, checking the &quot;Script Engine&quot; box is suggested,
895             as it will permit the extension to handle requests in directories with only
896             script permissions assigned.</li>
897             <li type="a"><font color="#444499">(IIS 6 Only)</font>  A new Web
898             Service Extension must be defined for Shibboleth; without this, the
899             mapping from <span class="fixed">*.shire</span> to <span
900             class="fixed">isapi_shib.dll</span> won't occur and a file error
901             will appear  Add this extension with an arbitrary name and associate
902             it with <span class="fixed">isapi_shib.dll</span>.</li>
903         </ol>
904         </li>
905         <li>All other aspects of configuration are handled via the
906         <span class="fixed">shibboleth.xml</span> file and associated XML
907         files described in subsequent sections. Particular use is made of 
908         the <span class="fixed">/SHIRE/Implementation/ISAPI</span> element that allows
909         IIS sites to be mapped to scheme, hostname, and port for proper request
910         mapping and generation of redirects.</li>
911         <li>Instance IDs are used in the IIS metabase to identify web sites. In older versions,
912         they are applied starting with 1(one) and number the web sites in order in the
913         Internet Services Manager from top to bottom. Newer versions appear to assign
914         some IID values with strange ASCII formulas applied to the site name. A simple
915         ASP or CGI script can be run within a site to dump the INSTANCE_ID header.</li>
916         <li>See the following section for information on running the SHAR 
917         service on Windows.</li>
918         <li>The options in <span class="fixed">shibboleth.xml</span> must be 
919         configured as documented in <a href="#4.a.">4.a</a>. It is recommended 
920         that the target then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
921     </ol>
922 </blockquote>
923 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
924 <blockquote>
925     <p>The SHAR is a console application that is primarily designed to be 
926     installed as a Windows service. To run the process in console mode for 
927     testing or to diagnose major problems, the <span class="fixed">-console</span>
928     parameter is used. Otherwise, parameters are used to install (or remove) the SHAR from the 
929     service database and subsequent control is via the Service Control Manager 
930     applet. The following command line parameters can be used:</p>
931     <dl>
932         <dd class="attribute"><span class="fixed">-console</span></dd>
933         <dd class="value">Allows the process to be started from a command 
934         prompt. Since the console will exit if the desktop user logs out, this 
935         is not suitable for production use, but may be useful for testing.</dd>
936         <dd class="attribute"><span class="fixed">-check</span></dd>
937         <dd class="value">Validates the general correctness of the configuration.
938         Not all problems can be detected this way, but the chance of successful startup
939         is high if the checking process does not log any errors.</dd>
940         <dd class="attribute"><span class="fixed">-config &lt;pathname&gt;</span> </dd>
941         <dd class="value">Specifies the pathname of the SHAR&#39;s configuration 
942         file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span> 
943         or the value of the <span class="fixed">SHIBCONFIG</span> environment 
944         variable, if it is set.</dd>
945         <dd class="attribute"><span class="fixed">-schemadir &lt;path&gt;</span> </dd>
946         <dd class="value">Specifies the path to the XML schema files. Defaults to
947         <span class="fixed">\opt\shibboleth\etc\shibboleth</span> or the value of the
948         <span class="fixed">SHIBSCHEMAS</span> environment variable, if it is set.</dd>
949         <dd class="attribute"><span class="fixed">-install &lt;servicename&gt;</span></dd>
950         <dd class="value">Installs the SHAR as a named service in the Windows 
951         service database. A name should be provided if multiple instances of the 
952         SHAR need to be run on different ports, and thus installed separately. 
953         The <span class="fixed">-config</span> option can be provided to include 
954         a specific configuration file on the service&#39;s command line.</dd>
955         <dd class="attribute"><span class="fixed">-remove &lt;servicename&gt;</span></dd>
956         <dd class="value">Removes the named service instance of the SHAR from 
957         the Windows service database.</dd>
958     </dl>
959     <h4><br>
960     </h4>
961 </blockquote>
962 <hr>
963 <h3><a name="4."></a>4. Getting Running</h3>
964 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.xml</span></h4>
965 <blockquote>
966         <p>The configuration for the target is mostly contained within <span class="fixed">shibboleth.xml</span>,
967         located by default at <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>.
968         The target comes pre-configured with certificates and settings that will work against a test origin
969         running on the same server; however, there are several values that must later be changed to interoperate
970         with other sites securely and effectively.</p>
971         <p>The following is a hyperlinked version of a basic configuration file, followed by a list of elements
972         and attributes that must be modified. The actual example shipped with Shibboleth includes many more options
973         that are commented out and other elements necessary to support test functionality.
974         Click on any attribute or element for more information on its population and definition.</p>
975
976 <pre>
977 <a class="fixedlink" href="#confShibbolethTargetConfig">&lt;ShibbolethTargetConfig      xmlns=&quot;urn:mace:shibboleth:target:config:1.0&quot;
978     logger=&quot;/opt/shibboleth/etc/shibboleth/shibboleth.logger&quot; clockSkew=&quot;180&quot;&gt;</a>
979
980     <a class="fixedlink" href="#confExtensions">&lt;Extensions&gt;</a>
981         <a class="fixedlink" href="#confLibrary">&lt;Library path=&quot;/opt/shibboleth/libexec/xmlproviders.so&quot; fatal=&quot;true&quot;/&gt;</a>
982     <a class="fixedlink" href="#confExtensions">&lt;/Extensions&gt;</a>
983
984     <a class="fixedlink" href="#confSHAR">&lt;SHAR logger=&quot;/opt/shibboleth/etc/shibboleth/shar.logger&quot;&gt;</a>
985
986         <a class="fixedlink" href="#confExtensions">&lt;Extensions&gt;</a>
987             <a class="fixedlink" href="#confLibrary">&lt;Library path=&quot;/opt/shibboleth/libexec/shib-mysql-ccache.so&quot; fatal=&quot;false&quot;/&gt;</a>
988         <a class="fixedlink" href="#confExtensions">&lt;/Extensions&gt;</a>
989
990         <a class="fixedlink" href="#confUnixListener">&lt;UnixListener address=&quot;/tmp/shar-socket&quot;/&gt;</a>
991
992         &lt;!-- Primarily for Windows Deployments:
993         <a class="fixedlink" href="#confTCPListener">&lt;TCPListener address=&quot;127.0.0.1&quot; port=&quot;12345&quot; acl=&quot;127.0.0.1&quot;/&gt;</a>
994         --&gt;
995
996         &lt;!--
997         <a class="fixedlink" href="#confMemorySessionCache">&lt;MemorySessionCache cleanupInterval=&quot;300&quot; cacheTimeout=&quot;3600&quot; AATimeout=&quot;30&quot; AAConnectTimeout=&quot;15&quot;
998             defaultLifetime=&quot;1800&quot; retryInterval=&quot;300&quot; strictValidity=&quot;true&quot; propagateErrors=&quot;true&quot;/&gt;</a>
999         --&gt;
1000         
1001         <a class="fixedlink" href="#confMySQLSessionCache">&lt;MySQLSessionCache cleanupInterval=&quot;300&quot; cacheTimeout=&quot;3600&quot; AATimeout=&quot;30&quot; AAConnectTimeout=&quot;15&quot;
1002                 defaultLifetime=&quot;1800&quot; retryInterval=&quot;300&quot; strictValidity=&quot;true&quot; propagateErrors=&quot;true&quot;
1003                 mysqlTimeout=&quot;14400&quot;&gt;</a>
1004             <a class="fixedlink" href="#confArgument">&lt;Argument&gt;&#x2D;&#x2D;language=/opt/shibboleth/share/english&lt;/Argument&gt;</a>
1005             <a class="fixedlink" href="#confArgument">&lt;Argument&gt;datadir=/opt/shibboleth/data&lt;/Argument&gt;</a>
1006         &lt;/MySQLSessionCache&gt;
1007
1008     <a class="fixedlink" href="#confSHAR">&lt;/SHAR&gt;</a>
1009
1010     <a class="fixedlink" href="#confSHIRE">&lt;SHIRE logger=&quot;/opt/shibboleth/etc/shibboleth/shire.logger&quot;&gt;</a>
1011
1012         <a class="fixedlink" href="#confRequestMapProvider">&lt;RequestMapProvider type=&quot;edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap&quot;&gt;</a>
1013             <a class="fixedlink" href="#confRequestMap">&lt;RequestMap applicationId=&quot;default&quot;&gt;</a>
1014                 <a class="fixedlink" href="#confHost">&lt;Host name=&quot;localhost&quot; scheme=&quot;https&quot;&gt;</a>
1015                     <a class="fixedlink" href="#confPath">&lt;Path name=&quot;secure&quot; requireSession=&quot;true&quot; exportAssertion=&quot;true&quot;&gt;
1016                             &lt;!-- Example shows a subfolder on the SSL port assigned to a separate &lt;Application&gt; --&gt;
1017                             &lt;Path name=&quot;admin&quot; applicationId=&quot;foo-admin&quot;/&gt;
1018                        &lt;/Path&gt;</a>
1019                 <a class="fixedlink" href="#confHost">&lt;/Host&gt;</a>
1020                 <a class="fixedlink" href="#confHost">&lt;Host name=&quot;localhost&quot; scheme=&quot;http&quot;&gt;</a>
1021                     <a class="fixedlink" href="#confPath">&lt;Path name=&quot;secure&quot; requireSession=&quot;true&quot; exportAssertion=&quot;true&quot;/&gt;</a>
1022                 <a class="fixedlink" href="#confHost">&lt;/Host&gt;</a>
1023             <a class="fixedlink" href="#confRequestMap">&lt;/RequestMap&gt;</a>
1024         <a class="fixedlink" href="#confRequestMapProvider">&lt;/RequestMapProvider&gt;</a>
1025
1026         &lt;!-- IIS only:
1027         <a class="fixedlink" href="#confImplementation">&lt;Implementation&gt;</a>
1028             <a class="fixedlink" href="#confISAPI">&lt;ISAPI normalizeRequest=&quot;true&quot;&gt;</a>
1029                 <a class="fixedlink" href="#confSite">&lt;Site id=&quot;1&quot; scheme=&quot;https&quot; host=&quot;localhost&quot; port=&quot;443&quot;/&gt;</a>
1030             <a class="fixedlink" href="#confISAPI">&lt;/ISAPI&gt;</a>
1031         <a class="fixedlink" href="#confImplementation">&lt;/Implementation&gt;</a>
1032         --&gt;
1033     <a class="fixedlink" href="#confSHIRE">&lt;/SHIRE&gt;</a>
1034
1035     <a class="fixedlink" href="#confApplications">&lt;Applications xmlns:saml=&quot;urn:oasis:names:tc:SAML:1.0:assertion&quot;
1036         applicationId=&quot;default&quot; providerId=&quot;https://example.org/shibboleth/target&quot;
1037         signRequest=&quot;false&quot; signedResponse=&quot;false&quot; signedAssertions=&quot;false&quot;&gt;</a>
1038
1039         <a class="fixedlink" href="#confSessions">&lt;Sessions lifetime=&quot;7200&quot; timeout=&quot;3600&quot; checkAddress=&quot;true&quot;
1040             shireURL=&quot;/Shibboleth.shire&quot; shireSSL=&quot;false&quot; cookieName=&quot;_shibsession_default&quot; cookieProps=&quot;; path=/&quot;
1041             wayfURL=&quot;https://wayf.internet2.edu/InQueue/WAYF&quot;&gt;</a>
1042
1043         <a class="fixedlink" href="#confErrors">&lt;Errors shire=&quot;/opt/shibboleth/etc/shibboleth/shireError.html&quot;
1044             rm=&quot;/opt/shibboleth/etc/shibboleth/rmError.html&quot;
1045             access=&quot;/opt/shibboleth/etc/shibboleth/accessError.html&quot;
1046             supportContact=&quot;root@localhost&quot;
1047             logoLocation=&quot;/shibtarget/logo.jpg&quot;
1048             styleSheet=&quot;/shibtarget/main.css&quot;/&gt;</a>
1049
1050         <a class="fixedlink" href="#confCredentialUse">&lt;CredentialUse TLS=&quot;defcreds&quot; Signing=&quot;defcreds&quot;&gt;</a>
1051             <a class="fixedlink" href="#confRelyingParty">&lt;RelyingParty Name=&quot;urn:mace:inqueue&quot; TLS=&quot;inqueuecreds&quot; Signing=&quot;inqueuecreds&quot;/&gt;</a>
1052         <a class="fixedlink" href="#confCredentialUse">&lt;/CredentialUse&gt;</a>
1053
1054         &lt;!--
1055         <a class="fixedlink" href="#confAttributeDesignator">&lt;AttributeDesignator AttributeName=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;
1056             AttributeNamespace=&quot;urn:mace:shibboleth:1.0:attributeNamespace:uri&quot;/&gt;</a>
1057         --&gt;
1058
1059         <a class="fixedlink" href="#confAAPProvider">&lt;AAPProvider type=&quot;edu.internet2.middleware.shibboleth.target.provider.XMLAAP&quot;
1060             uri=&quot;/opt/shibboleth/etc/shibboleth/AAP.xml&quot;/&gt;</a>
1061
1062         <a class="fixedlink" href="#confFederationProvider">&lt;FederationProvider type=&quot;edu.internet2.middleware.shibboleth.common.provider.XMLMetadata&quot;
1063             uri=&quot;/opt/shibboleth/etc/shibboleth/sites.xml&quot;/&gt;</a>
1064
1065         <a class="fixedlink" href="#confTrustProvider">&lt;TrustProvider type=&quot;edu.internet2.middleware.shibboleth.common.provider.XMLTrust&quot;
1066             uri=&quot;/opt/shibboleth/etc/shibboleth/trust.xml&quot;/&gt;</a>
1067
1068         &lt;!--
1069         <a class="fixedlink" href="#confRevocationProvider">&lt;RevocationProvider type=&quot;edu.internet2.middleware.shibboleth.common.provider.XMLRevocation&quot;
1070             uri=&quot;/opt/shibboleth/etc/shibboleth/trust.xml&quot;/&gt;</a>
1071         --&gt;
1072
1073         <a class="fixedlink" href="confAudience">&lt;saml:Audience&gt;urn:mace:inqueue&lt;/saml:Audience&gt;</a>
1074
1075         &lt;!-- Override settings for this application.
1076         <a class="fixedlink" href="confApplication">&lt;Application id=&quot;foo-admin&quot;&gt;</a>
1077             <a class="fixedlink" href="#confSessions">&lt;Sessions lifetime=&quot;7200&quot; timeout=&quot;3600&quot; checkAddress=&quot;true&quot;
1078                 shireURL=&quot;/secure/admin/Shibboleth.shire&quot; shireSSL=&quot;true&quot; cookieProps=&quot;; path=/secure/admin; secure&quot;
1079                 wayfURL=&quot;https://wayf.internet2.edu/InQueue/WAYF&quot;/&gt;</a>
1080             <a class="fixedlink" href="#confAttributeDesignator">&lt;saml:AttributeDesignator AttributeName=&quot;urn:mace:dir:attribute-def:eduPersonPrincipalName&quot;
1081                 AttributeNamespace=&quot;urn:mace:shibboleth:1.0:attributeNamespace:uri&quot;/&gt;</a>
1082         <a class="fixedlink" href="confApplication">&lt;/Application&gt;</a>
1083         --&gt;
1084
1085     <a class="fixedlink" href="#confApplications">&lt;/Applications&gt;</a>
1086
1087     <a class="fixedlink" href="#confCredentialsProvider">&lt;CredentialsProvider type=&quot;edu.internet2.middleware.shibboleth.common.Credentials&quot;&gt;</a>
1088         <a class="fixedlink" href="#confCredentials">&lt;Credentials xmlns=&quot;urn:mace:shibboleth:credentials:1.0&quot;&gt;</a>
1089             <a class="fixedlink" href="#confFileResolver">&lt;FileResolver Id=&quot;defcreds&quot;&gt;</a>
1090                 <a class="fixedlink" href="#confKey">&lt;Key format=&quot;PEM&quot; password=&quot;secret&quot;&gt;</a>
1091                     <a class="fixedlink" href="#confCredPath">&lt;Path&gt;/opt/shibboleth/etc/shibboleth/shar.key&lt;/Path&gt;</a>
1092                 <a class="fixedlink" href="#confKey">&lt;/Key&gt;</a>
1093                 <a class="fixedlink" href="#confCertificate">&lt;Certificate format=&quot;PEM&quot;&gt;</a>
1094                     <a class="fixedlink" href="#confCredPath">&lt;Path&gt;/opt/shibboleth/etc/shibboleth/shar.crt&lt;/Path&gt;</a>
1095                     <a class="fixedlink" href="#confCAPath">&lt;CAPath&gt;/opt/shibboleth/etc/shibboleth/ca.crt&lt;/CAPath&gt;</a>
1096                 <a class="fixedlink" href="#confCertificate">&lt;/Certificate&gt;</a>
1097             <a class="fixedlink" href="#confFileResolver">&lt;/FileResolver&gt;</a>
1098         <a class="fixedlink" href="#confCredentials">&lt;/Credentials&gt;</a>
1099     <a class="fixedlink" href="#confCredentialsProvider">&lt;/CredentialsProvider&gt;</a>
1100
1101 <a class="fixedlink" href="#confShibbolethTargetConfig">&lt;/ShibbolethTargetConfig&gt;</a>
1102 </pre>
1103
1104 <p>The following changes must be made to the default configuration before the target will interoperate in a federation.</p>
1105     <ol type="1">
1106         <li> 
1107         <p>The main <a href="#confApplications"><span class="fixed">Applications</span></a> element's
1108         <span class="fixed">providerId</span> attribute must be changed to reflect the URI this target will
1109         use to identify itself to origins by default. This will often be approved or supplied by a federation.</p>
1110                 </li>
1111                 <li>
1112                 <p>The <span class="fixed">supportContact</span> and error templates for the target found in the
1113                 <a href="#confErrors"><span class="fixed">Errors</span></a> element should be changed to ensure that
1114                 users have a proper support mechanism.</p>
1115                 </li>
1116                 <li>
1117                 <p>Proper credentials for this target signed by an authority that the federation recognizes must be
1118                  referenced by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element.
1119                  The default configuration points at files containing widely-available, insecure keys and certificates.
1120                  Note that keys are supported in a variety of formats: DER, PEM, encrypted PEM, PKCS8, and encrypted PKCS8.</p>
1121         </li>
1122         <li>
1123         <p><a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a> and
1124         <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a> elements must be added or
1125         changed as needed to reflect the arrangements required. This information is often provided by
1126         federations to their members.</p>
1127         </li>
1128     </ol>
1129
1130     <p>For Apache (but not IIS), there is also information that must be 
1131     configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span> 
1132     (or equivalent);&nbsp; for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1133     <p>Information in the logging configuration files referenced by
1134     <span class="fixed">shibboleth.xml</span> may require additional changes to 
1135     meet local needs. The logging level can be raised to <span class="fixed">
1136     DEBUG</span> if extremely detailed information is needed for testing.
1137     It is recommended that after initial installation is 
1138     completed, the log level in both files be left at either <span class="fixed">
1139     INFO</span> or <span class="fixed">WARN</span>.</p>
1140     <p>All elements are optional unless otherwise specified.  All attributes of an element are optional unless
1141     designated <span class="mandatory">mandatory</span> by a purple background.</p>
1142     <dl>
1143         <dd class="attribute"><a name="confAAPProvider"><span class="fixed">&lt;AAPProvider <span class="mandatory">type=&quot;edu.internet2.middleware.shibboleth.target.provider.XMLAAP&quot;</span> uri=&quot;<i>pathname</i>&quot;/&gt;</span></a></dd>
1144         <dd class="value">
1145         <p>This element is used to specify individual attribute acceptance policies that will apply to an application
1146         and may appear zero or more times within the <a href="#confApplications"><span class="fixed">Applications</span></a>
1147         or <a href="#confApplication"><span class="fixed">Application</span></a> element. For information about these
1148         policies and their format, refer to <a href="#4.e.">section 4.e</a>.</p>
1149         <p>The default set of AAP providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1150         element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1151         </dd>
1152
1153         <dd class="attribute"><a name="confApplication"><span class="fixed">&lt;Application <span class="mandatory">id=&quot;<i>identifier</i>&quot;</span> providerId=&quot;<i>identifier</i>&quot; signRequest=&quot;<i>true/false</i>&quot; signedResponse=&quot;<i>true/false</i>&quot; signedAssertions=&quot;<i>true/false</i>&quot;&gt;</span></a></dd>
1154         <dd class="value">
1155         <p>Individual applications that require different attributes, session settings, metadata, etc. can be differentiated
1156         from the default configuration as specified in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1157         element. It must contain a <a href="#confSessions"><span class="fixed">Sessions</span></a> element, but overriding other
1158         elements is optional.</p>
1159             <ul>
1160             <li class="mandatory"><span class="fixed">id</span>: This attribute defines an internal identifier allowing
1161                 individual <span class="fixed">applicationId</span> attributes as part of
1162                 <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a>
1163                 elements to point to this <span class="fixed">Application</span> to handle requests.</li>
1164             <li><span class="fixed">providerId</span>: Distinct from the internal identifier, this is the unique identifier
1165                 that will be used when communicating with origin sites to request authentication or attributes.
1166                 This value is referenced by origins when creating rules for the release of attributes to targets and will
1167                 often be provided to federations to facilitate origin configuration. If none is specified, the default
1168                 <a href="#confApplications"><span class="fixed">Applications</span></a> element's
1169                 <span class="fixed">providerId</span> applies.</li>
1170             <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute
1171             requests that it sends to origins on behalf of this application. This is usually unnecessary, as the
1172             TLS/SSL transport can provide authentication more efficiently.</li>
1173             <li><span class="fixed">signedResponse</span>: If <span class="fixed">true</span>, the target will require that
1174             all SAML attribute responses it receives for this application be signed.</li>
1175             <li><span class="fixed">signedAssertions</span>: If <span class="fixed">true</span>, the target will require that
1176             individual SAML assertions it receives for this application be signed. This may be particularly useful if the
1177             application is forwarding the assertion, but requires a liberal (or no) AAP to avoid corrupting the signature.</li>
1178             </ul>
1179         </dd>
1180
1181         <dd class="attribute"><a name="confApplications"><span class="fixed">&lt;Applications <span class="mandatory">id=&quot;<i>default</i>&quot; providerId=&quot;<i>identifier</i>&quot;</span> signRequest=&quot;<i>true/false</i>&quot; signedResponse=&quot;<i>true/false</i>&quot; signedAssertions=&quot;<i>true/false</i>&quot;&gt;</span></a></dd>
1182         <dd class="value">
1183         <p>The <span class="fixed">Applications</span> element must appear once and contains default settings for requests
1184         handled by the target. It must contain at least one each of the <a href="#confSessions"><span class="fixed">Sessions</span></a>,
1185         and <a href="#confErrors"><span class="fixed">Errors</span></a> elements, and may contain
1186         <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a>,
1187         <a href="#confAttributeDesignator"><span class="fixed">saml:AttributeDesignator</span></a>,
1188         <a href="#confAudience"><span class="fixed">saml:Audience</span></a>,
1189         <a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a>,
1190         <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a>,
1191         <a href="#confRevocationProvider"><span class="fixed">RevocationProvider</span></a>,
1192         and <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1193             <ul>
1194             <li class="mandatory"><span class="fixed">id</span>: This attribute has a fixed value of "default" and should not be changed.</li>
1195             <li class="mandatory"><span class="fixed">providerId</span>: Distinct from the internal identifier, the
1196                 <span class="fixed">providerId</span> is the unique identifier that will be used when communicating
1197                 with origin sites to request authentication or attributes. This value is referenced by origins when
1198                 creating rules for the release of attributes to targets and will often be provided to federations to
1199                 facilitate origin configuration.</li>
1200             <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute
1201             requests that it sends to origins by default. This is usually unnecessary, as the TLS/SSL transport can provide
1202             authentication more efficiently.</li>
1203             <li><span class="fixed">signedResponse</span>: If <span class="fixed">true</span>, the target will require that
1204             all SAML attribute responses it receives are signed by default.</li>
1205             <li><span class="fixed">signedAssertions</span>: If <span class="fixed">true</span>, the target will require that
1206             individual SAML assertions it receives are signed by default. This may be particularly useful if the
1207             application is forwarding the assertion, but requires a liberal (or no) AAP to avoid corrupting the signature.</li>
1208             </ul>
1209         <p>Default settings can be overridden by using the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> to
1210         assign a non-default <span class="fixed">applicationId</span> to particular content in
1211         <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a>
1212         elements. An <a href="#confApplication"><span class="fixed">Application</span></a> element is then inserted containing
1213         a matching <span class="fixed">id</span> attribute, and finally specific elements that override the defaults are
1214         placed within it. A fully specified <a href="#confSessions"><span class="fixed">Sessions</span></a> element is
1215         always required for any new application created, because each application needs a distinct
1216         <span class="fixed">shireURL</span> so that new sessions can be unambiguously mapped to a particular application.</p>
1217         </dd>
1218
1219         <dd class="attribute"><a name="confArgument"><span class="fixed">&lt;Argument&gt;<i>value</i>&lt;/Argument&gt;</span></a></dd>
1220         <dd class="value">
1221         <p>The <span class="fixed">Argument</span> element is used in the
1222         <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to specify one or more
1223         arguments to pass to the MySQL database engine.</p>
1224         </dd>
1225
1226         <dd class="attribute"><a name="confAttributeDesignator"><span class="fixed">&lt;saml:AttributeDesignator <span class="mandatory">AttributeName=&quot;<i>name</i>&quot; AttributeNamespace=&quot;<i>namespace</i>&quot;</span>&gt;</span></a></dd>
1227         <dd class="value">
1228         <p>The <span class="fixed">AttributeDesignator</span> element is used in the
1229         <a href="#confApplications"><span class="fixed">Applications</span></a> and
1230         <a href="#confApplication"><span class="fixed">Application</span></a> elements to name an attribute to specifically
1231         request from origins on behalf of an application. If none are specified, the application will be given anything
1232         the origin allows it to receive.</p>
1233             <ul>
1234             <li class="mandatory"><span class="fixed">AttributeName</span>: Specifies the name of a SAML attribute, generally a URI.</li>
1235             <li class="mandatory"><span class="fixed">AttributeNamespace</span>: Specifies the attribute's SAML namespace,
1236             which Shibboleth by convention sets to &quot;urn:mace:shibboleth:1.0:attributeNamespace:uri&quot;.</li>
1237             </ul>
1238         <p>The default set of designators can be overridden within individual
1239         <a href="#confApplication"><span class="fixed">Application</span></a> elements, but if default elements are specified,
1240         it isn't possible to &quot;remove&quot; them and revert to none within a particular application.</p>
1241         </dd>
1242
1243         <dd class="attribute"><a name="confAudience"><span class="fixed">&lt;saml:Audience&gt;<i>value</i>&lt;/saml:Audience&gt;</span></a></dd>
1244         <dd class="value">
1245         <p>The <span class="fixed">Audience</span> element is used in the
1246         <a href="#confApplications"><span class="fixed">Applications</span></a> and
1247         <a href="#confApplication"><span class="fixed">Application</span></a> elements element to specify one or more
1248         SAML audience URIs to designate while processing assertions. Audience values are used by origins to constrain the
1249         parties they issue assertions for. A target application always includes its own <span class="fixed">providerId</span>
1250         as an audience value.</p>
1251         <p>Within an <a href="#confApplication"><span class="fixed">Application</span></a> element, this setting is not
1252         inherited from the <a href="#confApplications"><span class="fixed">Applications</span></a> element. Any values
1253         desired must be specified. In most cases, this element can be omitted.</p>
1254         </dd>
1255
1256         <dd class="attribute"><a name="confCAPath"><span class="fixed">&lt;CAPath&gt;<i>pathname</i>&lt;/CAPath&gt;</span></a></dd>
1257         <dd class="value">
1258         <p>Paired with a <a href="#confCredPath"><span class="fixed">Path</span></a> element within a
1259         <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, it allows for the specification
1260         of additional certificates in a chain up to a trust anchor. As many <span class="fixed">CAPath</span> elements as
1261         necessary to complete the chain may be specified. May be needed if the relying party does not possess the entire CA
1262         chain already.</p>
1263         </dd>
1264
1265         <dd class="attribute"><a name="confCertificate"><span class="fixed">&lt;Certificate format=&quot;<i>type</i>&quot;&gt;</span></a></dd>
1266         <dd class="value">
1267         <p>This specifies the certificate corresponding to this set of credentials. The certificate itself must be specified
1268         by a <a href="#confCredPath"><span class="fixed">Path</span></a> element contained by this element. If the certificate
1269         isn't self-signed or signed by an authority familiar to the relying party, the files of certificates in the path to
1270         the root authority may be specified using one or more <a href="#confCAPath"><span class="fixed">CAPath</span></a> elements.
1271         Valid formats are <span class="fixed">PEM</span>, <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>.</p>
1272         <p>It's placed within the <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element and must be
1273         paired with the corresponding private key using the <a href="#confKey"><span class="fixed">Key</span></a> element.</p>
1274         </dd>
1275
1276         <dd class="attribute"><a name="confCredentials"><span class="fixed">&lt;Credentials xmlns=&quot;urn:mace:shibboleth:credentials:1.0&quot;&gt;</span></a></dd>
1277         <dd class="value">
1278         <p>This element is the container for credentials used by the XML-based credentials provider with type
1279         &quot;edu.internet2.middleware.shibboleth.common.Credentials&quot;. These credentials are used by the target to
1280         authenticate itself in SSL sessions or sign attribute requests, depending on application configuration. It must contain
1281         one or more <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> elements.</p>
1282         </dd>
1283
1284         <dd class="attribute"><a name="confCredentialsProvider"><span class="fixed">&lt;CredentialsProvider <span class="mandatory">type=&quot;edu.internet2.middleware.shibboleth.common.Credentials&quot;</span>&gt;</span></a></dd>
1285         <dd class="value">
1286         <p>This element is the container for providers of credentials used by the target and is placed inside the
1287         <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element. The supplied
1288         provider of type &quot;edu.internet2.middleware.shibboleth.common.Credentials&quot; must contain one
1289         <a href="#confCredentials"><span class="fixed">Credentials</span></a> element detailing the credentials
1290         to be used by the target. Other provider types might require different content.</p>
1291         </dd>
1292
1293         <dd class="attribute"><a name="confCredentialUse"><span class="fixed">&lt;CredentialUse <span class="mandatory">TLS=&quot;<i>string</i>&quot; Signing=&quot;<i>string</i>&quot;</span>&gt;</span></a></dd>
1294         <dd class="value">
1295         <p>Used in the <a href="#confApplications"><span class="fixed">Applications</span></a> or
1296         <a href="#confApplication"><span class="fixed">Application</span></a> elements to specify the credentials used by
1297         applications for signing and TLS/SSL. The <span class="fixed">TLS</span> and <span class="fixed">Signing</span>
1298         attribute values reference the identifiers of credential resolvers defined in the
1299         <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> element. May also contain
1300         <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements that specify the credentials
1301         to use for specific origins or federations.</p>
1302         </dd>
1303
1304         <dd class="attribute"><a name="confErrors"><span class="fixed">&lt;Errors <span class="mandatory">shire=&quot;<i>pathname</i>&quot; rm=&quot;<i>pathname</i>&quot; access=&quot;<i>pathname</i>&quot;</span> supportContact=&quot;<i>e-mail</i>&quot; logoLocation=&quot;<i>URL</i>&quot;/&gt;</span></a></dd>
1305         <dd class="value">
1306         <p>Shibboleth is capable of displaying customized error pages based on templates and information provided by
1307         additional attributes in this element. These should all be customized to fit the requirements of the target application.
1308         For more information on configuration of error page generation, please see <a href="#4.b.">section 4.b</a>.</p>
1309             <ul>
1310             <li class="mandatory"><span class="fixed">shire</span>: Specifies the location of the template for the error page
1311             generated when there is an error re-directing the user to the WAYF or processing a new session sign-on.</li>
1312             <li class="mandatory"><span class="fixed">rm</span>: Specifies the location of the template for the error page
1313             generated if internal errors occur when supplying attributes to the application.</li>
1314             <li class="mandatory"><span class="fixed">accessError</span>: Specifies the location of the template for the page
1315             displayed to users when access to a protected resource is denied based on access control. This is distinct
1316             from when errors occur during the evaluation process itself, and indicates a denial of authorization.</li>
1317             <li><span class="fixed">supportContact</span>: Specifies a support e-mail address for the user to contact.</li>
1318             <li><span class="fixed">logoLocation</span>: Specifies the location of the logo used in the generation of error pages.
1319             This logo can be in any format that the web browser will understand, and should be a URL (absolute or relative) that
1320             will return a valid logo.</li>
1321             </ul>
1322         <p>The last two attributes are examples of tags that can be inserted at runtime into the templates. Arbitrary
1323         attributes may be specified in this element simply by adding them; no additional configuration is necessary.
1324         If there is a matching ShibMLP tag in the error page template as designed in <a href="#4.b.">4.b</a>, Shibboleth
1325         will insert the value of that attribute.</p>
1326         </dd>
1327
1328         <dd class="attribute"><a name="confExtensions"><span class="fixed">&lt;Extensions&gt;</span></a></dd>
1329         <dd class="value">
1330         Extension libraries for one of the Shibboleth components or the entire target can be specified using this element
1331         depending on where it's present. It may be contained by any of the
1332         <a href="#confSHAR"><span class="fixed">SHAR</span></a>, <a href="#confSHIRE"><span class="fixed">SHIRE</span></a>,
1333         or <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> elements.
1334         It must contain one or more <a href="#confLibrary"><span class="fixed">Library</span></a> elements.
1335         </dd>
1336
1337         <dd class="attribute"><a name="confFederationProvider"><span class="fixed">&lt;FederationProvider <span class="mandatory">type=&quot;edu.internet2.middleware.shibboleth.common.provider.XMLMetadata&quot;</span> uri=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1338         <dd class="value">
1339         <p>This element, when specified within an <a href="#confApplications"><span class="fixed">Applications</span></a>
1340         or <a href="#confApplication"><span class="fixed">Application</span></a> element, points to operational metadata either
1341         inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download
1342         periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.</p>
1343         <p>The default set of federation providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1344         element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1345         </dd>
1346
1347         <dd class="attribute"><a name="confFileResolver"><span class="fixed">&lt;FileResolver <span class="mandatory">Id=&quot;<i>string</i>&quot;</span>&gt;</span></a></dd>
1348         <dd class="value">
1349         <p>This element defines files used to store a private key, certificate, and certificate authorities and associates
1350         the set with an identifier. Placed inside the <a href="#confCredentials"><span class="fixed">Credentials</span></a>
1351         element. <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> and
1352         <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements will refer to these identifiers in
1353         their <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attributes, allowing different credentials
1354         to be used for different applications and relying parties.</p>
1355         <p>Must contain one <a href="#confKey"><span class="fixed">Key</span></a> element and should contain one
1356         <a href="#confCertificate"><span class="fixed">Certificate</span></a> element.</p>
1357         </dd>
1358
1359         <dd class="attribute"><a name="confHost"><span class="fixed">&lt;Host scheme=&quot;<i>protocol</i>&quot; <span class="mandatory">name=&quot;<i>fqdn</i>&quot;</span> port=&quot;<i>integer</i>&quot; applicationId=&quot;<i>id</i>&quot; requireSession=&quot;<i>true/false</i>&quot; exportAssertion=&quot;<i>true/false</i>&quot;&gt;</span></a></dd>
1360         <dd class="value">
1361         <p>Individual (real or virtual) hosts that this target protects are enumerated by <span class="fixed">Host</span> elements
1362         inside the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element. If a request is processed by
1363         Shibboleth for a URL on this host, these parameters will be applied to it. If there are
1364         <a href="#confPath"><span class="fixed">Path</span></a> elements within this element that match the URL and contain
1365         the <span class="fixed">applicationId</span>, <span class="fixed">requireSession</span>, or
1366         <span class="fixed">exportAssertion</span> attributes, they will override values in this element; similarly, values
1367         within this element will override those in the containing
1368         <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element.</p>
1369             <ul>
1370             <li><span class="fixed">scheme</span>: This specifies the protocol on which this host responds.
1371             Valid choices are <span class="fixed">http</span>, <span class="fixed">https</span>, <span class="fixed">ftp</span>,
1372             <span class="fixed">ldap</span>, and <span class="fixed">ldaps</span>.</li>
1373             <li class="mandatory"><span class="fixed">name</span>: This is the fully-qualified domain name of the host.
1374             This appended to the <span class="fixed">scheme</span> must match what is contained in the URL for the element's
1375             settings to apply to the request.</li>
1376             <li><span class="fixed">port</span>: This is the port the host is listening on, if not the standard port for the scheme.</li>
1377             <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish
1378             an authenticated session with the user before handing off the request to the web server or application.
1379             If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span>
1380             (the default), applications are responsible for ensuring that a session exists if necessary, so-called
1381             <a href="#1.g.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span>
1382             for protected content without a full understanding of the implications.</li>
1383             <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute
1384             assertion received from the origin is exported to a CGI request header called
1385             <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an
1386             application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments
1387             should use.</li>
1388             </ul>
1389         </dd>
1390
1391         <dd class="attribute"><a name="confImplementation"><span class="fixed">&lt;Implementation&gt;</span></a></dd>
1392         <dd class="value">
1393         <p>A container element placed inside the <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element,
1394         the contents of this element will vary depending on the web server or environment that this Shibboleth deployment serves.
1395         Multiple configurations may be specified, but only one per implementation type. This element may contain the
1396         <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element.</p>
1397         </dd>
1398
1399         <dd class="attribute"><a name="confISAPI"><span class="fixed">&lt;ISAPI normalizeRequest=&quot;<i>true/false</i>&quot;&gt;</span></a></dd>
1400         <dd class="value">
1401         <p>The configuration information for Shibboleth targets deployed on Microsoft IIS is stored inside this container element.
1402         This element must contain one or more <a href="#confSite"><span class="fixed">Site</span></a> elements, each of which
1403         maps an INSTANCE ID value to a hostname. If <span class="fixed">normalizeRequest</span> is
1404         <span class="fixed">true</span> (the default), all redirects and computed request URLs generated by Shibboleth will
1405         be created using the hostname assigned to the site instance handling the request. If <span class="fixed">false</span>,
1406         the browser's supplied URL is sometimes used to compute the information. Placed inside the
1407         <a href="#confImplementation"><span class="fixed">Implementation</span></a> element.</p>
1408         </dd>
1409
1410         <dd class="attribute"><a name="confKey"><span class="fixed">&lt;Key format=&quot;<i>type</i>&quot;&gt;</span></a></dd>
1411         <dd class="value">
1412         <p>Specifies a file containing a private key to be used within a set of credentials. Valid formats are
1413         <span class="fixed">PEM</span> (the default), <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>.
1414         Placed within a <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, it should be paired
1415         with a <a href="#confCertificate"><span class="fixed">Certificate</span></a> element, and contain a
1416         <a href="#confCredPath"><span class="fixed">Path</span></a> element.</p>
1417         </dd>
1418
1419         <dd class="attribute"><a name="confLibrary"><span class="fixed">&lt;Library <span class="mandatory">path=&quot;<i>pathname</i>&quot;</span> fatal=&quot;<i>true/false</i>&quot;/&gt;</span></a></dd>
1420         <dd class="value">
1421         <p>This element defines an extension library for one of Shibboleth's components and is placed within an
1422         <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.</p>
1423             <ul>
1424             <li class="mandatory"><span class="fixed">path</span>: This designates the complete pathname of the library.</li>
1425             <li><span class="fixed">fatal</span>: If <span class="fixed">true</span> and the library is not located or fails
1426             to load properly, the target will not successfully initialize. The default is false.</li>
1427             </ul>
1428         </dd>
1429
1430         <dd class="attribute"><a name="confListener"><span class="fixed">&lt;Listener <span class="mandatory">type=&quot;<i>string</i>&quot;</span>&gt;</span></a></dd>
1431         <dd class="value">
1432         <p>Specifies a pluggable implementation of a mechanism for communication between the web server and SHAR,
1433         specified in the <span class="fixed">type</span> attribute. This element is placed within the
1434         <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the
1435         <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and
1436         <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> elements.</p>
1437         </dd>
1438
1439         <dd class="attribute"><a name="confMemorySessionCache"><span class="fixed">&lt;MemorySessionCache AAConnectTimeout=&quot;<i>seconds</i>&quot; AATimeout=&quot;<i>seconds</i>&quot; cacheTimeout=&quot;<i>seconds</i>&quot; cleanupInterval=&quot;<i>seconds</i>&quot; defaultLifetime=&quot;<i>seconds</i>&quot; propagateErrors=&quot;<i>true/false</i>&quot; retryInterval=&quot;<i>seconds</i>&quot; strictValidity=&quot;<i>true/false</i>&quot;/&gt;</span></a></dd>
1440         <dd class="value">
1441         <p>Shibboleth will cache sessions and received attributes in memory if this element is found in the
1442         <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. This element is mutually exclusive with the
1443         <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> and
1444         <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.</p>
1445             <ul>
1446             <li><span class="fixed">AAConnectTimeout</span>: Time in seconds the target will wait before timing out on the
1447             initial connection to an origin to request attributes.  Defaults to <span class="fixed">15</span>.</li>
1448             <li><span class="fixed">AATimeout</span>: Time in seconds the target will wait before timing out while waiting
1449             for attributes from an origin once the initial connection is established. Defaults to <span class="fixed">30</span>.</li>
1450             <li><span class="fixed">cacheTimeout</span>: Time in seconds to permit a session to stay in the cache before
1451             being purged. Defaults to <span class="fixed">28800</span>.</li>
1452             <li><span class="fixed">cleanupInterval</span>: Seconds between runs of the background thread that purges
1453             expired sessions. Defaults to <span class="fixed">300</span>.</li>
1454             <li><span class="fixed">defaultLifetime</span>: If the attribute assertion doesn't carry an explicit
1455             expiration time, the assertion will expire after this time in <span class="fixed">seconds</span> has elapsed.
1456             Defaults to <span class="fixed">1800</span>.</li>
1457             <li><span class="fixed">propagateErrors</span>: If true, then any errors that occur during the attribute
1458             query stage are fatal and will be presented to the user as an error, terminating their session. If false,
1459             any errors that occur during the query are non-fatal, and the application will be given older, expired
1460             attributes based on the <span class="fixed">strictValidity</span> setting.
1461             <p>This should generally only be left to false (the default) by deployments that are using real principal
1462             names as subjects because attribute retrieval is treated as an optional process.</p></li>
1463             <li><span class="fixed">retryInterval</span>: Time in seconds between attempts to obtain fresh attributes.  If a query fails, a timer is set, and once the interval elapses, the next user request causes another query. This prevents pointless repeated attempts to query a failed origin. Defaults to <span class="fixed">300</span>.</li>
1464             <li><span class="fixed">strictValidity</span>: If true, expired attributes will never be made available to the Shibboleth application; if no valid attributes can be obtained, then an empty set is provided.  When false, if a fresh set of attributes cannot be retrieved due to failures, any cached, expired attributes are made available.  Defaults to <span class="fixed">true</span>.</li>
1465             </ul>
1466         </dd>
1467
1468         <dd class="attribute"><a name="confMySQLSessionCache"><span class="fixed">&lt;MySQLSessionCache mysqlTimeout=&quot;<i>seconds</i>&quot;/&gt;</span></a></dd>
1469         <dd class="value">
1470         <p>Shibboleth will back the memory cache of sessions using an embedded MySQL database if this element is found
1471         in the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. Arguments may be passed directly to
1472         MySQL by populating this element with <span class="fixed"><a href="#confArgument">Argument</a></span> elements.
1473         The element may also specify any of the attributes defined for the <a href="#confMemorySessionCache">MemorySessionCache</a>
1474         element. Mutually exclusive with the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a>
1475         and <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.</p>
1476             <ul>
1477             <li><span class="fixed">mysqlTimeout</span>: Time in seconds to permit a session to stay in the persistent
1478             cache before being purged. Defaults to <span class="fixed">28800</span>.</li>
1479             </ul>
1480         </dd>
1481
1482         <dd class="attribute">(RequestMap) <a name="confPath"><span class="fixed">&lt;Path <span class="mandatory">name=&quot;<i>pathname</i>&quot;</span> applicationId=&quot;<i>id</i>&quot; requireSession=&quot;<i>true/false</i>&quot; exportAssertion=&quot;<i>true/false</i>&quot;&gt;</span></a></dd>
1483         <dd class="value">
1484         <p>This element allows for different application identifiers and session handling to be defined iteratively for
1485         subdirectories or documents within a host. Requests are processed on a best-match basis, with the innermost
1486         element taking precedence. Path elements may be contained by <a href="#confHost"><span class="fixed">Host</span></a>
1487         elements or other <a href="#confPath"><span class="fixed">Path</span></a> elements.</p>
1488             <ul>
1489             <li class="mandatory"><span class="fixed">name</span>: This is the name of the path component or filename to match
1490             against the request. Only exact matching is supported by the supplied request mapping provider.</li>
1491             <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish
1492             an authenticated session with the user before handing off the request to the web server or application.
1493             If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span>
1494             (the default), applications are responsible for ensuring that a session exists if necessary, so-called
1495             <a href="#1.g.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span>
1496             for protected content without a full understanding of the implications.</li>
1497             <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute
1498             assertion received from the origin is exported to a CGI request header called
1499             <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an
1500             application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments
1501             should use.</li>
1502             </ul>
1503         </dd>
1504
1505         <dd class="attribute">(Credential) <a name="confCredPath"><span class="fixed">&lt;Path&gt;<i>pathname</i>&lt;/Path&gt;</span></a></dd>
1506         <dd class="value">
1507         <p>Placed inside the <a href="#confKey"><span class="fixed">Key</span></a> and
1508         <a href="#confCertificate"><span class="fixed">Certificate</span></a> elements to specify the pathname of the file
1509         containing the credential.</p>
1510         </dd>
1511
1512         <dd class="attribute"><a name="confRelyingParty"><span class="fixed">&lt;RelyingParty <span class="mandatory">name=&quot;<i>string</i>&quot; TLS=&quot;<i>string</i>&quot; Signing=&quot;<i>string</i>&quot;</span>&gt;</span></a></dd>
1513         <dd class="value"><p>One or more <span class="fixed">RelyingParty</span> elements may be contained by a <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> element to enumerate relying parties for which a distinct set of credentials should be used. The <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attribute values reference the identifiers of credential resolvers defined in <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements.</p>
1514 <ul>
1515 <li class="mandatory"><span class="fixed">name</span>: Identifies the origin site or group of sites to which the credentials specified in the element apply.  This is used to match the providerId sent within attribute assertions from origin sites against a set of "groups" based on metadata.</li>
1516 </ul>
1517 </dd>
1518
1519         <dd class="attribute"><a name="confRequestMap"><span class="fixed">&lt;RequestMap <span class="mandatory">applicationId=&quot;<i>default</i>&quot;</span> requireSession=&quot;<i>true/false</i>&quot; exportAssertion=&quot;<i>true/false</i>&quot;&gt;</span></a></dd>
1520         <dd class="value">
1521         <p>The <span class="fixed">RequestMap</span> element is a container holding
1522         <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a>
1523         elements. Request URLs processed by Shibboleth are parsed and matched against this set of elements in order to
1524         determine how to process the request. Attributes on the RequestMap, Host, and Path elements specify whether to
1525         require an authenticated session, and how to locate the associated Application element and settings.</p>
1526             <ul>
1527             <li><span class="fixed">applicationId</span>: Contains a fixed value of "default" to reference the default
1528             <a href="#confApplications"><span class="fixed">Applications</span></a> element.</li>
1529             <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish
1530             an authenticated session with the user before handing off the request to the web server or application.
1531             If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span>
1532             (the default), web applications are responsible for ensuring that a session exists if necessary, so-called
1533             <a href="#1.g.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span>
1534             for protected content without a full understanding of the implications.</li>
1535             <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute
1536             assertion received from the origin is exported to a CGI request header called
1537             <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an
1538             application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments
1539             should use.</li>
1540             </ul>
1541         </dd>
1542
1543         <dd class="attribute"><a name="confRequestMapProvider"><span class="fixed">&lt;RequestMapProvider <span class="mandatory">type=&quot;edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap&quot;</span> uri=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1544         <dd class="value">
1545         <p>This element specifies a request mapper that defines how Shibboleth will handle sessions and other behavior
1546         for a given request. For the built-in type &quot;edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap&quot;,
1547         there must be a <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element within this element, or
1548         the <span class="fixed">uri</span> attribute must contain the local pathname of an XML file containing one.</p>
1549         </dd>
1550
1551         <dd class="attribute"><a name="confRevocationProvider"><span class="fixed">&lt;RevocationProvider <span class="mandatory">type=&quot;edu.internet2.middleware.shibboleth.common.provider.XMLRevocation&quot;</span> uri=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1552         <dd class="value">
1553         <p>This element, when specified within an <a href="#confApplications"><span class="fixed">Applications</span></a>
1554         or <a href="#confApplication"><span class="fixed">Application</span></a> element, points to revocation information either
1555         inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download
1556         periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.</p>
1557         <p>The default set of revocation providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1558         element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1559         </dd>
1560         
1561         <dd class="attribute"><a name="confSessionCache"><span class="fixed">&lt;SessionCache <span class="mandatory">type=&quot;<i>string</i>&quot;</span>&gt;</span></a></dd>
1562         <dd class="value">
1563         <p>Specifies a pluggable session cache implementation of the specified <span class="fixed">type</span>. This element
1564         is placed within the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with
1565         the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> and
1566         <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> elements.</p>
1567         <p>Any plugin should support the basic attributes defined by the
1568         <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element.</p>
1569         </dd>
1570
1571         <dd class="attribute"><a name="confSessions"><span class="fixed">&lt;Sessions
1572 <span class="mandatory">wayfURL=&quot;<i>URL</i>&quot;
1573 shireURL=&quot;<i>URL</i>&quot;</span>
1574 shireSSL=&quot;<i>true/false</i>&quot;
1575 lifetime=&quot;<i>seconds</i>&quot;
1576 timeout=&quot;<i>seconds</i>&quot;
1577 checkAddress=&quot;<i>true/false</i>&quot;
1578 cookieName=&quot;<i>URL</i>&quot;
1579 cookieProps=&quot;<i>URL</i>&quot;&gt;</span></a></dd>
1580         <dd class="value">
1581         <p>Configuration parameters that affect the way Shibboleth handles sessions for an individual application are bundled
1582         in this element, which must be included in each <a href="#confApplication"><span class="fixed">Application</span></a>
1583         and the default <a href="#confApplications"><span class="fixed">Applications</span></a> element. Note that these
1584         parameters only apply to Shibboleth sessions, and not any sessions applications manage on their own behalf.</p>
1585             <ul>
1586             <li class="mandatory"><span class="fixed">wayfURL</span>: The URL of the <a href="#1.c.">WAYF service</a>
1587             responsible for redirecting users accessing this application to their identity provider (origin).</li>
1588             <li class="mandatory">
1589                 <p><span class="fixed">shireURL</span>: Specifies the SHIRE URL, or assertion consumer service, at which
1590                 new sessions are initiated or lazy sessions are triggered. This can be an absolute URL, or a relative path
1591                 to be prefixed by the base URL of the virtual host. Using an absolute URL allows a virtual server to funnel
1592                 requests to a fixed location, to force use of SSL, for example.</p>
1593                 <p>Note that this URL issues the session cookie set on behalf of the application, and this cookie must be
1594                 returned in subsequent requests, so the virtual host's domain name and port must be consistent with this
1595                 domain name and port for some browsers to properly return the cookie. If default ports are used (and thus
1596                 left unspecified), browsers will generally return cookies set via SSL to a non-SSL port. If non-default
1597                 ports are used, it is recommended that this be a relative URL so that each virtual host handles its own
1598                 cookie operations.</p>
1599                 <p>For Shibboleth to function properly in IIS, the file extension at the end of this URL must match the
1600                 value configured into IIS and mapped to the ISAPI extension. This causes the request to be serviced properly,
1601                 even though no file by that name actually exists.</p>
1602             </li>
1603             <li><span class="fixed">shireSSL</span>: If <span class="fixed">true</span> (the default), the application will
1604             <b>only</b> accept new session requests over SSL, as is strongly recommended; see <a href="#2.c.">section 2.c</a>
1605             for more details.</li>
1606             <li><span class="fixed">cookieName</span>: Optionally specifies the name given to in-memory session cookies that
1607             are associated with this application. If omitted, Shibboleth will generate a cookie name for you of the form
1608             _shibsession_&lt;Application ID&gt;</li>
1609             <li><span class="fixed">cookieProps</span>: A string of additional Set-Cookie properties can be specified using
1610             this element which give the browser further instructions about cookie processing and use. Always begin with a
1611             semicolon to delineate from the session ID value.</li>
1612             <li><span class="fixed">lifetime</span>: Duration in seconds of the Shibboleth session; this does not affect
1613             the lifetime of application sessions initiated independently of Shibboleth. Defaults to 3600. If 0 is specified,
1614             sessions are infinite, subject to purging by the cache.</li>
1615             <li><span class="fixed">timeout</span>: If the value in seconds elapses following the last request in a
1616             session, the session will be expired for inactivity and a new session must be initiated upon the next request.
1617             Defaults to 1800. If 0 is specified, there is no inactivity timeout</li>
1618             <li><span class="fixed">checkAddress</span>: If <span class="fixed">true</span> (the default), Shibboleth will
1619             check the browser's client address to insure that session cookies are issued and used by a consistent client address.
1620             In most circumstances, this should be enabled to help prevent attacks using stolen cookies, but this can cause
1621             problems for users behind proxies or NAT devices.</li>
1622             </ul>
1623         </dd>
1624
1625         <dd class="attribute"><a name="confSHAR"><span class="fixed">&lt;SHAR logger=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1626         <dd class="value">
1627         <p>This is the container element for configuration information pertaining to the SHAR, the target component responsible
1628         for most attribute and session processing. Its single attribute, <span class="fixed">logger</span>, points to a
1629         Log4J-format property configuration file that controls SHAR logging behavior. It is placed within the
1630         <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an
1631         <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1632         <p>It must contain either a <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> element to listen
1633         to the server module on a UNIX domain socket or a <a href="#confTCPListener"><span class="fixed">TCPListener</span></a>
1634         element to listen on a TCP port. Session caching must also be specified using a
1635         <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element to use in-memory session
1636         caching or a <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to backup session
1637         information into a MySQL database.</p>
1638         </dd>
1639
1640         <dd class="attribute"><a name="confShibbolethTargetConfig"><span class="fixed">&lt;ShibbolethTargetConfig clockSkew=&quot;integer&quot;&gt;</span></a></dd>
1641         <dd class="value">
1642         <p>This is the root element for target configuration and must be present once and only once. It must always contain a
1643         <a href="#confSHAR"><span class="fixed">SHAR</span></a> element, a
1644         <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element, an
1645         <a href="#confApplications"><span class="fixed">Applications</span></a> element, one or more
1646         <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements, and optionally an
1647         <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.</p>
1648             <ul>
1649             <li><span class="fixed">clockSkew</span>: Controls allowed clock skew in seconds between target and origin servers
1650             when evaluating times sent in messages. Defaults to 180, and should be as small as practical.</li>
1651             </ul>
1652         </dd>
1653
1654         <dd class="attribute"><a name="confSHIRE"><span class="fixed">&lt;SHIRE logger=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1655         <dd class="value">
1656         <p>This is the container element for configuration information pertaining to the SHIRE, the part of the target that
1657         integrates into the web server environment. Its single attribute, <span class="fixed">logger</span>, points to a
1658         Log4J-format property configuration file that controls SHIRE logging behavior. It is placed within the
1659         <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an
1660         <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1661         <p>It may contain an <a href="#confImplementation"><span class="fixed">Implementation</span></a> element, within which
1662         configuration for the SHIRE which varies by platform will be specified.</p>
1663         <p>It may contain a <a href="#confRequestMapProvider"><span class="fixed">RequestMapProvider</span></a> element,
1664         which provides fine-grained control over aspects of target behavior at a host, path, or document level.</p>
1665         </dd>
1666
1667         <dd class="attribute"><a name="confSite"><span class="fixed">&lt;Site <span class="mandatory">id=&quot;<i>INSTANCE_ID</i>&quot; host=&quot;<i>fqdn</i>&quot;</span> scheme=&quot;<i>http/https</i>&quot; port=&quot;<i>integer</i>&quot;&gt;</span></a></dd>
1668         <dd class="value">
1669         <p>This element is placed in the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element to specify a
1670         mapping from individual instance ID's to the corresponding host, port, and scheme.</p>
1671         </dd>
1672
1673         <dd class="attribute"><a name="confTCPListener"><span class="fixed">&lt;TCPListener <span class="mandatory">address=&quot;<i>pathname</i>&quot;  port=&quot;<i>integer</i>&quot;</span> acl=&quot;<i>ip</i>&quot;&gt;</span></a></dd>
1674         <dd class="value">
1675         <p>This element is placed within the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually
1676         exclusive with the <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> and
1677         <a href="#confListener"><span class="fixed">Listener</span></a> elements. It allows the SHAR to communicate with the
1678         web server component using TCP.</p>
1679             <ul>
1680             <li class="mandatory"><span class="fixed">address</span>: Specifies the IP address of the listener.</li>
1681             <li class="mandatory"><span class="fixed">port</span>: Specifies the TCP port on which the SHAR will listen.</li>
1682             <li><span class="fixed">acl</span>: By default, the SHAR will only listen to requests from 127.0.0.1 (localhost). 
1683             This should generally not be specified except in test environments.</li>
1684             </ul>
1685         </dd>
1686
1687         <dd class="attribute"><a name="confTrustProvider"><span class="fixed">&lt;TrustProvider <span class="mandatory">type=&quot;edu.internet2.middleware.shibboleth.common.provider.XMLTrust&quot;</span> uri=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1688         <dd class="value">
1689         <p>This element, when specified within an <a href="#confApplications"><span class="fixed">Applications</span></a>
1690         or <a href="#confApplication"><span class="fixed">Application</span></a> element, points to trust metadata either
1691         inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download
1692         periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.</p>
1693         <p>The default set of trust providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1694         element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1695         </dd>
1696
1697         <dd class="attribute"><a name="confUnixListener"><span class="fixed">&lt;UnixListener address=&quot;<i>pathname</i>&quot;&gt;</span></a></dd>
1698         <dd class="value">
1699         <p>Use this element to specify a UNIX domain socket located at the <span class="fixed">pathname</span> specified in
1700         the <span class="fixed">address</span> attribute at which the SHAR should listen for requests. This element must be
1701         contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the
1702         <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and
1703         <a href="#confListener"><span class="fixed">Listener</span></a> elements.
1704         <span class="fixed">UnixListener</span> cannot be specified for Windows-based installations.</p>
1705         </dd>
1706
1707 </dl></blockquote>
1708 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1709 <blockquote>
1710     <p>Shibboleth supports the dynamic generation of information in error pages 
1711     referenced by the <a href="#confErrors"><span class="fixed">Errors</span></a> element
1712     in <span class="fixed">shibboleth.xml</span>. The target implementation
1713     employs a simply template language to insert special tags into the 
1714     generated HTML. The parser will read the error template looking for any tag that 
1715     looks like:</p>
1716     <blockquote>
1717         <p><span class="fixed">&lt;shibmlp tag-name /&gt;</span> </p>
1718     </blockquote>
1719     <p>Shibboleth will replace <span class="fixed">tag-name</span> with the 
1720     appropriate markup tag either from the table below or by looking for a matching XML attribute
1721     in the <a href="#confErrors"><span class="fixed">Errors</span></a> element:</p>
1722     <dl>
1723         <dd class="attribute"><span class="fixed">requestURL</span></dd>
1724         <dd class="value">The user&#39;s requested URL.</dd>
1725         <dd class="attribute"><span class="fixed">errorType</span></dd>
1726         <dd class="value">The type of error.</dd>
1727         <dd class="attribute"><span class="fixed">errorText</span></dd>
1728         <dd class="value">The actual error message.</dd>
1729         <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1730         <dd class="value">A textual description of the error intended for human 
1731         consumption.</dd>
1732         <dd class="attribute"><span class="fixed">originContactName</span></dd>
1733         <dd class="value">The contact name for the origin site provided by that 
1734         site&#39;s metadata.</dd>
1735         <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1736         <dd class="value">The contact email address for the origin site provided 
1737         by that site&#39;s metadata.</dd>
1738         <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1739         <dd class="value">The URL of an error handling page for the origin site 
1740         provided by that site&#39;s metadata.</dd>
1741     </dl>
1742     <p>To improve the appearance of error messages, a simple, limited form of
1743     conditional checking is supported so that the presence of absence of data
1744     to substitute into a particular tag-name can trigger the inclusion or
1745     exclusion of markup. Conditionals look like:</p>
1746     <blockquote>
1747         <p><span class="fixed">&lt;shibmlpif tag-name&gt; arbitrary markup &lt;/shibmlpif&gt;</span><br>
1748         <span class="fixed">&lt;shibmlpifnot tag-name&gt; arbitrary markup &lt;/shibmlpifnot&gt;</span></p>
1749     </blockquote>
1750     <p>Respectively, these special tags include or skip the markup between the tags if the
1751     specified tag-name has an associated value available to be substituted for it. Note that
1752     you cannot nest these conditionals; a <span class="fixed">shibmlpif</span> tag cannot
1753     appear inside another <span class="fixed">shibmlpif</span> tag, due to the simplicity
1754     of the substitution engine.</p>
1755     <p>Sample error templates for different kinds of errors are included in the 
1756     Shibboleth distribution, and can be triggered by anything that will cause 
1757     Shibboleth to be unable to accept an incoming session, obtain attributes,
1758     make an authorization decision, etc., including bad configuration settings,
1759     signature verification or certificate validation failures, or a skewed clock
1760     between sites.</p>
1761     <p><b>You should edit these templates, provide or remove style sheets and 
1762     images, and otherwise customize these templates to suit the user experience 
1763     you want your users to have when errors occur. The defaults are not likely 
1764     to meet the needs of any site.</b></p>
1765 </blockquote>
1766 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1767 <blockquote>
1768     <p>The only target component that must have a private key and certificate is 
1769     the SHAR. While the target server itself should support SSL in most cases 
1770     for users, it is mandatory for the SHAR to authenticate when contacting an 
1771     AA, and it must therefore be given a key and an SSL client certificate. It 
1772     is permissible for the SHAR to use the same keypair and certificate used by 
1773     the target web server itself, provided the certificate is signed by a CA 
1774     accepted by the origin sites that will be queried for attributes.</p>
1775     <p>On Unix, we require that OpenSSL be installed to use Shibboleth. On 
1776     Windows, OpenSSL libraries and the command line tool are included in the 
1777     package and can be used directly, if not otherwise available. Certain
1778     commands require the <span class="fixed">openssl.cnf</span> configuration
1779     file, an example of which is included with the Windows installation in
1780     <span class="fixed">C:\opt\shibboleth\etc\shibboleth\openssl.cnf</span>.
1781     To locate this file for a command that requires it, add the
1782     <span class="fixed">-config C:\opt\shibboleth\etc\shibboleth\openssl.cnf</span>
1783     parameter to the command.</p>
1784     <p>The certificate and key file location should be based on whether they 
1785     will also be used for Apache. If they will be used as a server key pair 
1786     as well, they should probably be in the Apache tree in the usual
1787     <span class="fixed">mod_ssl</span>-defined locations inside the Apache 
1788     configuration folder, and the SHAR can read them from there. If the SHAR is 
1789     not running as <span class="fixed">root</span>, permissions might need to be 
1790     changed to allow this access. If the certificate and key will only be used 
1791     for the SHAR, they can be put in the same folder with the
1792     <span class="fixed">shibboleth.xml</span> file and protected appropriately.</p>
1793     <p>Other web servers like IIS do not use the file formats that Apache and 
1794     Shibboleth can share, and therefore the components must generally use 
1795     separate copies of the key and certificate if they are to be shared. Most 
1796     other servers can export and/or import keys to and from PEM or DER format.
1797     Refer to your server&#39;s documentation or ask for assistance from others
1798     who use it.</p>
1799     <p>The SHAR is assigned a key and a certificate using shibboleth.xml&#39;s
1800     <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element
1801     described in <a href="#4.a.">section 4.a.</a> Various formats are supported and
1802     OpenSSL can generate and convert among them. OpenSSL commands to generate a new
1803     keypair and a certificate request are shown here, assuming 2048 bit RSA keys are
1804     to be used:</p>
1805     <blockquote>
1806         <p><span class="fixed">$ openssl genrsa -out ssl.key 2048<br>
1807         $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1808     </blockquote>
1809     <p>The signed certificate file returned by the CA should be usable directly.</p>
1810     <p>If the key is to be shared with Apache, the web server&#39;s child processes, 
1811     often running as <span class="fixed">nobody</span> or a similar uid, must be
1812     able to read them while the server is running, which may require permission
1813     changes.</p>
1814     <p>This particularly applies when sharing the key and certificate used by 
1815     mod_ssl, which are only readable by root by default. The password, if any, 
1816     must be placed in the <span class="fixed">shibboleth.xml</span> file, since 
1817     the Apache module cannot prompt for it during initial startup as mod_ssl 
1818     can. The issues surrounding how to securely obtain a key while running as
1819     <span class="fixed">nobody</span> may be addressed in a later release. Since 
1820     the password will be stored in clear text in a frequently examined file, it 
1821     is suggested to use a password not used elsewhere, or preferably not to use
1822     a password at all.</p>
1823
1824 </blockquote>
1825 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1826 <blockquote>
1827     <p>Protection of web pages is primarily achieved through &quot;mapping&quot;
1828     attributes provided by an AA to a localized vocabulary for authorization
1829     rules. This is accomplished using features in the AAP syntax, described in
1830     <a href="#4.e.">section 4.e.</a> This applies to both Apache and IIS.</p>
1831     <p><b><u>IIS</u></b></p>
1832     <p>The IIS filter module supports the mapping of attributes into HTTP headers
1833     via AAP files, but it does not yet support rule-based access control and
1834     therefore cannot protect static content at this time. In addition, all of
1835     the configuration settings, such as control over whether to prompt for new
1836     sessions automatically, are managed via the
1837     <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element,
1838     so there are no additional commands to document at this time.<br>
1839     </p>
1840     <p><b><u>Apache</u></b></p>
1841     <p>The Apache module provided can also interpret AAP settings to map
1842     attributes to HTTP request headers and to <span class="fixed">Require</span>
1843     rules, permitting protection of both static and dynamic content. Any of the
1844     typical ways of protecting content may be used (.htaccess, Directory,
1845     Location, Files, etc.). They define what content is to be protected and
1846     static access control rules.</p>
1847     <p>There are two ways to require Shibboleth authentication, but both also require
1848     enabling the module to activate by specifying an <span class="fixed">AuthType</span>
1849     of <span class="fixed">shibboleth</span> and supplying at least one
1850     <span class="fixed">Require</span> rule in <span class="fixed">httpd.conf</span>
1851     or <span class="fixed">.htaccess</span> files. The <span class="fixed">Require</span>
1852     rule can enforce a specific access control policy based on attributes, can specify
1853     <span class="fixed">valid-user</span> to require any authenticated session, or it can
1854     support so-called lazy sessions by using the place-holder rule name of
1855     <span class="fixed">Shibboleth</span>. In such cases, the module is activated, but
1856     in a passive mode that does not automatically force a session, but will process
1857     and validate a session if one exists, leaving the authorization decision to the
1858     application. Using a static access control rule that will fail in the absence of
1859     a session is only sensible if one of the two approaches below that force a session
1860     are used.</p>
1861     <p>To require a session, either the Apache command, <span class="fixed">ShibRequireSession On</span>,
1862     or the <span class="fixed">requireSession</span> boolean XML attribute on the
1863     <a href="#confRequestMap"><span class="fixed">RequestMap</span></a>,
1864     <a href="#confHost"><span class="fixed">Host</span></a>, or
1865     <a href="#confPath"><span class="fixed">Path</span></a> elements in
1866     <span class="fixed">shibboleth.xml</span> can be used. Both approaches are equivalent, and
1867     using either one to require a session will supersede a false or absent setting of the other type.</p>
1868     <p>As an example, the following commands will require Shibboleth authentication for a resource:</p>
1869     <blockquote>
1870         <span class="fixed">AuthType shibboleth<br>
1871         ShibRequireSession On<br>
1872         Require valid-user</span>
1873     </blockquote>
1874     <p>A complete list of Apache directives and their values is below:</p>
1875     <dl>
1876         <dd class="attribute"><span class="fixed">ShibURLScheme &lt;http/https&gt;</span></dd>
1877         <dd class="value">Used in advanced virtual hosting environments which need to generate
1878         SSL redirects from virtual servers that use only HTTP. Supplements the
1879         Apache <span class="fixed">ServerName</span> and <span class="fixed">Port</span>
1880         commands with this missing option. Defaults to a null value in which the scheme
1881         for redirects is based on the physical connection to the server. This is a server-level
1882         command, while the rest of the commands listed are content commands that can appear
1883         anywhere.</dd>
1884         <dd class="attribute"><span class="fixed">AuthType &lt;string&gt;</span></dd>
1885         <dd class="value">Use <span class="fixed">shibboleth</span> for direct 
1886         invocation, or <span class="fixed">Basic</span> plus the
1887         <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1888         <dd class="attribute"><span class="fixed">ShibBasicHijack &lt;on/off&gt;</span></dd>
1889         <dd class="value">Controls whether Shibboleth should or should not 
1890         ignore requests with <span class="fixed">AuthType Basic</span>. Defaults 
1891         to <span class="fixed">off</span>.</dd>
1892         <dd class="attribute"><span class="fixed">ShibRequireSession &lt;on/off&gt;</span></dd>
1893         <dd class="value">Controls whether to require an authenticated session before passing
1894         control to the authorization phase or the actual resource. Defaults to
1895         <span class="fixed">off</span>.</dd>
1896         <dd class="attribute"><span class="fixed">ShibExportAssertion &lt;on/off&gt;</span></dd>
1897         <dd class="value">Controls whether the SAML attribute assertion provided 
1898         by the AA is exported in a base64-encoded HTTP header,
1899         <span class="fixed">HTTP_SHIB_ATTRIBUTES</span>. Defaults to <span class="fixed">off</span>.</dd>
1900         <dd class="attribute"><span class="fixed">ShibRequireAll &lt;on/off&gt;</span></dd>
1901         <dd class="value">Controls whether all <span class="fixed">Require</span> rules
1902         specified must be satisfied before access to the resource is granted. Defaults to
1903         <span class="fixed">off</span>, which means any single rule can be satisfied, the
1904         usual Apache behavior.</dd>
1905         <dd class="attribute"><span class="fixed">AuthGroupFile &lt;pathname&gt;</span></dd>
1906         <dd class="value">Same as mod_auth; collects values found in REMOTE_USER 
1907         into a named group for access control. An attribute must be mapped to 
1908         REMOTE_USER for this to work. Note that mod_auth will not support group 
1909         files when the Shibboleth module is loaded, since they share the same command.
1910         <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is 
1911         implemented</a> by placing a <span class="fixed">.htaccess</span> file 
1912         that references a group file stored at <span class="fixed">/pathname</span>:</p>
1913         <blockquote>
1914             <p><span class="fixed">AuthGroupFile /pathname<br>
1915             require group workgroup</span></p>
1916         </blockquote>
1917         <p>An
1918         <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1919         AuthGroupFile</a> used by Shibboleth might resemble:<br>
1920         <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1921         </dd>
1922         <dd class="attribute"><span class="fixed">Require &lt;string&gt;</span></dd>
1923         <dd class="value">Enforce authorization using one of the following methods.
1924         <ul type="circle">
1925             <li><span class="fixed">valid-user</span><blockquote>
1926                 <p>Any Shibboleth user from a trusted origin site is accepted, 
1927                 even if no actual attributes are received. This is a very 
1928                 minimal kind of policy, but is useful for testing or for 
1929                 deferring real policy to an application.</p>
1930             </blockquote>
1931             </li>
1932             <li><span class="fixed">user</span><blockquote>
1933                 <p>A space-delimited list of values, such as from the
1934                 <span class="fixed">urn:mace:dir:attribute-def:eduPersonPrincipalName</span> 
1935                 attribute. Actually, any attribute can be mapped to REMOTE_USER, 
1936                 even if this doesn&#39;t always make sense.</p>
1937             </blockquote>
1938             </li>
1939             <li><span class="fixed">group</span><blockquote>
1940                 <p>A space-delimited list of group names defined within
1941                 <span class="fixed">AuthGroupFile</span> files, again provided 
1942                 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1943             </blockquote>
1944             </li>
1945             <li><span class="fixed"><i>alias</i></span><blockquote>
1946                 <p>An arbitrary rule name that matches an Alias defined in an 
1947                 AAP file. The rule value is a space-delimited list of attribute 
1948                 values, whose format depends on the attribute in question (e.g. 
1949                 an affiliation rule might look like:</p>
1950                 <p><span class="fixed">require affiliation staff@osu.edu faculty@mit.edu</span></p>
1951             </blockquote>
1952             </li>
1953             <li><span class="fixed">shibboleth</span><blockquote>
1954                 <p>If a session cookie of the expected name exists, the corresponding
1955                 session will be validated and any cached attributes exported as otherwise
1956                 specified. Authorization will be controlled by the resource, unless
1957                 additional rules are specified. If however a session does not already
1958                 exist, or if the current session expires or times out, no session will
1959                 be requested and control will pass to the resource.</p>
1960             </blockquote>
1961             </li>
1962         </ul>
1963         <p>Additionally, for <span class="fixed">user</span> and
1964         <span class="fixed">&lt;alias&gt;</span>-based rules, if a tilde character is 
1965         placed immediately following <span class="fixed">user</span> or
1966         <span class="fixed">&lt;alias&gt;</span>, the expressions that follow are 
1967         treated as regular expressions. The syntax supported is generally based 
1968         on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1969         XML Schema</a>. This specification borders on unreadable, but the syntax 
1970         is generally Perl-like. Expressions should generally be &quot;anchored&quot; with 
1971         the ^ and $ symbols to insure mid-string matches don&#39;t cause false 
1972         positives.</p>
1973         <p>For example, the rule:<br>
1974 &nbsp;&nbsp;&nbsp; <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1975         </span>would evaluate to allowing anyone with an <span class="fixed">
1976         affiliation</span> of <span class="fixed">member</span> from a .edu 
1977         domain.</dd>
1978     </dl>
1979 </blockquote>
1980 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1981 <blockquote>
1982     <p>Shibboleth allows a user and a site to release a varying set of 
1983     attributes to a destination site, and does not impose restrictions on the 
1984     kinds of attribute information provided by an AA. Target implementations 
1985     must be prepared to examine the attributes they receive and filter them 
1986     based on policies about what information to permit an origin site to assert 
1987     about its users.</p>
1988     <p>Attribute acceptance is the process of defining acceptable attributes and 
1989     filtering attribute values before passing them on to a resource manager, 
1990     such as the Shibboleth module or a web application. Data blocked by 
1991     AAP filters will not be passed to the CGI environment or used when enforcing
1992     <span class="fixed">.htaccess</span> rules in Apache. Note that the attribute 
1993     assertion exported to the <span class="fixed">HTTP_SHIB_ATTRIBUTES</span> header 
1994     is now also filtered. This is a change from previous versions. To compensate,
1995     either no AAP can be specified, or a rule can be applied to permit all
1996     attributes to pass through while also exporting specific attributes.</p>
1997     <p>The Shibboleth implementation supports Scoped and Simple attributes and 
1998     filtering policies for different kinds of attributes, and is potentially 
1999     extensible to more complex attributes in the future. An attribute is 
2000     considered Scoped if the XML representation of its values contains a &quot;Scope&quot; 
2001     attribute. As of 1.1+, this is detected at runtime and requires no 
2002     configuration in advance.</p>
2003     <p><b>An essential part of the Shibboleth trust fabric is ensuring that 
2004     sites only assert attributes for domains for which they are considered 
2005     authoritative by the target. Typically, this means that Brown University 
2006     will be trusted to assert attributes only scoped to <span class="fixed">
2007     brown.edu</span>. Unless there are very specific circumstances requiring 
2008     this restriction be removed, it is strongly encouraged that such policies be 
2009     left in place.</b></p>
2010     <h4>Scoped:</h4>
2011     <blockquote>
2012         <p>Scoped attributes are a special kind of attribute whose values are a 
2013         combination of a <span class="fixed">value</span> and a
2014         <span class="fixed">scope</span>, or <span class="fixed">context</span> 
2015         for the value. An example is <span class="fixed">
2016         eduPersonScopedAffiliation</span>, which adds a scope to the defined set 
2017         of <span class="fixed">eduPersonAffiliation</span> values, such as
2018         <span class="fixed">student</span>, <span class="fixed">member</span>, 
2019         or <span class="fixed">faculty</span>. Scopes are expressed as DNS 
2020         domains and subdomains as a convention.</p>
2021         <p>Any <span class="fixed">scoped</span> attribute can be scoped only to 
2022         the origin site&#39;s permitted domains. These domains are listed in the 
2023         operational metadata that provides policy information to the system and
2024         can be overridden or supplemented using the AAP. Domains can be explicit
2025         or regular expressions, and can be changed by a target to meet its needs.
2026         Thus, attribute acceptance processing for <span class="fixed">scoped</span>
2027         attributes is based on site metadata and target-specified overrides in
2028         addition to the mechanism described below for <span class="fixed">simple</span>
2029         attributes.</p>
2030         <p>Scope rules specified in an AAP are additive with any domains 
2031         permitted by site metadata, and the rules are applied by first looking 
2032         for an applicable denial rule, and then looking at site metadata and any 
2033         applicable site rules for an accept rule.</p>
2034     </blockquote>
2035     <h4>Simple:</h4>
2036     <blockquote>
2037         <p>Simple attributes are attributes whose value is expressed in XML as a 
2038         Text node; that is, the value is just a string. Multiple values are 
2039         permitted. <span class="fixed">eduPersonEntitlement</span>, in which the 
2040         values are URIs, is one example of a simple attribute.</p>
2041         <p>Both Simple and Scoped attribute acceptance is controlled with an 
2042         external (or in 1.2, optionally inline) policy file written in XML.
2043         The schema for the file is described by the <span class="fixed">shibboleth.xsd</span>
2044         schema, and an example file is included, <span class="fixed">AAP.xml</span>.
2045         It is now optional to supply such a policy, but in the absence of one, no
2046         attributes will be exported into request headers, and the option to export
2047         the assertion as a whole must be used instead.</p>
2048         <p>The policy is a default-deny algorithm that requires permissible 
2049         attributes and values be listed explicitly. That is, an empty (as opposed to no)
2050         policy permits nothing. Each attribute to be supported must be listed in the 
2051         policy by name in an <span class="fixed">&lt;AttributeRule&gt;</span>. Each such 
2052         rule is a collection of <span class="fixed">&lt;SiteRule&gt;</span> elements 
2053         along with an optional <span class="fixed">&lt;AnySite&gt;</span> default 
2054         rule. In turn each site rule is a set of <span class="fixed">&lt;Value&gt;</span> 
2055         rules that specify matches to permit, either literal or regular 
2056         expressions, or a wildcarded <span class="fixed">&lt;AnyValue&gt;</span> 
2057         default rule, which is equivalent to a single regular expression rule 
2058         allowing anything.</p>
2059         <p>With 1.2, a new <span class="fixed">&lt;AnyAttribute&gt;</span> element
2060         can be used before or in place of the <span class="fixed">&lt;AttributeRule&gt;</span>
2061         elements to allow all attributes and values to pass muster. The purpose of this
2062         is to then supply rules to specify the export of particular attributes, without
2063         using those rules to control acceptance.</p>
2064     </blockquote>
2065     <p>A syntax summary follows:</p>
2066     <blockquote>
2067         <p><span class="fixed">&lt;AttributeAcceptancePolicy&gt;</span></p>
2068         <blockquote>
2069             <p>The top level element in the file.</p>
2070         </blockquote>
2071         <p><span class="fixed">&lt;AnyAttribute&gt;</span></p>
2072         <blockquote>
2073             <p>Disables acceptance filtering and leaves the assertion intact.</p>
2074         </blockquote>
2075         <p><span class="fixed">&lt;AttributeRule&gt;<br>
2076 &nbsp;&nbsp;&nbsp; Name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;<br>
2077 &nbsp;&nbsp;&nbsp; Header=&quot;Shib-EP-Affiliation&quot; Alias=&quot;affiliation&quot;&gt;</span></p>
2078         <blockquote>
2079             <p>Specifies a rule for an attribute, named by its URI. The 
2080             following XML attributes can be supplied:</p>
2081             <table border="1" cellpadding="5" cellspacing="5">
2082                 <tr>
2083                     <td><span class="fixed">Name</span></td>
2084                     <td>The name of the Shibboleth attribute, usually a URI. 
2085                     This is the only required XML attribute.</td>
2086                 </tr>
2087                 <tr>
2088                     <td><span class="fixed">Namespace</span></td>
2089                     <td>If the attribute&#39;s name includes a SAML namespace, 
2090                     supply it here. Normally this is unused.</td>
2091                 </tr>
2092                 <tr>
2093                     <td><span class="fixed">Header</span></td>
2094                     <td>The HTTP request header to map the attribute&#39;s values 
2095                     into.</td>
2096                 </tr>
2097                 <tr>
2098                     <td><span class="fixed">Alias</span></td>
2099                     <td>A short name for the attribute, determines the name of 
2100                     the Apache <span class="fixed">Require</span> rule.</td>
2101                 </tr>
2102             </table>
2103         </blockquote>
2104         <p><span class="fixed">&lt;AnySite&gt;</span></p>
2105         <blockquote>
2106             <p>Specifies a rule that always applies to the attribute, regardless 
2107             of the asserting origin site.</p>
2108         </blockquote>
2109         <p><span class="fixed">&lt;SiteRule Name=&quot;providerId&quot;&gt;</span></p>
2110         <blockquote>
2111             <p>A rule that applies to the origin site corresponding to the supplied
2112             identifier</p>
2113         </blockquote>
2114         <p><span class="fixed">&lt;Scope Accept=&quot;true|false&quot; Type=&quot;type&quot;&gt;</span></p>
2115         <blockquote>
2116             <p>Specifies a value to accept or deny, either directly using
2117             <span class="fixed">type</span> <span class="fixed">literal</span>, 
2118             or using a set of matching expressions as <span class="fixed">type</span>
2119             <span class="fixed">regexp</span>. <span class="fixed">literal</span> 
2120             is the default if <span class="fixed">Type</span> is not specified. 
2121             Accept defaults to &quot;true&quot;&gt;.</p>
2122         </blockquote>
2123         <p><span class="fixed">&lt;AnyValue&gt;</span></p>
2124         <blockquote>
2125             <p>Specifies a rule that always applies to the attribute and site, 
2126             regardless of the value(s).</p>
2127         </blockquote>
2128         <p><span class="fixed">&lt;Value Type=&quot;type&quot;&gt;</span></p>
2129         <blockquote>
2130             <p>Specifies a value to permit, either directly using
2131             <span class="fixed">type</span> <span class="fixed">literal</span>, 
2132             or using a set of matching expressions as <span class="fixed">type</span>
2133             <span class="fixed">regexp</span>. <span class="fixed">literal</span> 
2134             is the default if <span class="fixed">Type</span> is not specified.</p>
2135         </blockquote>
2136     </blockquote>
2137     <p>The regular expression syntax is a subset of the usual Perl and Unix 
2138     syntaxes that is described in the XML Schema specification by the W3C. Most 
2139     typical expressions should work. Be sure to anchor them using
2140     <span class="fixed">^</span> and <span class="fixed">$</span> to avoid 
2141     unintentional matches midstring.</p>
2142 </blockquote>
2143 <h4><a name="4.f."></a>4.f. Using Attributes and Session Data in Applications</h4>
2144 <blockquote>
2145     <p>Apart from the simple RM functionality provided, attribute information 
2146     may be made available directly to applications via the standard practice of 
2147     creating custom HTTP request headers before passing control to the 
2148     resource. Web applications should make no assumption about the presence of 
2149     specific attributes for their use unless they have intimate knowledge of the 
2150     attribute release policies in place.</p>
2151     <p>The AAP rules control this interface, and map Shibboleth attributes
2152     to header names, such as <span class="fixed">Shib-EP-Affiliation</span>. 
2153     Using that example, any values of the mapped attribute will be placed in 
2154     that header, delimited by semicolons. An application that uses a CGI-like 
2155     syntax to access the header will find the values in the <span class="fixed">
2156     HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any 
2157     header, to drive legacy applications that expect information in a particular 
2158     location.</p>
2159     <p>The <span class="fixed">REMOTE_USER</span> variable is a special case 
2160     that is generally populated automatically by the web server based on an 
2161     internal piece of data that represents the current <span class="fixed">
2162     username</span>. Unlike many authentication modules, Shibboleth does not 
2163     guarantee that <span class="fixed">REMOTE_USER</span> will have any value, 
2164     because users may remain anonymous in many cases. If it does have a value, 
2165     it is set solely because of an AAP file that maps an attribute to that 
2166     header name. For many purposes, the <span class="fixed">
2167     urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be 
2168     mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be 
2169     provided by the AA, and <span class="fixed">REMOTE_USER</span> might still 
2170     be empty.</p>
2171     <p>In addition to general attribute information, the following special
2172     HTTP headers are created for any authenticated request:</p>
2173     <dl>
2174         <dd class="attribute"><span class="fixed">HTTP_SHIB_ORIGIN_SITE</span></dd>
2175         <dd class="value">Contains the unique identifier (providerId) of the
2176         origin site of the user. Some applications may use this to lookup
2177         additional policy or application data. It normally takes the form of a
2178         URI but could be any string in some deployments.</dd>
2179         <dd class="attribute"><span class="fixed">HTTP_SHIB-AUTHENTICATION-METHOD</span></dd>
2180         <dd class="value">Contains the SAML AuthenticationMethod URI that
2181         documents some aspect of the user's authentication to the origin site's
2182         web authentication service.</dd>
2183         <dd class="attribute"><span class="fixed">HTTP_SHIB_APPLICATION_ID</span></dd>
2184         <dd class="value">Contains the XML <span class="fixed">applicationId</span>
2185         attribute in <span class="fixed">shibboleth.xml</span> that corresponds to
2186         the request based on the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a>
2187         and associated elements.</dd>
2188         <dd class="attribute"><span class="fixed">HTTP_SHIB_ATTRIBUTES</span></dd>
2189         <dd class="value">Contains the assertion in XML containing the
2190         SAML attribute information from the AA in base64-encoded format.
2191         This is a raw interface that provides an application with the entire 
2192         assertion in, but is still a filtered view based on any attribute acceptance
2193         rules.</dd>
2194     </dl>
2195     <p>Finally, special support exists to obtain the value of the SAML
2196     <span class="fixed">&lt;NameIdentifier&gt;</span> element, which identifies the
2197     subject of the session, the user. Many Shibboleth deployments use opaque handles
2198     that have no application value, however newer deployments may choose to support
2199     alternative identifiers, including formats defined by SAML. Targets can use
2200     these origins and obtain the primary subject name by using a special AAP
2201     <span class="fixed">&lt;AttributeRule&gt;</span> with a
2202     <span class="fixed">Name</span> corresponding to the SAML
2203     <span class="fixed">Format</span> identifier that describes the kind of
2204     identifier used to represent the subject. The rule specifies in what header
2205     to export the identifier value (such as <span class="fixed">REMOTE_USER</span>),
2206     while the <span class="fixed">Format</span> identifier will be placed in the
2207      <span class="fixed">HTTP_SHIB_NAMEIDENTIFIER_FORMAT</span> header.
2208     </p>
2209 </blockquote>
2210 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
2211 <blockquote>
2212     <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span> 
2213     in the <span class="fixed">/opt/shibboleth/bin</span> folder of the 
2214     distribution to maintain metadata files referenced by <span class="fixed">
2215     shibboleth.xml</span>. It will return 0 only on success and a negative number on 
2216     failure and log errors to <span class="fixed">stderr</span>. If the data in 
2217     the new metadata file is unusable or schema invalid, or the signature is invalid,
2218     the existing copy is kept and not overwritten. The SHAR and SHIRE stat all
2219     metadata files each time the data is used, allowing them to detect and utilize
2220     updates in real-time during system operation.</p>
2221     <p><span class="fixed">siterefresh</span> takes the following command-line 
2222     parameters:</p>
2223     <dl>
2224         <dd class="attribute"><span class="fixed">--url &lt;URL&gt;</span></dd>
2225         <dd class="value">Specifies the <span class="fixed">URL</span> of the 
2226         remote metadata file with which to update the local file. HTTPS is not
2227         supported at this time.</dd>
2228         <dd class="attribute"><span class="fixed">--out &lt;pathname&gt;</span></dd>
2229         <dd class="value">Specifies the local file to which to write the new 
2230         metadata.</dd>
2231         <dd class="attributeopt"><span class="fixed">--noverify</span></dd>
2232         <dd class="value">Explicitly disables the requirement for the file to be signed
2233         and allows the certificate parameter to be ommitted. If the file is signed,
2234         the signature will be verified using whatever key is supplied inside it,
2235         and an invalid signature will still result in an error, but if the file is
2236         unsigned or has a valid signature, only a warning will be logged, and the
2237         result will be success.</dd>
2238         <dd class="attributeopt"><span class="fixed">--cert &lt;pathname&gt;</span></dd>
2239         <dd class="value">Specifies the location of a certificate stored in
2240         <span class="fixed">PEM</span> format used to validate the signature of 
2241         the metadata file. Since much of Shibboleth&#39;s security flows from 
2242         metadata files, this option is highly recommended, and the certificate 
2243         used should be verified independently in some out of band fashion.</dd>
2244         <dd class="attributeopt"><span class="fixed">--schema &lt;pathname&gt;</span></dd>
2245         <dd class="value">Optionally defines a base path for schemas to use 
2246         when validating the file. Defaults to a location based on the installation
2247         path on Unix, or <span class="fixed">\opt\shibboleth\etc\shibboleth</span>
2248         on Windows.</dd>
2249         <dd class="attributeopt"><span class="fixed">--rootns &lt;XML namespace&gt;</span></dd>
2250         <dd class="value">Optionally defines the XML namespace of the root element
2251         expected in the new file. Normally unused, provided to support alternative
2252         metadata formats that may be backported to older releases.</dd>
2253         <dd class="attributeopt"><span class="fixed">--rootname &lt;XML element name&gt;</span></dd>
2254         <dd class="value">Optionally defines the name of the root element
2255         expected in the new file. Normally unused, provided to support alternative
2256         metadata formats that may be backported to older releases.</dd>
2257     </dl>
2258     <p>If a zero is returned, the command will copy the retrieved file to the output
2259     location. Otherwise one of the following error values will be returned:</p>
2260     <table align="center" cellspacing="5">
2261         <tr><td>-100</td><td>an invalid combination of parameters was specified</td></tr>
2262         <tr><td>-10</td><td>the OpenSAML library failed to initialize</td></tr>
2263         <tr><td>-1</td><td>the file's XML digital signature was invalid</td></tr>
2264         <tr><td>-2</td><td>a SAML exception was trapped</td></tr>
2265         <tr><td>-3</td><td>an XML library exception was trapped</td></tr>
2266         <tr><td>-4</td><td>a general XML security library exception was trapped</td></tr>
2267         <tr><td>-5</td><td>an XML security library crypto exception was trapped</td></tr>
2268         <tr><td>-6</td><td>an unknown exception was trapped</td></tr>
2269     </table>
2270     <p>A complete command issued to <span class="fixed">siterefresh</span> might 
2271     take the form:</p>
2272     <blockquote>
2273         <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out IQ-sites.xml --cert internet2.pem \<br>
2274         --url http://wayf.internet2.edu/InQueue/IQ-sites.xml </span></p>
2275     </blockquote>
2276     <p>It is recommended that such commands be added to a <span class="fixed">
2277     crontab</span> to keep the site and trust files refreshed. AAP files tend to 
2278     be site-specific, but could be maintained and distributed centrally. If the 
2279     command is invoked in a script that writes the file to a new location and 
2280     compares it with the old contents before overwriting the original, the 
2281     command could be run very often without impacting target operations, 
2282     providing a high degree of currency in case sites become compromised.</p>
2283 </blockquote>
2284 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
2285 <blockquote>
2286     <p>Shibboleth includes a useful plugin that extends the default memory cache 
2287     for storing session data in the SHAR with a backing cache using an embedded 
2288     MySQL database. It is now disabled by default. The plugin can be found in the
2289     <span class="fixed">/opt/shibboleth/libexec</span> folder, and is loaded as an
2290     extension library using the <a href="#confExtensions"><span class="fixed">Extensions</span></a>
2291     element of <span class="fixed">shibboleth.xml</span>. The extension and the
2292     <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a>
2293     element are commented out by default.</p>
2294     <p>Important <a href="#confArgument"><span class="fixed">Argument</span></a>
2295     elements you'll find by default include:</p>
2296         <blockquote class="fixed">
2297             <p>--language=/opt/shibboleth/share/english<br>
2298             --datadir=/opt/shibboleth/data</p>
2299         </blockquote>
2300         <p>which set the message file path and the location of the cache's 
2301         database files respectively. Make sure the data directory exists before 
2302         starting the SHAR if you change this path.</p>
2303 </blockquote>
2304 <h4><a name="4.i."></a>4.i. Using Lazy Sessions</h4>
2305 <blockquote>
2306     <p><b>For a background on sessions in Shibboleth, and a description of what
2307     a lazy session is and why it would be useful, consult <a href="#1.g">section
2308     1.g</a>.</b></p>
2309     <p>This section describes how an application can trigger the establishment
2310     of a Shibboleth session and optionally receive attributes once its internal
2311     logic decides this is necessary.  It assumes the application is protected
2312     using lazy sessions because the <span class="fixed">RequireSession</span>
2313     attribute of the <a href="#confPath"><span class="fixed">Path</span></a> or
2314     <a href="#confPath"><span class="fixed">Host</span></a> element protecting
2315     it is set to <span class="fixed">false</span>.  This application must be
2316     aware of two pieces of information:</p>
2317     <ul>
2318       <li>The URL that should be accessed after the session is established;
2319       frequently, this will be the application's own URL; and</li>
2320       <li>The URL of the SHIRE associated with the <a
2321       href="#confApplication"><span class="fixed">Application</span></a>
2322       containing the URL to be accessed(contained within the corresponding <a
2323       href="#confSessions"><span class="fixed">Sessions</span></a>
2324       element).</li>
2325     </ul>
2326     <p>These two pieces of information must be combined by the application to an
2327     appropriately formed URL to trigger session initiation as follows.  To
2328     request a session, the application returns an HTTP redirect that sends the
2329     browser to the SHIRE URL with a parameter, <span
2330     class="fixed">target</span>, containing the URL of the resource to return to
2331     with a session.  This will often be the URL that's triggering the redirect. 
2332     The SHIRE will generate the redirect to the WAYF and the rest proceeds as a
2333     standard Shibboleth flow.  This combined URL takes the form: <span class="fixed">https://<i>shireURL</i>?target=<i>applicationURL</i></span>.</p>
2334     <p>For example, if an application located at <span
2335     class="fixed">https://foo.com/portal</span> presents a page with an option
2336     to login, it could respond to the login button by redirecting the browser to
2337     <span
2338     class="fixed">https://foo.com/Shibboleth.shire?target=https%3A%2F%2Ffoo.com%2Fportal</span>.</p>
2339
2340 </blockquote>
2341 <hr>
2342 <h3><a name="5."></a>5. Troubleshooting</h3>
2343 <p>This section provides basic information about testing Shibboleth targets. 
2344 This information is not intended to be comprehensive, but instead rudimentary 
2345 guidelines for basic configuration tests and problems. For more detailed 
2346 information or answers to specific problems not addressed in this section, 
2347 please mail <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
2348 with a thorough description of errors and configurations used.</p>
2349 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
2350 <blockquote>
2351     <p>The target may be tested by generating a folder with very basic access 
2352     controls on it, and accessing it using a web browser. Place a simple webpage 
2353     such as <span class="fixed">index.html</span> in <span class="fixed">
2354     /secure/</span>. Then, add the following lines to <span class="fixed">
2355     httpd.conf</span>, which should be removed when testing is over:</p>
2356     <blockquote>
2357         <p><span class="fixed"># Configure a test directory<br>
2358         &lt;Location /secure&gt;<br>
2359         &nbsp;&nbsp;AuthType shibboleth<br>
2360         &nbsp;&nbsp;ShibRequireSession On<br>
2361         &nbsp;&nbsp;require valid-user<br>
2362         &lt;/Location&gt;<br>
2363         </span></p>
2364     </blockquote>
2365     <p><b>For information regarding specific error messages that may be 
2366     generated if the target does not work successfully, please refer to section
2367     <a href="#5.b.">5.b.</a>, or write
2368     <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>.</b></p>
2369 </blockquote>
2370 <h4><a name="5.b."></a>5.b. Common Problems</h4>
2371 <blockquote>
2372     <p>A knowledge base is being developed in the
2373     <a href="https://umdrive.memphis.edu/wassa/public/shib.faq/shibboleth-faq.html">
2374     Shibboleth Deployer&#39;s FAQ</a>. Please mail
2375     <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a> 
2376     with any additional questions or problems encountered that are not answered 
2377     by this basic guide.</p>
2378 </blockquote>
2379
2380 </body>
2381
2382 </html>