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