Added docs for MySQL cache.
[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 <meta http-equiv="Content-Language" content="en-us">
6 <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
7 <meta name="ProgId" content="FrontPage.Editor.Document">
8 <title>Shibboleth Target Deployment Guide</title>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10 <style type="text/css">
11
12 html
13 {       
14 background-color: #FFFFFF;
15 color: #000000;
16 margin: .5em;
17 }
18 a:visited
19 {
20 color: #999999;
21 }
22 a:link
23 {
24 color: #990000;
25 }
26 a:active
27 {
28 color: #440000;
29 }
30 dl
31 {
32 border-width:2px; background-color: #DDDDDD;
33 background-image: url('none');
34 margin: 5px;
35 padding: 0px;
36 border-style: solid;
37
38 }
39 dt
40 {
41 background-color: #DDDDDD;
42 background-image: url('none');
43 margin: 1px;
44 padding: 1px
45 }
46 dd
47 {
48 background-color: #DDDDDD;
49 background-image: url('none');
50 margin: 0px;
51 padding: 1px
52 }
53 .attribute
54 {
55 font-size: 115%;
56 color: #000000;
57 text-align: left;
58 background-color: #DDDDDD;
59 border: 1px inset black;
60 background-image: url('none');
61 margin: 0px;
62 padding: 2px
63 }
64 .value
65 {
66 color: #000000;
67 text-align: left;
68 background-color: #EEEEEE;
69 background-image: url('none');
70 padding-top: 0em;
71 padding-bottom: 0.5em;
72 padding-right: 1em;
73 padding-left: 5em;
74 border-bottom-width: none;
75 border-top-width: none;
76 border-left-width: 1px;
77 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
78 }
79 .attributeopt
80 {
81 font-size: 115%;
82 color: #000000;
83 text-align: left;
84 background-color: #BCBCEE;
85 border: 1px inset black;
86 background-image: url('none');
87 margin: 0px;
88 padding: 2px
89 }
90 .valueopt
91 {
92 color: #000000;
93 text-align: left;
94 background-color: #DDDDFF;
95 background-image: url('none');
96 padding-top: 0em;
97 padding-bottom: 0.5em;
98 padding-right: 1em;
99 padding-left: 5em;
100 border-bottom-width: none;
101 border-top-width: none;
102 border-left-width: 1px;
103 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
104 }
105 .attributelong
106 {
107 font-size: 85%;
108 color: #000000;
109 text-align: left;
110 background-color: #DDDDDD;
111 border: 1px inset black;
112 background-image: url('none');
113 margin: 0px;
114 padding: 2px
115 }
116 .attributeoptlong
117 {
118 font-size: 85%;
119 color: #000000;
120 text-align: left;
121 background-color: #BCBCEE;
122 border: 1px inset black;
123 background-image: url('none');
124 margin: 0px;
125 padding: 2px
126 }
127 .demo
128 {
129 background-color: #EEEEEE;
130 padding: 3px;
131 }
132 .fixed
133 {
134 font-family: monospace;
135 font-size: 90%;
136 color: #121212;
137 }
138 .feature
139 {
140 color: #00FF00
141 }
142
143     </style>
144 </head>
145
146 <body link="red" vlink="red" alink="black" bgcolor="white">
147
148 <center>
149 <h2>Shibboleth Target Deployment Guide</h2>
150 </center>
151 <p>Shibboleth Target Deployment Guide<br>
152 Shibboleth Version 1.0.1<br />
153 July 15, 2003<br />
154 </p>
155 <h3>This version of the deploy guide is for Shibboleth v1.0.1. For documentation 
156 related to prior versions of Shibboleth, please consult the appropriate branch 
157 in the Shibboleth CVS.</h3>
158 <h3>Federations have been abstracted out from the Shibboleth documentation. For 
159 further information on using Shibboleth in a federation, refer to the federation 
160 guide.</h3>
161 <p>Shibboleth v1.0.1 is stable and secure enough to deploy in production 
162 scenarios. It is backward compatible with 1.0 in all respects, including 
163 configuration, but some older commands have been deprecated or replaced.</p>
164 <p>Features and changes specific to 1.0.1 are marked with <span class="feature">
165 [1.0.1]</span></p>
166 <h4>Major New Features in 1.0 and 1.0.1</h4>
167 <p>This new release contains several improvements and enhancements, including:
168 </p>
169 <h5>Federation Support</h5>
170 <ol>
171     <li>Federation and trust support has been substantially extended. Federation 
172     structures are now defined. The set of metadata collected and managed by 
173     each Federation is more fully defined. The configuration values assigned by 
174     a Federation are now identified. </li>
175     <li>There is some support for targets to be members of multiple federations; 
176     this support will continue to evolve. When a browser user arrives, a target 
177     will determine which federation their origin belongs to, and then use the 
178     trust fabric associated with that Federation.</li>
179     <li>Better support for flexible and bilateral trust agreements. A key 
180     specific to an origin site can be used to vallidate its signature.</li>
181     <li>This version contains a significantly more mature security 
182     implementation, and should meet the security requirements of typical sites.</li>
183 </ol>
184 <h5>Origin</h5>
185 <ol>
186     <li>The Attribute Authority has a powerful new attribute resolver. Simple 
187     scenarios (using a string attribute stored in ldap) can be accomplished by 
188     merely editing a configuration file. Java classes may still be written for 
189     more complex evaluations (eg retrieving information from multiple disparate 
190     repositories, and computing the SAML attribute using business rules). This 
191     should greatly simplify the process of configuring the AA to support 
192     additional general attributes.</li>
193     <li>Support for a runtime-derived per-requester persistent identifier 
194     attribute to support anonymous personalization by targets has been added via 
195     an attribute plugin. <span class="feature">[1.0.1]</span></li>
196     <li>Specialized sites without privacy needs can configure identity-based 
197     handles interoperable with other SAML deployments. <span class="feature">
198     [1.0.1]</span></li>
199 </ol>
200 <h5>Target</h5>
201 <ol>
202     <li>Significantly more flexibility in configuring targets to ensure 
203     robustness. Failover and redundant configurations are now supported.</li>
204     <li>The SHAR may now optionally store its session and attribute cache in a 
205     back-end database in addition to the previously available in-memory option. 
206     This would allow a site to run an apache server farm, with multiple SHARs, 
207     supporting the same set of sessions.</li>
208     <li>Federation supplied files (sites.xml and trust.xml) are now refreshed in 
209     a much more robust manner. </li>
210     </li>
211     <li>The SHAR can be configured to request specific attributes from the 
212     Origin. </li>
213     <li>The SHAR can use TCP sockets when responding to the Apache module, for 
214     specialized deployment behind firewalls. <span class="feature">[1.0.1]</span>
215     </li>
216     <li>Attribute acceptance policies have been greatly enhanced, and are now 
217     used to configure all aspects of attribute handling by the target, except 
218     for requesting specific attributes by sitename. Adding attributes now takes 
219     place in one configuration step. <span class="feature">[1.0.1]</span> </li>
220     <li>Support for Apache 1.3 on Windows NT/2000/XP/2003 has been added.
221     <span class="feature">[1.0.1]</span> </li>
222     <li>Microsoft IIS web server support has been added via an ISAPI filter and 
223     extension. <span class="feature">[1.0.1]</span> </li>
224 </ol>
225 <h5>Miscellaneous</h5>
226 <ol>
227     <li>Origin sites can configure a value to describe the type of 
228     authentication mechanism used at the origin site(e.g. password, Kerberos, 
229     PKI, etc.). This value is made available on the target side as Shib-Authentication-Method.
230     <br>
231     </li>
232     <li>Various improvements to error handling. Origin sites are now able to 
233     supply an &quot;error URL&quot; and contact information to a federation. When a target 
234     encounters an error, it can include this information in the error page. <br>
235     </li>
236     <li>Local time string values are now used in log files. <br>
237     </li>
238     <li>Internationalization support has been extended.</li>
239 </ol>
240 <p>Before starting, please sign up for all applicable
241 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing 
242 lists</a>. Announcements pertinent to Shibboleth deployments and developments 
243 and resources for deployment assistance can be found here.</p>
244 <p>Please send any questions, concerns, or eventual confusion to
245 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>. 
246 This should include, but not be limited to, questions about the documentation, 
247 undocumented problems, installation or operational issues, and anything else 
248 that arises. Please ensure that you have the
249 <a href="http://shibboleth.internet2.edu/release/shib-download.html">appropriate 
250 tarball</a> for your operating system.</p>
251 <p><br>
252 </p>
253 <hr>
254 <p><br>
255 <br>
256 </p>
257 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
258 <ol type="1">
259     <li>
260     <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
261     <ol type="a">
262         <li><a href="#1.a."><font color="black">Origin</font></a></li>
263         <li><a href="#1.b."><font color="black">Target</font></a></li>
264         <li><a href="#1.c."><font color="black">WAYF</font></a></li>
265         <li><a href="#1.d."><font color="black">Federations</font></a></li>
266     </ol>
267     </li>
268     <li>
269     <h4><a href="#2."><font color="black">Planning</font></a></h4>
270     <ol type="a">
271         <li><a href="#2.a."><font color="black">Requirements</font></a></li>
272         <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
273         <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
274         <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
275         <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
276         <li><a href="#2.f."><font color="black">Designate Contacts</font></a></li>
277         <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
278         <li><a href="#2.h."><font color="black">Clocks</font></a></li>
279         <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
280     </ol>
281     </li>
282     <li>
283     <h4><a href="#3."><font color="black">Installation</font></a></h4>
284     <ol type="a">
285         <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
286         <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
287         <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
288         <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
289         <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
290     </ol>
291     </li>
292     <li>
293     <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
294     <ol type="a">
295         <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
296         shibboleth.ini</span></font></a></li>
297         <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
298         <li><a href="#4.c."><font color="black">Key Generation and Certificate 
299         Installation</font></a></li>
300         <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
301         <li><a href="#4.e."><font color="black">Defining Attributes and 
302         Acceptance Policies</font></a></li>
303         <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
304         <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
305         <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
306     </ol>
307     </li>
308     <li>
309     <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
310     <ol type="a">
311         <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
312         <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
313     </ol>
314     </li>
315 </ol>
316 <p><br>
317 </p>
318 <hr>
319 <p><br>
320 </p>
321 <h3><a name="1."></a>1. Shibboleth Overview</h3>
322 <p>Shibboleth is a system designed to exchange attributes across realms for the 
323 primary purpose of authorization. It provides a secure framework for one 
324 organization to transmit attributes about a web-browsing individual across 
325 security domains to another institution. In the primary usage case, when a user 
326 attempts to access a resource at a remote domain, the user&#39;s own home security 
327 domain can send certain information about that user to the target site in a 
328 trusted exchange. These attributes can then be used by the resource to help 
329 determine whether to grant the user access to the resource. The user may have 
330 the ability to decide whether to release specific attributes to certain sites by 
331 specifying personal Attribute Release Policies (ARP&#39;s), effectively preserving 
332 privacy while still granting access based on trusted information.</p>
333 <p>When a user first tries to access a resource protected by Shibboleth, they 
334 are redirected to a service which asks the user to specify the organization from 
335 which they want to authenticate. If the user has not yet locally authenticated 
336 to a WebISO service, the user will then be redirected to their home 
337 institution&#39;s authentication system. After the user authenticates, the 
338 Shibboleth components at the local institution will generate a temporary 
339 reference to the user, known as a handle, for the individual and send this to 
340 the target site. The target site can then use the handle to ask for attributes 
341 about this individual. Based on these attributes, the target can decide whether 
342 or not to grant access to the resource. The user may then be allowed to access 
343 the requested materials.</p>
344 <p>There are several controls on privacy in Shibboleth, and mechanisms are 
345 provided to allow users to determine exactly which information about them is 
346 released. A user&#39;s actual identity isn&#39;t necessary for many access control 
347 decisions, so privacy often is needlessly compromised. Instead, the resource 
348 often utilizes other attributes such as faculty member or member of a certain 
349 class. While these are commonly determined using the identity of the user, 
350 Shibboleth provides a way to mutually refer to the same principal without 
351 revealing that principal&#39;s identity. Because the user is initially known to the 
352 target site only by a randomly generated temporary handle, if sufficient, the 
353 target site might know no more about the user than that the user is a member of 
354 the origin organization. This handle should never be used to decide whether or 
355 not to grant access, and is intended only as a temporary reference for 
356 requesting attributes.</p>
357 <h4><a name="1.a."></a>1.a. Origin</h4>
358 <blockquote>
359     <p>There are four primary components to the origin side in Shibboleth: the 
360     Attribute Authority (AA), the Handle Service (HS), the directory service, 
361     and the local sign-on system (SSO). The AA and HS are provided with 
362     Shibboleth, and an open-source WebISO solution Pubcookie is also supplied; 
363     the directory is provided by the origin site. Shibboleth is able to 
364     interface with a directory exporting an LDAP interface or a SQL database 
365     containing user attributes, and is designed such that programming interfaces 
366     to other repositories should be readily implemented. Shibboleth relies on 
367     standard web server mechanisms to trigger local authentication. A .htaccess 
368     file can be easily used to trigger either the local WebISO system or the web 
369     server&#39;s own Basic Auth mechanism, which will likely utilize an enterprise 
370     authentication system, such as Kerberos.</p>
371     <p>From the origin site&#39;s point of view, the first contact will be the 
372     redirection of a user to the handle service, which will then consult the SSO 
373     system to determine whether the user has already been authenticated. If not, 
374     then the browser user will be asked to authenticate, and then sent back to 
375     the target URL with a handle bundled in an attribute assertion. Next, a 
376     request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA 
377     which will include the previously mentioned handle. The AA then consults the 
378     ARP&#39;s for the directory entry corresponding to the handle, queries the 
379     directory for these attributes, and releases to the SHAR all attributes the 
380     SHAR is entitled to know about that user.</p>
381 </blockquote>
382 <h4><a name="1.b."></a>1.b. Target</h4>
383 <blockquote>
384     <p>There are three primary components to the target side in Shibboleth: the 
385     Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute 
386     Requester (SHAR), and the resource manager (RM). An implementation of each 
387     of these is included in the standard Shibboleth distribution. These 
388     components are intended to run on the same web server.</p>
389     <p>From the target&#39;s point of view, a browser will hit the RM with a request 
390     for a Shibboleth-protected resource. The RM then allows the SHIRE to step 
391     in, which will use the WAYF to acquire the name of a handle service to ask 
392     about the user. The handle service (HS) will then reply with a SAML 
393     authentication assertion containing a handle, which the SHIRE then hands off 
394     to the SHAR. The SHAR uses the handle and the supplied address of the 
395     corresponding attribute authority (AA) to request all attributes it is 
396     allowed to know about the handle. The SHAR performs some basic validation 
397     and analysis based on attribute acceptance policies (AAP&#39;s). These 
398     attributes are then handed off to the RM, which is responsible for using 
399     these attributes to decide whether to grant access.</p>
400 </blockquote>
401 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
402 <blockquote>
403     <p>The WAYF service can be either outsourced and operated by a federation or 
404     deployed as part of the SHIRE. It is responsible for allowing a user to 
405     associate themself with an institution of their specification, then 
406     redirecting the user to the known address for the handle service of that 
407     institution.</p>
408 </blockquote>
409 <h4><a name="1.d."></a>1.d. Federations</h4>
410 <blockquote>
411     <p>A federation is one way to provide part of the underlying trust required 
412     for function of the Shibboleth architecture. A federation in the context of 
413     Shibboleth is a group of organizations(universities, corporations, content 
414     providers, etc.) who agree to exchange attributes using the SAML/Shibboleth 
415     protocols and abide by a common set of policies and practices. In so doing, 
416     they must implicitly or explicitly agree to a common set of guidelines. 
417     Joining a federation is not explicitly necessary for operation of 
418     Shibboleth, but it dramatically expands the number of targets and origins 
419     that can interact without defining bilateral agreements between all these 
420     parties.</p>
421     <p>A federation can be created in a variety of formats and trust models, but 
422     to support Shibboleth, it must provide a certain set of services to 
423     federation members. It needs to supply a registry to process applications to 
424     the federation and distribute membership information to the origin and 
425     target sites. This must include distribution of the PKI components necessary 
426     for trust between origins and targets. There also needs to be a set of 
427     agreements and best practices defined by the federation governing the 
428     exchange, use, and population of attributes before and after transit, and 
429     there should be a way to find information on local authentication and 
430     authorization practices for federation members.</p>
431 </blockquote>
432 <hr>
433 <h3><a name="2."></a>2. Planning</h3>
434 <p>There are several essential elements that must be present in the environment 
435 to ensure Shibboleth functions well, both political and technical. Shibboleth 
436 currently runs on a specific range of platforms and web server environments. The 
437 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations 
438 and requirements for a successful implementation of a Shibboleth target.</p>
439 <h4><a name="2.a."></a>2.a. Requirements</h4>
440 <blockquote>
441     <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and 
442     Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a 
443     separate SHAR process. The plugins use the ONC RPC mechanism to communicate 
444     with the SHAR over Unix domain or TCP sockets. The target&#39;s web servers must 
445     be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a> 
446     1.3.26+, or Microsoft IIS 4.0+, but not Apache 2. More precise technical 
447     details are discussed in <a href="#3.a.">3.a</a>.</p>
448 </blockquote>
449 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
450 <blockquote>
451     <p>While it is not necessary for a target or origin to join a federation, 
452     doing so greatly facilitates the implementation of multilateral trust 
453     relationships. Each federation will have a different application process.</p>
454     <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or 
455     the Shibboleth v1.0 architectural document.</p>
456     <p>To use Shibboleth without a federation, manual configuration of target 
457     and origin trust and site information will be needed to insure that sites 
458     interoperate. Most identifiers, such as site names, should be URI-based, and 
459     should be chosen in accordance with DNS domains under the control of the 
460     parties involved, much as Java package naming is coordinated. In other 
461     words, don&#39;t use a URI containing a DNS domain or hostname that you do not 
462     control.</p>
463 </blockquote>
464 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
465 <blockquote>
466     <p>Shibboleth&#39;s protocols and software have been extensively engineered to 
467     provide protection against many attacks. However, the most secure protocol 
468     can be compromised if it is placed in an insecure environment. To ensure 
469     Shibboleth is as secure as possible, there are several recommended security 
470     precautions which should be in place at local sites.</p>
471     <ol type="i">
472         <li>SSL use is optional for target sites, but should be used if at all 
473         possible, at least in the processing of incoming sessions (called the 
474         SHIRE URL or assertion consumer service). Federation guidelines should 
475         be considered when determining whether to implement SSL, and, in 
476         general, SSL should be used for interactions with client machines to 
477         provide the necessary authentication and encryption to ensure protection 
478         from man-in-the-middle attacks. It is strongly suggested that all 
479         password traffic or similarly sensitive data should be SSL-protected. 
480         Assessment of the risk tradeoff against possible performance degradation 
481         should be performed for all applications.</li>
482         <li>Many other attacks can be made on the several redirection steps that 
483         Shibboleth takes to complete attribute transfer. The best protection 
484         against this is safeguarding the WAYF service and ensuring that rogue 
485         targets and origins are not used, generally by development of the trust 
486         model underneath Shibboleth. Shibboleth also leverages DNS for security, 
487         which is not uncommon, but attacks concerning bad domain information 
488         should be considered.</li>
489         <li>Information regarding origin users is generally provided by the 
490         authoritative enterprise directory, and the acceptance of requests from 
491         target applications can be carefully restricted to ensure that all 
492         requests the SHAR performs are authorized and all information the origin 
493         provides is accurate. Use of plaintext passwords is strongly advised 
494         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 SHAR, HS, and AA must all have 
503     various client and/or server certificates for use in signing assertions and 
504     creating SSL channels. 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 rules called Attribute Release 
512     Policies (ARP&#39;s) that define which attributes are released to which targets. 
513     When a browser user tries to access a resource, the SHAR asks the origin 
514     site AA to release all the attributes it is allowed to know, possibly 
515     restricted to specifically desired subset. The SHAR provides its own name 
516     and an optional URL on behalf of which the attribute request is made which 
517     can further refine the information the SHAR is allowed to know. The AA 
518     processes this request using all applicable ARP&#39;s, determines which 
519     attributes and values it will release, and then obtains the values actually 
520     associated with the browser user. The AA sends these attributes and values 
521     back to the SHAR.</p>
522     <p>Targets should work together with expected origin sites to ensure that 
523     the sets of attributes that both sites expect to correspond using are 
524     congruent.</p>
525 </blockquote>
526 <h4><a name="2.f."></a>2.f. Designate Contacts</h4>
527 <blockquote>
528     <p>Since Shibboleth deals both with daily technical and operational issues 
529     and also with contractual issues, a set of contacts should be set up to 
530     support the user base and to facilitate interactions with other Shibboleth 
531     sites and federation members. It is recommended that at least technical and 
532     administrative contacts be designated. Names, titles, e-mail addresses, and 
533     phone numbers may all be useful information to provide.</p>
534 </blockquote>
535 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
536 <blockquote>
537     <p>A primary Shibboleth design consideration was to require very little or 
538     no modification to client machines. The only requirement is that a browser 
539     is used which supports cookies, redirection and SSL. Browser users will have 
540     to perform an additional click to submit the authentication assertion if 
541     JavaScript is not functional.</p>
542 </blockquote>
543 <h4><a name="2.h."></a>2.h. Clocks</h4>
544 <blockquote>
545     <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should be run on all 
546     web servers. Shibboleth employs a short handle issuance time to protect 
547     against replay attacks. Because of this, any significant degree of clock 
548     skew can hinder the ability of users to access sites successfully.</p>
549 </blockquote>
550 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
551 <blockquote>
552     <p>Especially for higher education, there are a handful of laws enacted 
553     which may have important ramifications on the disclosure of personal 
554     information and attributes. Since Shibboleth does not necessarily need to 
555     transmit identity, it is an ideal solution for many higher education 
556     situations. Nevertheless, all parties within the United States of America 
557     are strongly advised to consult the
558     <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights 
559     and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal 
560     legislation before deploying Shibboleth.</p>
561 </blockquote>
562 <p><br>
563 </p>
564 <hr>
565 <h3><a name="3."></a>3. Installation</h3>
566 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
567 <p>The Shibboleth project makes binary packages available for Solaris and Linux 
568 that are precompiled against recent releases of various required libraries such 
569 as OpenSSL. It is highly advisable to build from source when using Shibboleth in 
570 a production environment in order to permit patching or updating of packages as 
571 security holes and bugs are fixed. Building from source is necessary to give you 
572 complete control over your deployment platform. The binary packages represent a 
573 snapshot in time only. To build from source, see the <span class="fixed">
574 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source 
575 distributions.</p>
576 <p>The software requirements listed correspond to the binary distributions. In 
577 general, source builds should work against all recent versions of the operating 
578 systems and software dependencies listed below. For specific questions, inquire 
579 to the support mailing list, or give it a try. Note that OpenSSL releases 
580 frequent security updates; the version listed may not be the most current, but 
581 most minor &quot;letter&quot; updates should be usable.</p>
582 <blockquote>
583     <p><b>Operating System:</b> </p>
584     <ul type="circle">
585         <li>RedHat 7.2-7.3:<ul type="disc">
586             <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a><blockquote>
587                 <p>Apache must be compiled with mod_so for DSO module support, 
588                 and must include SSL support (preferably using
589                 <span class="fixed">mod_ssl</span>), and EAPI support (which
590                 <span class="fixed">mod_ssl</span> requires and provides). 
591                 Shibboleth can coexist with <span class="fixed">mod_auth</span>, 
592                 which may be compiled or loaded into the server for use 
593                 elsewhere, but Shibboleth does not need or use it. The most 
594                 recent Red Hat RPM (1.3.27-2 as of this writing) is sufficient.</p>
595             </blockquote>
596             <blockquote>
597                 <p>On Linux, Shibboleth requires that Apache and Apache-SSL be 
598                 built with <span class="fixed">libpthread</span>, or loading the
599                 <span class="fixed">mod_shibrm</span> or <span class="fixed">
600                 mod_shire</span> modules will cause Apache to stop. While 
601                 RedHat&#39;s Apache is compatible, Debian&#39;s Apache must be rebuilt 
602                 with <span class="fixed">libpthread</span>:</p>
603                 <blockquote>
604                     <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
605                     $ apt-build --rebuild --reinstall install \<br>
606 &nbsp;&nbsp;&nbsp; apache-common apache apache-ssl</span></p>
607                 </blockquote>
608             </blockquote>
609             </li>
610             <li>
611             <a href="http://shibboleth.internet2.edu/release/shib-download.html">
612             Shibboleth v1.0.1 Target for RedHat</a></li>
613             <li><a href="http://www.openssl.org/source/">openssl-0.9.6, revision
614             <span class="fixed">i</span> or newer</a></li>
615             <li>libstdc++3-3.0.4-1.i386.rpm and libgcc-3.0.4-1.i386.rpm<blockquote>
616                 <p>Shibboleth binaries are currently built with
617                 <a href="http://www.gnu.org/software/gcc/gcc.html">GCC 3.04</a>, 
618                 and require these specific library versions. They are available 
619                 as RPMs and are available in the RedHat 7.2 updates directory on 
620                 any
621                 <a href="ftp://rufus.w3.org/linux/redhat/updates/7.2/en/os/i386/">
622                 RedHat mirror</a>. They can be installed alongside earlier and 
623                 later GCC libraries.</p>
624             </blockquote>
625             </li>
626             <li><b>Portions of the <span class="fixed">libphp4</span> Apache 
627             plugin are written in C++, as is Shibboleth. There is a known 
628             conflict between the PHP extensions <span class="fixed">libpspell.so</span> 
629             and <span class="fixed">libsablot.so</span> which will manifest 
630             itself as segmentation faults when starting Apache. If a site wants 
631             to use <span class="fixed">libphp4.so</span> and Shibboleth at once, 
632             then one of the following may be done:</b><ol>
633                 <li>Remove the options <span class="fixed">--with-pspell</span> 
634                 and <span class="fixed">--with-xslt-sablot</span> from PHP&#39;s 
635                 configuration.</li>
636                 <li>Rebuild these two modules using the same version of GCC that 
637                 was used to compile Shibboleth.</li>
638             </ol>
639             </li>
640         </ul>
641         </li>
642         <p><br>
643         </li>
644         <li>Solaris 2.8:<ul type="disc">
645             <li><a HREF="ftp://ftp.openssl.org/source/openssl-0.9.7b.tar.gz">
646             openssl-0.9.7b</a>
647             <blockquote>
648                 <p>The shared library version of OpenSSL is required by 
649                 Shibboleth. The static libraries may be installed as well if 
650                 necessary for other applications, but cannot be used within 
651                 mod_ssl or any other Apache modules.</p>
652             </blockquote>
653             </li>
654             <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a><blockquote>
655                 <p>Apache must be compiled with mod_so for DSO module support, 
656                 and must include SSL support (preferably using
657                 <span class="fixed">mod_ssl</span>) and EAPI support (which
658                 <span class="fixed">mod_ssl</span> requires and provides). 
659                 Shibboleth can coexist with <span class="fixed">mod_auth</span>, 
660                 which may be compiled or loaded into the server for use 
661                 elsewhere, but Shibboleth does not need or use it.</p>
662                 <p><span class="fixed">mod_ssl</span>&#39;s loadable module,
663                 <span class="fixed">libssl.so</span>, must be compiled against
664                 <span class="fixed">OpenSSL 0.9.7b</span>&#39;s shared libraries. 
665                 Other versions or a statically linked build of
666                 <span class="fixed">libssl.so</span> will cause failures such as 
667                 bus errors when used with Shibboleth.</p>
668                 <p>To check how OpenSSL was built, run the <span class="fixed">
669                 ldd</span> command against <span class="fixed">libssl.so</span> 
670                 in the Apache <span class="fixed">/libexec/</span> folder and 
671                 check the output for references to <span class="fixed">
672                 libssl.so.0.9.7b</span>. If you see an earlier version 
673                 mentioned, or no mention of it at all, then <span class="fixed">
674                 OpenSSL 0.9.7b</span> must be built with shared libraries from 
675                 source, and the Apache module rebuilt with it.</p>
676             </blockquote>
677             </li>
678             <li>
679             <a href="ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/libgcc-3.2.2-sol8-sparc-local.gz">
680             libgcc v3.2.2+ and libstdc++ v3.2.2+</a><blockquote>
681                 <p>Shibboleth binaries are currently built with
682                 <a HREF="http://www.gnu.org/software/gcc/gcc.html">GCC 3.2.2</a>, 
683                 and require these specific library versions or newer. They are 
684                 available as Sun freeware packages and can be installed 
685                 alongside earlier and later GCC libraries.</p>
686             </blockquote>
687             </li>
688             <li>
689             <a href="http://shibboleth.internet2.edu/release/shib-download.html">
690             Shibboleth v1.0.1 Target for Solaris</a></li>
691             <li><b>Portions of the <span class="fixed">libphp4</span> Apache 
692             plugin are written in C++, as is Shibboleth. There is a known 
693             conflict with the PHP extensions <span class="fixed">libpspell.so</span> 
694             and <span class="fixed">libsablot.so</span> which will manifest 
695             itself as segmentation faults when starting Apache. If a site wants 
696             to use <span class="fixed">libphp4.so</span> and Shibboleth at once, 
697             then one of the following may be done:</b><ol>
698                 <li>Remove the options <span class="fixed">--with-pspell</span> 
699                 and <span class="fixed">--with-xslt-sablot</span> from PHP&#39;s 
700                 configuration.</li>
701                 <li>Rebuild these two modules using the same version of GCC that 
702                 was used to compile Shibboleth.</li>
703             </ol>
704             </li>
705         </ul>
706         </li>
707         <p><br>
708         </li>
709         <li>RedHat 8 and 9:<blockquote>
710             <p>RedHat 8 and 9 ship with Apache 2, which is not yet supported by 
711             Shibboleth. To run Shibboleth under this OS,
712             <a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a> must 
713             be installed.</p>
714         </blockquote>
715         <blockquote>
716             <p>Apache must be compiled with mod_so for DSO module support, and 
717             must include SSL support (preferably using <span class="fixed">
718             mod_ssl</span>), and EAPI support (which <span class="fixed">mod_ssl</span> 
719             requires and provides). Shibboleth can coexist with
720             <span class="fixed">mod_auth</span>, which may be compiled or loaded 
721             into the server for use elsewhere, but Shibboleth does not need or 
722             use it. The most recent Red Hat RPM (1.3.23-14 as of this writing) 
723             is sufficient.</p>
724         </blockquote>
725         <blockquote>
726             <p>On Linux, Shibboleth requires that Apache and Apache-SSL be built 
727             with <span class="fixed">libpthread</span>, or loading the
728             <span class="fixed">mod_shibrm</span> or <span class="fixed">
729             mod_shire</span> modules will cause Apache to stop. While RedHat&#39;s 
730             Apache is compatible, Debian&#39;s Apache must be rebuilt with
731             <span class="fixed">libpthread</span>:</p>
732             <blockquote>
733                 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
734                 $ apt-build --rebuild --reinstall install apache-common \<br>
735 &nbsp;&nbsp;&nbsp; apache apache-ssl</span></p>
736             </blockquote>
737         </blockquote>
738         <ul type="disc">
739             <li>
740             <a href="http://shibboleth.internet2.edu/release/shib-download.html">
741             Shibboleth 1.0.1 Target for RedHat</a></li>
742             <li><a href="http://www.openssl.org/source/">openssl-0.9.6, revision
743             <span class="fixed">i</span> or newer</a></li>
744             <li>libstdc++3-3.0.4-1.i386.rpm and libgcc-3.0.4-1.i386.rpm
745             <blockquote>
746                 <p>Shibboleth binaries are currently built with
747                 <a href="http://www.gnu.org/software/gcc/gcc.html">GCC 3.04</a>, 
748                 and require these specific library versions. They are available 
749                 as RPMs and are available in the RedHat 7.2 updates directory on 
750                 any
751                 <a href="ftp://rufus.w3.org/linux/redhat/updates/7.2/en/os/i386/">
752                 RedHat mirror</a>. They can be installed alongside earlier and 
753                 later GCC libraries.</p>
754             </blockquote>
755             </li>
756             <li><b>Portions of the <span class="fixed">libphp4</span> Apache 
757             plugin are written in C++, as is Shibboleth. There is a known 
758             conflict with the PHP extensions <span class="fixed">libpspell.so</span> 
759             and <span class="fixed">libsablot.so</span> which will manifest 
760             itself as segmentation faults when starting Apache. If a site wants 
761             to use <span class="fixed">libphp4.so</span> and Shibboleth at once, 
762             then one of the following may be done:</b>
763             <ol>
764                 <li>Remove the options <span class="fixed">--with-pspell</span> 
765                 and <span class="fixed">--with-xslt-sablot</span> from PHP&#39;s 
766                 configuration. </li>
767                 <li>Rebuild these two modules using the same version of GCC that 
768                 was used to compile Shibboleth. </li>
769             </ol>
770             </li>
771         </ul>
772         </li>
773     </ul>
774 </blockquote>
775 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
776 <blockquote>
777     <p>For the sake of clarity, this deployment guide assumes that standard 
778     directories are used for all installations. These directories may be changed 
779     for local implementations, but must be done so consistently.</p>
780     <ol type="1">
781         <li>Ensure that you have obtained the proper
782         <a href="http://shibboleth.internet2.edu/release/shib-download.html">
783         tarball</a> for your operating system.</li>
784         <li>On Unix, the tarballs expand into <span class="fixed">
785         /opt/shibboleth</span>, and should be expanded as <span class="fixed">
786         root</span> from <span class="fixed">/</span>. If you use a different 
787         layout or location, you will need to adjust your configuration files. 
788         You should see the following directory structure (date and size details 
789         notwithstanding):<blockquote>
790             <p><span class="fixed">$ ls -l<br>
791             drwxr-xr-x 2 root root 4096 Oct 24 03:54 bin<br>
792             drwxr-xr-x 2 root root 4096 Oct 24 03:54 doc<br>
793             drwxr-xr-x 4 root root 4096 Oct 24 03:54 etc<br>
794             drwxr-xr-x 13 root root 4096 Oct 24 03:54 include<br>
795             drwxr-xr-x 4 root root 4096 Oct 24 03:55 lib<br>
796             drwxr-xr-x 2 root root 4096 Oct 24 03:55 libexec<br>
797             drwxr-xr-x 4 root root 4096 Oct 24 02:02 share</span></p>
798         </blockquote>
799         <p>On Windows, until a real installer is available, the zip file should 
800         be unpacked beneath the root of the system drive, where it will create 
801         an <span class="fixed">\opt\shibboleth</span> tree that resembles the 
802         Unix layout above. This will allow the standard configuration options to 
803         work. <b>The <span class="fixed">C:\opt\shibboleth\lib</span> directory 
804         MUST be added to the system path to enable proper operation.</b> </li>
805     </ol>
806 </blockquote>
807 <h4><a name="3.c."></a>3.c. Configure Apache 1.3.x</h4>
808 <blockquote>
809     <ol type="1">
810         <li>Shibboleth includes configuration directives in the file
811         <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span> 
812         which must be added to the httpd.conf file used locally. It is 
813         recommended that these directives simply be added to the end of the 
814         existing <span class="fixed">httpd.conf</span> file rather than trying 
815         to merge it in-line; <a href="#3.c.2.">step 2</a> describes the 
816         necessary modifications to the Apache startup script. The default 
817         configuration will often work, but if customization is necessary, these 
818         options may be modified:<dl>
819             <dd class="attribute"><span class="fixed">LoadModule &lt;module&gt; 
820             &lt;pathname&gt;</span> </dd>
821             <dd class="value">Specifies the title and location of the
822             <span class="fixed">shibrm_module</span> resource manager and
823             <span class="fixed">shire_module</span> SHIRE modules. These are 
824             installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shibrm.so</span> 
825             and <span class="fixed">/opt/shibboleth/libexec/mod_shire.so</span></dd>
826             <dd class="attribute"><span class="fixed">SHIREConfig &lt;pathname&gt;</span>
827             </dd>
828             <dd class="value">Specifies the <span class="fixed">pathname</span> 
829             of the SHIRE&#39;s configuration file. Defaults to <span class="fixed">
830             /opt/shibboleth/etc/shibboleth/shibboleth.ini</span>.</dd>
831             <dd class="attribute"><span class="fixed">SHIREURL &lt;url&gt;<br>
832             &lt;Location &lt;url&gt;&gt;<br>
833             &nbsp;&nbsp;SetHandler &lt;method&gt;<br>
834             &lt;/Location&gt;</span></dd>
835             <dd class="value">Specifies the <span class="fixed">URL</span> and 
836             the <span class="fixed">method</span> the target uses to handle 
837             requests for Shibboleth-protected resources. Currently,
838             <span class="fixed">shib-shire-post</span> is the only available 
839             handler <span class="fixed">method</span>. <span class="fixed">
840             SHIREURL</span> is used by Shibboleth when re-directing the user to 
841             the WAYF and <span class="fixed">&lt;Location&gt;</span> by Apache; for 
842             this reason, both <span class="fixed">URL</span> specifications must 
843             match. Note that the configuration file itself contains &lt;&gt;&#39;s, and
844             <span class="fixed">Location</span> should not be replaced.<p>The 
845             referenced <span class="fixed">URL</span> can be either a partial 
846             path or an absolute URL. The partial path allows each virtual server 
847             to use its own hostname and port in the SHIRE for session cookie 
848             purposes, while the absolute URL forces HTTP virtual servers to use 
849             HTTPS for the SHIRE. Use of a full <span class="fixed">https://</span> 
850             URL is advised.</dd>
851             <dd class="attribute"><span class="fixed">ShibMapAttribute 
852             &lt;attribute-uri&gt; &lt;HTTP-header&gt; [alias]</span> </dd>
853             <dd class="value"><b>This command has been deprecated in favor of 
854             the configuration support available in the Attribute Acceptance 
855             Policy file. See <a href="#4.e.">section 4.e.</a> It may be removed 
856             in a future release.</b></dd>
857         </dl>
858         </li>
859         <li><a name="3.c.2."></a>These modifications must be made to the Apache 
860         startup script:<p>Add the following environment variable:</p>
861         <blockquote>
862             <p><span class="fixed">SHIBCONFIG=/opt/shibboleth/etc/shibboleth/shibboleth.ini<br>
863             export SHIBCONFIG</span></p>
864         </blockquote>
865         <p>If the OpenSSL libraries are not in the system&#39;s search path, they 
866         should be added to <span class="fixed">LD_LIBRARY_PATH</span>. Generally 
867         libtool&#39;s linker options will insure that the modules can locate the 
868         Shibboleth libraries, but if not, you may need to add
869         <span class="fixed">/opt/shibboleth/lib</span> to <span class="fixed">
870         LD_LIBRARY_PATH</span> as well.</p>
871         <p>If the SHIBCONFIG environment variable is not specified, Shibboleth 
872         will use <span class="fixed">/opt/shibboleth/etc/shibboleth/shibboleth.ini</span> 
873         by default.</li>
874         <li>The SHAR must be started along with Apache. Among other methods on 
875         Unix, this can be done either by creating a separate SHAR startup script 
876         or by modifying Apache&#39;s RC script to start/stop the <span class="fixed">
877         SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is 
878         suggested that Apache&#39;s script be modified by adding:<blockquote>
879             <p><span class="fixed">/opt/shibboleth/bin/shar -f &amp;</span> </p>
880         </blockquote>
881         <p>Sample <span class="fixed">init.d</span> scripts may be included with 
882         future releases. Ensure that the environment variable referenced in
883         <a href="#3.c.2">3.c.2</a> are in place.</li>
884         <li>By default, the Shibboleth modules are configured to log information 
885         on behalf of Apache to the file <span class="fixed">
886         /opt/shibboleth/etc/shibboleth/shire.log</span>, though this can be 
887         changed. For this log to be created, Apache must have permission to 
888         write to this file, which may require that the file be manually created 
889         and permissions assigned to whatever user Apache is configured to run 
890         under. If the file does not appear when Apache runs with the modules 
891         loaded, check for permission problems. </li>
892         <li>The options in <span class="fixed">shibboleth.ini</span> must be 
893         configured as documented in <a href="#4.a.">4.a</a>. Apache content will 
894         then need to be modified for Shibboleth authentication. This is 
895         discussed in <a href="#4.d.">4.d</a>. It is recommended that the target 
896         then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
897     </ol>
898 </blockquote>
899 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
900 <blockquote>
901     <ol type="1">
902         <li>The package includes an ISAPI filter and bundled extension for SHIRE 
903         POST processing in a single library, <span class="fixed">libexec\isapi_shib.dll</span>. 
904         This filter is configured using commands in <span class="fixed">
905         C:\opt\shibboleth\etc\shibboleth\shibboleth.ini</span>. Make sure you&#39;ve 
906         added the library directory to the path as directed in <a href="#3.b.">
907         section 3.b.</a><p>Installing the extension into IIS is a two step 
908         process:<ol type="1">
909             <li type="a">First, add the filter using the Internet Services 
910             Manager MMC console. Right click on the machine icon on the left, 
911             and edit the WWW Service master properties. On the &quot;ISAPI Filters&quot; 
912             tab, add a new filter called Shibboleth and specify the DLL named 
913             above. The priority should be High, and once the filter is loaded, 
914             make sure it appears in the list <b>below</b> the &quot;sspifilt&quot; entry. 
915             Restart IIS and make sure the filter shows up with a green arrow. 
916             Check the Windows event log if it fails to load. The default 
917             configuration options are sparse, but they should allow the filter 
918             to at least initialize.</li>
919             <li type="a">Secondly, map a special file extension, such as
920             <span class="fixed">.shire</span>, to the ISAPI library so that 
921             virtual URLs can be specified to invoke the SHIRE handler for each 
922             web site. Right click on the machine icon on the left, and edit the 
923             WWW Service master properties. On the &quot;Home Directory&quot; tab, add a 
924             script mapping using the &quot;Configuration&quot; button. The &quot;Executable&quot; 
925             box should point to the filter/extension library, and the 
926             &quot;Extension&quot; can be set to anything unlike to conflict, but
927             <span class="fixed">.shire</span> is assumed (and the dot must be 
928             included). You should select the option to limit verbs to POST, and 
929             you must uncheck the &quot;Check that file exists&quot; box.</li>
930         </ol>
931         </li>
932         <li>All other aspects of configuration are handled via the
933         <span class="fixed">shibboleth.ini</span> file and associated XML-based 
934         policy files described in subsequent sections. Particular use is made of 
935         the per-hostname section feature that allows global settings to be 
936         overridden per-site, and this permits different IIS instances to be 
937         separately configured.</li>
938         <li>A special section must be added/uncommented in the
939         <span class="fixed">shibboleth.ini</span> file to support IIS usage. The
940         <span class="fixed">[isapi]</span> section must be used to map IIS 
941         Instance ID numbers to fully-qualified hostnames that correspond to 
942         named sections later in the file. Instance IDs are used in the IIS 
943         metabase to identify web sites. They are applied starting with the 
944         number 1 and number the web sites in order in the Internet Services 
945         Manager from top to bottom. In the <span class="fixed">[isapi]</span> 
946         section, add lines in the following form:
947         <blockquote class="fixed">
948             <p>1=hostname.domain.com<br>
949             2=hostname2.domain.com<br>
950             (etc...)</p>
951         </blockquote>
952         <p>At least an empty configuration section named <span class="fixed">
953         hostname.domain.com</span> should then be added to the end of the file. 
954         Any options specific to that web site can be added as documented in 
955         later sections.</li>
956         <li>See the following section for information on running the SHAR 
957         service on Windows.</li>
958         <li>The options in <span class="fixed">shibboleth.ini</span> must be 
959         configured as documented in <a href="#4.a.">4.a</a>. It is recommended 
960         that the target then be tested as detailed in section <a href="#5.a.">
961         5.a</a>.</li>
962     </ol>
963 </blockquote>
964 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
965 <blockquote>
966     <p>The SHAR is a console application that is primarily designed to be 
967     installed as a Windows service. To run the process in console mode for 
968     testing, the <span class="fixed">-console</span> parameter is used. 
969     Otherwise, parameters are used to install (or remove) the SHAR from the 
970     service database and subsequent control is via the Service Control Manager 
971     applet. The following command line parameters can be used:</p>
972     <dl>
973         <dd class="attribute"><span class="fixed">-console</span></dd>
974         <dd class="value">Allows the process to be started from a command 
975         prompt. Since the console will exit if the desktop user logs out, this 
976         is not suitable for production use, but may be useful for testing.</dd>
977         <dd class="attribute"><span class="fixed">-config &lt;pathname&gt;</span> </dd>
978         <dd class="value">Specifies the pathname of the SHAR&#39;s configuration 
979         file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.ini</span> 
980         or the value of the <span class="fixed">SHIBCONFIG</span> environment 
981         variable, if it is set.</dd>
982         <dd class="attribute"><span class="fixed">-install &lt;servicename&gt;</span></dd>
983         <dd class="value">Installs the SHAR as a named service in the Windows 
984         service database. A name should be provided if multiple instances of the 
985         SHAR need to be run on different ports, and thus installed separately. 
986         The <span class="fixed">-config</span> option can be provided to include 
987         a specific configuration file on the service&#39;s command line.</dd>
988         <dd class="attribute"><span class="fixed">-remove &lt;servicename&gt;</span></dd>
989         <dd class="value">Removes the named service instance of the SHAR from 
990         the Windows service database.</dd>
991     </dl>
992     <h4><br>
993     </h4>
994 </blockquote>
995 <hr>
996 <h3><a name="4."></a>4. Getting Running</h3>
997 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.ini</span></h4>
998 <blockquote>
999     <p>Most of the configuration for the SHAR, SHIRE, and RM is stored in the 
1000     file <span class="fixed">shibboleth.ini</span>. This file is split into 
1001     several pre-defined sections. The first sections, <span class="fixed">
1002     [general]</span>, <span class="fixed">[shire]</span>, and
1003     <span class="fixed">[shar]</span>, define the operational parameters for the
1004     <span class="fixed">SHIRE</span> and <span class="fixed">SHAR</span>. While 
1005     not precisely accurate, the <span class="fixed">[shire]</span> section is 
1006     generally associated with the web server modules and libraries that 
1007     applications interface with, while the <span class="fixed">[shar]</span> 
1008     section is associated with the separate SHAR process. The
1009     <span class="fixed">[general]</span> section holds global settings, used by 
1010     all components. The <span class="fixed">[shire]</span> and
1011     <span class="fixed">[shar]</span> sections can override the
1012     <span class="fixed">[general]</span> tags with SHIRE- or SHAR-specific 
1013     configuration. For example, if the SHAR is looking for a tag, it will look 
1014     first in the <span class="fixed">shar</span> section; if it does not find 
1015     the tag there, it will proceed to look in the <span class="fixed">general</span> 
1016     section.</p>
1017     <p>The following sections, <span class="fixed">[metadata_shire]</span>,
1018     <span class="fixed">[metadata_shar]</span>, and <span class="fixed">
1019     [policies]</span>, define the trust framework within which the entire system 
1020     operates. Example configuration files are bundled with the Shibboleth 
1021     distribution, currently derived from the InQueue staging federation managed 
1022     by Internet2</p>
1023     <p>For Apache (but not IIS), there is also information that must be 
1024     configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span> 
1025     (or equivalent);&nbsp; for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1026     <p>Information in the logging configuration files referenced by
1027     <span class="fixed">shibboleth.ini</span> may require additional changes to 
1028     meet local needs. The logging level can be raised to <span class="fixed">
1029     INFO</span> or <span class="fixed">DEBUG</span> if additional detail is 
1030     needed for testing. It is recommended that after initial installation is 
1031     completed, the log level in both files be left at either <span class="fixed">
1032     INFO</span> or <span class="fixed">WARN</span>.</p>
1033     <p>Fields that are purple are optional; grey fields are mandatory. If the 
1034     option only applies to a specific environment, such as IIS/ISAPI only, then 
1035     this is indicated.</p>
1036     <p><span class="fixed">[general]</span>:</p>
1037     <dl>
1038         <dd class="attribute"><span class="fixed">logger = &lt;pathname&gt;</span></dd>
1039         <dd class="value">Specifies the location of the <span class="fixed">
1040         log4cpp</span> configuration file for most Shibboleth events. This 
1041         element may also be optionally specified for each of the components 
1042         individually (which is the default provided, so this setting is often 
1043         unused). Default logging settings (using local log files) should 
1044         suffice. If using a remote syslogd instead, the <span class="fixed">
1045         syslog</span> daemon must accept <span class="fixed">UDP:514</span> 
1046         messages, and on Linux, <span class="fixed">SYSLOGD_OPTIONS</span> must 
1047         include <span class="fixed">-r</span> to enable logging from remote 
1048         machines. The logging level is also defined in the logger configuration 
1049         file. The configuration format and log levels are similar to that of the
1050         <a href="http://jakarta.apache.org/log4j/docs/documentation.html">Log4j</a> 
1051         package&#39;s property format.</dd>
1052         <dd class="attribute"><span class="fixed">schemadir = &lt;pathname&gt;</span></dd>
1053         <dd class="value">Specifies the directory in which the XML schema files 
1054         are located; defaults to <span class="fixed">
1055         /opt/shibboleth/etc/shibboleth/</span>. This should generally be left 
1056         alone, unless a non-default installation path is used.</dd>
1057         <dd class="attribute"><span class="fixed">sharsocket = &lt;pathname&gt; | [IP 
1058         interface:]port</span></dd>
1059         <dd class="value">Specifies the location of the socket the SHAR uses to 
1060         form connections. Note that if you change this, the SHAR and Apache 
1061         should both be restarted immediately, since new Apache child processes 
1062         will use the changed value as soon as they start up.
1063         <p>On Unix, this is usually set to a domain socket path, often something 
1064         in <span class="fixed">/tmp</span>. On Windows, this must be either a 
1065         TCP port number, or a combination of an IP address and port, with a 
1066         colon in between. Using an address specifies an IP interface to bind to 
1067         on multi-homed servers. Using just a port number generally suffices. If 
1068         this syntax is used on Unix, then the process will use a TCP socket 
1069         instead of a domain socket. </p>
1070         <p><b>Security Note:</b> Using TCP, which is mandatory on Windows, can 
1071         be insecure if used in certain non-default configurations. If you allow 
1072         access to the service from other hosts, be sure a firewall is in place 
1073         to prevent unauthorized access. The <span class="fixed">sharacl</span> 
1074         setting, described later, provides some minimal filtering, but TCP is 
1075         still an insecure protocol.</dd>
1076     </dl>
1077     <p>The rest of the <span class="fixed">[general]</span> configuration 
1078     section defines global settings that can be overridden by server-specific 
1079     tags in sections defined by the server name. This is especially applicable 
1080     for non-Apache configurations. For example, if you have a web server named 
1081     www.example.edu, you can define a section <span class="fixed">[www.example.edu]</span> 
1082     and override global tags with tags for that server only.</p>
1083     <p>The following table lists the server-specific tags. It is broken into 
1084     mandatory tags, and optional tags. Tags in the <span class="fixed">[general]</span> 
1085     section correspond to all servers; to override specific tags on a per-server 
1086     basis, use <span class="fixed">[&lt;FQDN&gt;]</span> as the header for a section (FQDN 
1087     means fully-qualified domain name, and corresponds to the name you assign to 
1088     a virtual host using the Apache ServerName directive, or that you map IIS 
1089     instance IDs to using the <span class="fixed">[isapi]</span> section.</p>
1090     <p><span class="fixed">[&lt;general&gt;]</span>:</p>
1091     <dl>
1092         <dd class="attribute"><span class="fixed">wayfURL = &lt;absolute url&gt;</span></dd>
1093         <dd class="value">Specifies the URL of the WAYF service the user is 
1094         redirected to. Federations will often provide this URL in order to 
1095         control the way in which sites are presented to users, but a target may 
1096         provide this function, or it may be set directly to a specific site&#39;s 
1097         Handle Service, effectively rendering the system internal to a single 
1098         origin site.</dd>
1099         <dd class="attribute"><span class="fixed">shireURL = &lt;absolute or 
1100         relative url&gt;</span> ISAPI</dd>
1101         <dd class="value">Specifies the URL of the SHIRE POST URL, or assertion 
1102         consumer service, at which new sessions are initiated. This can be an 
1103         absolute URL, or a relative path to be prefixed by the base URL of the 
1104         web site. Using an absolute URL allows a virtual server to funnel SHIRE 
1105         requests to a fixed location, such as in the case where a non-SSL site 
1106         wants to handle SHIRE requests over SSL (on a different port).
1107         <p>Note that this URL will result in a cookie being set, and this cookie 
1108         must be returned in subsequent requests, so the virtual server&#39;s domain 
1109         name and port must be consistent with the SHIRE&#39;s domain name and port 
1110         for some browsers to properly return the cookie. If default ports are 
1111         used (and thus left unspecified), browsers will generally return cookies 
1112         set via SSL to a non-SSL server. If non-default ports are used, it is 
1113         recommended that this be a relative URL so that each virtual host 
1114         handles its own cookie operations.</p>
1115         <p>For Shibboleth to function in IIS, the file extension at the end of 
1116         this URL must match the value configured into IIS and mapped to the 
1117         ISAPI extension. This causes the request to be serviced properly, even 
1118         though no file by that name actually exists.</dd>
1119         <dd class="attribute"><span class="fixed">cookieName = &lt;string&gt;</span></dd>
1120         <dd class="value">Defines the name to be assigned to in-memory session 
1121         cookies.</dd>
1122         <dd class="attribute"><span class="fixed">shireError = &lt;pathname&gt;</span></dd>
1123         <dd class="value">Specifies the location of the template for the error 
1124         page generated when there is an error re-directing the user to the WAYF 
1125         or processing a new session sign-on.</dd>
1126         <dd class="attribute"><span class="fixed">rmError = &lt;pathname&gt;</span></dd>
1127         <dd class="value">Specifies the location of the template for the error 
1128         page generated if internal errors occur in the RM.</dd>
1129         <dd class="attribute"><span class="fixed">accessError = &lt;pathname&gt;</span></dd>
1130         <dd class="value">Specifies the location of the template for the page 
1131         displayed to users when access to a protected resource is denied by the 
1132         RM. This is distinct from when errors occur during the evaluation 
1133         process itself, and indicates a denial of authorization.</dd>
1134         <dd class="attributeopt"><span class="fixed">normalizeRequest = &lt;true|false&gt;</span></dd>
1135         <dd class="valueopt">If true, all redirects and computed request URLs 
1136         generated by Shibboleth will be created using the virtual server name 
1137         assigned to the server. If <span class="fixed">false</span>, the 
1138         browser&#39;s supplied URL is sometimes used to compute the information. 
1139         This sometimes has no effect, depending on the capabilities of the web 
1140         server, since the correct behavior is almost always to rely on the 
1141         server&#39;s API to report the hostname and ignore the browser.</dd>
1142         <dd class="attributeopt"><span class="fixed">checkIPAddress = &lt;true|false&gt;</span></dd>
1143         <dd class="valueopt">If <span class="fixed">true</span>, Shibboleth will 
1144         check client addresses for impersonation protection. In most 
1145         circumstances, this should be enabled to prevent certain attacks 
1146         concerning stolen cookies, but this can cause problems for users behind 
1147         proxies or NAT devices. Defaults to <span class="fixed">false</span>.</dd>
1148         <dd class="attributeopt"><span class="fixed">shireSSLOnly = &lt;true/false&gt;</span></dd>
1149         <dd class="valueopt">If <span class="fixed">true</span>, the SHIRE will 
1150         reject HTTP connections for new session sign-on that are not SSL-protected. 
1151         This guards the initial session sign-on from the browser, but does not 
1152         preclude non-SSL content. Use of SSL is strongly recommended; see 
1153         section <a href="#2.c.">2.c</a> for more information.</dd>
1154         <dd class="attributeopt"><span class="fixed">mustContain = 
1155         &lt;string1&gt;;&lt;string2&gt;</span> ISAPI</dd>
1156         <dd class="valueopt">Controls what content in IIS to protect with 
1157         Shibboleth. Multiple values should be separated with a semicolon. Each 
1158         string is matched directly against the requested URL, and if the URL 
1159         contains the string, a match is made and Shibboleth applies. No regular 
1160         expressions are supported, only literal matches. Slashes are matched 
1161         like other characters, so path components can be surrounded with slashes 
1162         to match any requests with a particular component in the path. Defaults 
1163         to protecting everything on a server or site.</dd>
1164         <dd class="attributeopt"><span class="fixed">contentSSLOnly = &lt;true|false&gt;</span> 
1165         ISAPI</dd>
1166         <dd class="valueopt">If <span class="fixed">true</span>, Shibboleth will 
1167         insist that any request for protected content is over an SSL connection. 
1168         Defaults to <span class="fixed">false</span>.</dd>
1169         <dd class="attributeopt"><span class="fixed">authLifetime = &lt;seconds&gt;</span> 
1170         ISAPI</dd>
1171         <dd class="valueopt">If set, sessions are always terminated after the 
1172         specified number of seconds, resulting in a new redirect and request for 
1173         authentication, just as if a new request without a session is received. 
1174         Defaults to infinite.</dd>
1175         <dd class="attributeopt"><span class="fixed">authTimeout = &lt;seconds&gt;</span> 
1176         ISAPI</dd>
1177         <dd class="valueopt">If set, sessions are always terminated after the 
1178         specified number of seconds of inactivity (defined as no requests 
1179         received in that session), resulting in a new redirect and request for 
1180         authentication, just as if a new request without a session is received. 
1181         Defaults to infinite.</dd>
1182         <dd class="attributeopt"><span class="fixed">requestAttributes = &lt;attr1&gt; 
1183         &lt;attr2&gt; &lt;attr3&gt;...</span> </dd>
1184         <dd class="valueopt">Specifies a space-delimited list of attributes 
1185         (named by a designated URI) that the SHAR will request when querying for 
1186         attributes. By default, the SHAR will ask for and receive all attributes 
1187         the AA is willing to release to it.</dd>
1188         <dd class="attributeopt"><span class="fixed">exportAssertion = &lt;true|false&gt;</span> 
1189         ISAPI</dd>
1190         <dd class="valueopt">If set, the SAML attribute assertion received by 
1191         the SHAR is exported to a CGI request header called Shib-Attributes, 
1192         encoded in base64. Defaults to <span class="fixed">false</span>. While 
1193         this does require parsing the raw XML, it also permits an application to 
1194         see attributes that may have been filtered by an AAP, or to forward the 
1195         SAML assertion to a third party.</dd>
1196         <dd class="attributeopt"><span class="fixed">supportContact = &lt;e-mail&gt;</span></dd>
1197         <dd class="valueopt">Specifies the local site&#39;s support e-mail address, 
1198         and is used in the generation of error pages.</dd>
1199         <dd class="attributeopt"><span class="fixed">logoLocation = &lt;pathname&gt;</span></dd>
1200         <dd class="valueopt">Specifies the location of the logo used in the 
1201         generation of error pages. This logo can be in any format that the web 
1202         browser will understand, and should be a URL (absolute or relative) that 
1203         will return a valid logo.</dd>
1204     </dl>
1205     <p><span class="fixed">[shire]</span>:</p>
1206     <dl>
1207         <dd class="attribute"><span class="fixed">metadata = &lt;section tag&gt;</span></dd>
1208         <dd class="value">Specifies the tag that defines the section of
1209         <span class="fixed">shibboleth.ini</span> the SHIRE should use to 
1210         acquire its metadata. The SHIRE does not need trust metadata, and so 
1211         generally it will only need site metadata and attribute acceptance 
1212         policy to define attributes and enforce policies like scope 
1213         limitations(e.g. MIT not asserting attributes @brown.edu.)</dd>
1214         <dd class="attributeopt"><span class="fixed">logger = &lt;pathname&gt;</span></dd>
1215         <dd class="valueopt">Specifies the location of the <span class="fixed">
1216         log4cpp</span> configuration file for Shibboleth events produced by the 
1217         web server modules and libraries. Refer to the global setting for more 
1218         information.</dd>
1219         <dd class="attributeopt"><span class="fixed">aap-uri = &lt;uri&gt;</span> 
1220         DEPRECATED</dd>
1221         <dd class="valueopt">Specifies the URI of an attribute acceptance policy 
1222         XML file. This command has been replaced with a new metadata provider 
1223         type for attribute policy that should be provided to both the SHIRE and 
1224         SHAR components. To replace this command, add lines to both metadata 
1225         sections of this form:
1226         <blockquote class="fixed">
1227             <p>edu.internet2.middleware.shibboleth.target.AAP.XML=&lt;uri&gt;</p>
1228         </blockquote>
1229         <p>For more information, refer to section <a href="#4.e.">4.e</a>. This 
1230         command will be removed in future releases.</dd>
1231     </dl>
1232     <p><span class="fixed">[shar]</span>:</p>
1233     <dl>
1234         <dd class="attribute"><span class="fixed">metadata = &lt;tag&gt;</span></dd>
1235         <dd class="value">Specifies the tag that defines the section of
1236         <span class="fixed">shibboleth.ini</span> the SHAR should use to acquire 
1237         its site, trust, and attribute metadata.</dd>
1238         <dd class="attribute"><span class="fixed">cacheType = &lt;method&gt;</span></dd>
1239         <dd class="value">Specifies the method used by the SHAR to cache 
1240         sessions and attributes. The default is <span class="fixed">memory</span>, 
1241         which indicates that the SHAR should store received attributes in 
1242         memory. Another option is <span class="fixed">mysql</span>, which will 
1243         use the MySQL Credential Cache, if it is available.</dd>
1244         <dd class="attribute"><span class="fixed">cacheClean = &lt;seconds&gt;</span></dd>
1245         <dd class="value">Specifies the duration in seconds between cleanups of 
1246         the SHAR&#39;s cached but expired sessions and attributes. Defaults to
1247         <span class="fixed">300</span>, or 5 minutes.</dd>
1248         <dd class="attribute"><span class="fixed">cacheTimeout = &lt;seconds&gt;</span></dd>
1249         <dd class="value">Specifies the duration in <span class="fixed">seconds</span> 
1250         that must elapse between user accesses before that user&#39;s session is 
1251         destroyed, including the associated handle and all cached attributes. 
1252         Defaults to <span class="fixed">28800</span> seconds, or 8 hours. This 
1253         should generally be longer than the associated server&#39;s settings for 
1254         session lifetime and timeout.</dd>
1255         <dd class="attributeopt"><span class="fixed">logger = &lt;pathname&gt;</span></dd>
1256         <dd class="valueopt">Specifies the location of the <span class="fixed">
1257         log4cpp</span> configuration file for Shibboleth events produced by the 
1258         SHAR service. Refer to the global setting for more information.</dd>
1259         <dd class="attributeopt"><span class="fixed">sharacl = &lt;IP Address&gt;</span></dd>
1260         <dd class="valueopt">Specifies one or more space-delimited IP addresses 
1261         from which a TCP-based SHAR service will accept connections. Defaults to 
1262         127.0.0.1 (localhost). Should only be changed if proper precautions have 
1263         been taken to protect connections from off-host.</dd>
1264         <dd class="attributeopt"><span class="fixed">certFile = &lt;pathname&gt;</span>
1265         </dd>
1266         <dd class="valueopt">Specifies the location of the PEM-format 
1267         certificate used by the SHAR to communicate in authenticated fashion 
1268         with origin site Attribute Authorities.</dd>
1269         <dd class="attributeopt"><span class="fixed">keyFile = &lt;pathname&gt;</span>
1270         </dd>
1271         <dd class="valueopt">Specifies the location of the PEM-format private 
1272         key used by the SHAR to communicate in authenticated fashion with origin 
1273         site Attribute Authorities.</dd>
1274         <dd class="attributeopt"><span class="fixed">keyPass = &lt;password&gt;</span>
1275         </dd>
1276         <dd class="valueopt">Specifies the <span class="fixed">password</span> 
1277         used to access the <span class="fixed">keyFile</span>, if any.</dd>
1278         <dd class="attributeopt"><span class="fixed">calist = &lt;pathname&gt;</span>
1279         </dd>
1280         <dd class="valueopt">Specifies a single file of PEM-format certificates 
1281         containing the root CAs the SHAR will consider to be valid signers of AA 
1282         server certificates. Currently applies globally to all communication 
1283         with AAs.</dd>
1284         <dd class="attributeopt"><span class="fixed">AATimeout = &lt;seconds&gt;</span>
1285         </dd>
1286         <dd class="valueopt">Specifies the number of seconds that the SHAR will 
1287         wait for attributes to be sent from an AA. Defaults to
1288         <span class="fixed">60</span>.</dd>
1289         <dd class="attributeopt"><span class="fixed">AAConnectTimeout = 
1290         &lt;seconds&gt;</span> </dd>
1291         <dd class="valueopt">Specifies the number of seconds that the SHAR will 
1292         wait for a connection to be established with an AA. Defaults to
1293         <span class="fixed">30</span>.</dd>
1294     </dl>
1295     <p><span class="fixed">[metadata]</span> sections must be created and named 
1296     in accordance with the value of the <span class="fixed">metadata</span> 
1297     parameter in the <span class="fixed">[shire]</span> and <span class="fixed">
1298     [shar]</span> sections. Metadata sections may be shared or defined for each 
1299     component. Three XML-based providers are supported by Shibboleth, but future 
1300     providers may be specified with name/value pairs consisting of
1301     <span class="fixed">&lt;metadata provider type&gt;=&lt;source&gt;</span>.</p>
1302     <p>Note that any number of files of the three types may be loaded into the 
1303     system, which supports aggregating policy from across federations.</p>
1304     <p>Shibboleth provides a simple utility called <span class="fixed">
1305     siterefresh</span> for updating metadata files from a central location and 
1306     verifying a digital signature over them, as described in section
1307     <a href="#4.g.">4.g</a>.</p>
1308     <p><span class="fixed">[&lt;metadata&gt;]</span>:</p>
1309     <dl>
1310         <dd class="attribute"><span class="fixed">
1311         edu.internet2.middleware.shibboleth.metadata.XML = &lt;pathname&gt;</span></dd>
1312         <dd class="value">Specifies the location of the file to load site 
1313         metadata from. This information controls what origin sites are trusted 
1314         by the target and provides contact information. This should be a file 
1315         stored locally, and may be used by both the SHIRE and SHAR.</dd>
1316         <dd class="attribute"><span class="fixed">
1317         edu.internet2.middleware.shibboleth.trust.XML = &lt;pathname&gt;</span></dd>
1318         <dd class="value">Specifies the location of the trust database of 
1319         certificates and/or CA roots used by the SHAR during session initiation 
1320         (but currently is not used during attribute exchange). The SHIRE 
1321         component generally does not need trust data.</dd>
1322         <dd class="attribute"><span class="fixed">
1323         edu.internet2.middleware.shibboleth.target.AAP.XML = &lt;pathname&gt;</span></dd>
1324         <dd class="value">Specifies the location of the Attribute Acceptance 
1325         Policy file that defines what attributes will be visible to 
1326         applications, how to filter their values based on the source, and how to 
1327         make them available to applications and the RM. See <a href="#4.e.">
1328         section 4.e.</a> for detailed information on this file.<p><b>This 
1329         provider has been added as of version 1.0.1, and supersedes the old
1330         <span class="fixed">aap-uri</span> and <span class="fixed">attributes</span> 
1331         settings, as well as the Apache <span class="fixed">ShibMapAttribute</span> 
1332         command.</b></dd>
1333     </dl>
1334     <p>The <span class="fixed">[extensions:saml]</span> section specifies a set 
1335     of extension libraries to load that add additional functionality to the 
1336     system. Examples include session cache implementations, such as the MySQL 
1337     cache, or advanced metadata providers.</p>
1338     <p><span class="fixed">[extensions:saml]</span>:</p>
1339     <dl>
1340         <dd class="attribute"><span class="fixed">&lt;name&gt; = &lt;library pathname&gt;</span>
1341         </dd>
1342         <dd class="value">The name of the extension is simply a unique key and 
1343         is not important. The path to the library to load must be absolute and 
1344         complete.</dd>
1345     </dl>
1346     <p>The <span class="fixed">[policies]</span> section contains the policy URI 
1347     values that control acceptance of assertions from origin sites. This may 
1348     eventually have multiple elements associated it for targets that are members 
1349     of multiple federations.</p>
1350     <p><span class="fixed">[policies]</span>:</p>
1351     <dl>
1352         <dd class="attribute"><span class="fixed">&lt;federation&gt; = &lt;URI&gt;</span>
1353         </dd>
1354         <dd class="value">The name of the <span class="fixed">federation</span> 
1355         and its associated policy <span class="fixed">URI</span>. This 
1356         information should be provided by federations and is designed to support 
1357         future work in federation deployment. For the time being, it simply 
1358         insures that deployments not meant to interoperate will not do so.<p>
1359         This set of URI values is matched against the SAML <span class="fixed">
1360         Audience</span> fields of assertions received from HS&#39;s and AA&#39;s. One of 
1361         the URI&#39;s specified by the origin in the <span class="fixed">
1362         edu.internet2.middleware.shibboleth.audiences</span> property must match 
1363         one of these URIs or the assertion will not be accepted by design.</dd>
1364     </dl>
1365 </blockquote>
1366 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1367 <blockquote>
1368     <p>Shibboleth supports the dynamic generation of information in error pages 
1369     referenced by <span class="fixed">shibboleth.ini</span>. The Shib Target 
1370     employs a special Markup Language Processor to insert special tags into the 
1371     generated HTML. The parser will read the error file looking for any tag that 
1372     looks like:</p>
1373     <blockquote>
1374         <p><span class="fixed">&lt;shibmlp tag-name /&gt;</span> </p>
1375     </blockquote>
1376     <p>Shibboleth will replace <span class="fixed">tag-name</span> with the 
1377     appropriate markup tag from the table below:</p>
1378     <dl>
1379         <dd class="attribute"><span class="fixed">supportContact</span></dd>
1380         <dd class="value">The value of the <span class="fixed">supportContact</span> 
1381         for this web site.</dd>
1382         <dd class="attribute"><span class="fixed">logoLocation</span></dd>
1383         <dd class="value">The value of the <span class="fixed">logoLocation</span> 
1384         for this web site. This is used to fill in the template error page only; 
1385         if a custom error page is created, then the image may be linked to 
1386         statically by the page itself.</dd>
1387         <dd class="attribute"><span class="fixed">requestURL</span></dd>
1388         <dd class="value">The user&#39;s requested URL.</dd>
1389         <dd class="attribute"><span class="fixed">errorType</span></dd>
1390         <dd class="value">The type of error.</dd>
1391         <dd class="attribute"><span class="fixed">errorText</span></dd>
1392         <dd class="value">The actual error message.</dd>
1393         <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1394         <dd class="value">A textual description of the error intended for human 
1395         consumption.</dd>
1396         <dd class="attribute"><span class="fixed">originContactName</span></dd>
1397         <dd class="value">The contact name for the origin site provided by that 
1398         site&#39;s metadata.</dd>
1399         <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1400         <dd class="value">The contact email address for the origin site provided 
1401         by that site&#39;s metadata.</dd>
1402         <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1403         <dd class="value">The URL of an error handling page for the origin site 
1404         provided by that site&#39;s metadata.</dd>
1405     </dl>
1406     <p>This configuration is only for Apache servers, and is only used by 
1407     resources protected by Shibboleth. See <a href="#4.d.">section 4.d.</a></p>
1408     <p>Sample error templates for different kinds of errors are included in the 
1409     Shibboleth distribution, and can be triggered by anything that will cause 
1410     Shibboleth to be unable to make an authorization decision, including a bad 
1411     sites file, certificate verification failures, or a skewed clock between 
1412     sites.</p>
1413     <p><b>You should edit these templates, provide or remove style sheets and 
1414     images, and otherwise customize these templates to suit the user experience 
1415     you want your users to have when errors occur. The defaults are not likely 
1416     to meet the needs of any site.</b></p>
1417 </blockquote>
1418 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1419 <blockquote>
1420     <p>The only target component that must have a private key and certificate is 
1421     the SHAR. While the target server itself should support SSL in most cases 
1422     for users, it is mandatory for the SHAR to authenticate when contacting an 
1423     AA, and it must therefore be given a key and an SSL client certificate. It 
1424     is permissible for the SHAR to use the same keypair and certificate used by 
1425     the target server itself, provided the certificate is signed by a CA 
1426     accepted by the community of sites.</p>
1427     <p>The certificate and key file location should be based on whether they 
1428     will also be used for Apache. If they will be used as a server certificate 
1429     as well, they should probably be in the Apache tree in the usual
1430     <span class="fixed">mod_ssl</span>-defined locations inside the Apache 
1431     configuration folder., and the SHAR can read them from there. If the SHAR is 
1432     not running as <span class="fixed">root</span>, permissions might need to be 
1433     changed to allow this access. If the certificate and key will only be used 
1434     for the SHAR, they can be put in the same folder with the
1435     <span class="fixed">shibboleth.ini</span> file and protected appropriately.</p>
1436     <p>Other web servers like IIS do not use the raw PEM format that Apache and 
1437     Shibboleth can share, and therefore the components must generally use 
1438     separate copies of the key and certificate if they are to be shared. Most 
1439     other servers can export and/or import keys to and from PEM format or other 
1440     formats that OpenSSL can convert.</p>
1441     <p>The SHAR is assigned a key and a certificate using shibboleth.ini&#39;s
1442     <span class="fixed">certFile</span>, <span class="fixed">keyFile</span> and
1443     <span class="fixed">keyPass</span> settings, described in <a href="#4.a.">
1444     section 4.a.</a> These files must currently be in PEM format. OpenSSL 
1445     commands to generate a new keypair and a certificate request are shown here, 
1446     assuming 2048 bit RSA keys are to be used:</p>
1447     <blockquote>
1448         <p><span class="fixed">$ openssl genrsa -des3 -out ssl.key 2048<br>
1449         $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1450     </blockquote>
1451     <p>The signed certificate file returned by the CA should be usable directly, 
1452     or can be converted to PEM format using the <span class="fixed">openssl x509</span> 
1453     command.</p>
1454     <p>If the key is to be shared with Apache, the web server&#39;s child processes, 
1455     often running as <span class="fixed">nobody</span>, must be able to read 
1456     them while the server is running, which may require permission changes.</p>
1457     <p>This particularly applies when sharing the key and certificate used by 
1458     mod_ssl, which are only readable by root by default. The password, if any, 
1459     must be placed in the <span class="fixed">shibboleth.ini</span> file, since 
1460     the Apache module cannot prompt for it during initial startup as mod_ssl 
1461     can. The issues surrounding how to securely obtain a key while running as
1462     <span class="fixed">nobody</span> may be addressed in a later release. Since 
1463     the password will be stored in clear text in a frequently examined file, it 
1464     is suggested to use a password not used elsewhere.</p>
1465     <p>Finally, the <span class="fixed">calist</span> command provides the SHAR 
1466     with a set of CA roots to trust when validating AA server certificates. In 
1467     all cases, the SHAR verifies that the certificate&#39;s Subject CN equals the 
1468     AA&#39;s hostname, but the CA list restricts the accepted signers to those 
1469     permitted by the SHAR. The parameter can be omitted to skip such validation, 
1470     but this is not secure.</p>
1471 </blockquote>
1472 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1473 <blockquote>
1474     <p>Protection of web pages is primarily achieved through &quot;mapping&quot; 
1475     attributes provided by an AA to a localized vocabulary for authorization 
1476     rules. This was formerly accomplished in Apache with the <span class="fixed">
1477     ShibMapAttribute</span> command, but this has been replaced with additional 
1478     features in the AAP syntax, described in <a href="#4.e.">section 4.e.</a> 
1479     This applies to both Apache and IIS.</p>
1480     <p><b><u>IIS</u></b></p>
1481     <p>The IIS RM module supports the mapping of attributes via AAP files, but 
1482     it does not support rule-based policies and therefore cannot protect static 
1483     content at this time. In addition, all of the configuration settings are 
1484     managed globally or per-site and are pulled from the <span class="fixed">
1485     shibboleth.ini</span> file, so there are no additional commands to document 
1486     at this time.<br>
1487     </p>
1488     <p><b><u>Apache</u></b></p>
1489     <p>The Apache RM module provided can interpret AAP settings to map 
1490     attributes to HTTP request headers and to <span class="fixed">Require</span> 
1491     rules, permitting protecting of both static and dynamic content. The 
1492     commands described here can appear in content-specific configuration blocks 
1493     or <span class="fixed">.htaccess</span> files. They determine what content 
1494     is to be protected, session policies, and static access control rules.</p>
1495     <p>Any of the typical ways of protecting content may be used (.htaccess, 
1496     Directory, Location, Files, etc.). There are two ways to trigger Shibboleth 
1497     authentication: specifying an <span class="fixed">AuthType</span> of
1498     <span class="fixed">shibboleth</span> to use Shibboleth directly, or using
1499     <span class="fixed">ShibBasicHijack</span> to process existing .htaccess 
1500     files using Shibboleth instead. Support for authorization consists of 
1501     mod_auth-style require directives, as well as support for mod_auth group 
1502     files.</p>
1503     <p>A complete list of the directives and their values is below:</p>
1504     <dl>
1505         <dd class="attribute"><span class="fixed">AuthType &lt;string&gt;</span></dd>
1506         <dd class="value">Use <span class="fixed">shibboleth</span> for direct 
1507         invocation, or <span class="fixed">Basic</span> plus the
1508         <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1509         <dd class="attribute"><span class="fixed">ShibSSLOnly &lt;on/off&gt;</span></dd>
1510         <dd class="value">Controls whether Shibboleth will reject non-SSL 
1511         requests for resources from clients. Defaults to <span class="fixed">off</span>.</dd>
1512         <dd class="attribute"><span class="fixed">ShibBasicHijack &lt;on/off&gt;</span></dd>
1513         <dd class="value">Controls whether Shibboleth should or should not 
1514         ignore requests with <span class="fixed">AuthType Basic</span>. Defaults 
1515         to <span class="fixed">off</span>.</dd>
1516         <dd class="attribute"><span class="fixed">ShibExportAssertion &lt;on/off&gt;</span></dd>
1517         <dd class="value">Controls whether the SAML attribute assertion provided 
1518         by the AA is exported in a base64-encoded HTTP header,
1519         <span class="fixed">Shib-Attributes</span>. Defaults to
1520         <span class="fixed">off</span>. While this does require parsing the raw 
1521         XML, it also permits an application to see attributes that may have been 
1522         filtered by an AAP, or to forward the SAML assertion to a third party.</dd>
1523         <dd class="attribute"><span class="fixed">ShibAuthLifetime &lt;seconds&gt;</span></dd>
1524         <dd class="value">If set, sessions are always terminated after the 
1525         specified number of seconds, resulting in a new redirect and request for 
1526         authentication, just as if a new request without a session is received. 
1527         Defaults to infinite.</dd>
1528         <dd class="attribute"><span class="fixed">ShibAuthTimeout &lt;seconds&gt;</span></dd>
1529         <dd class="value">If set, sessions are always terminated after the 
1530         specified number of seconds of inactivity (defined as no requests 
1531         received in that session), resulting in a new redirect and request for 
1532         authentication, just as if a new request without a session is received. 
1533         Defaults to infinite.</dd>
1534         <dd class="attribute"><span class="fixed">AuthGroupFile &lt;pathname&gt;</span></dd>
1535         <dd class="value">Same as mod_auth; collects values found in REMOTE_USER 
1536         into a named group for access control. An attribute must be mapped to 
1537         REMOTE_USER for this to work. Note that mod_auth will not support group 
1538         files when mod_shibrm is loaded, since they share the same command.
1539         <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is 
1540         implemented</a> by placing a <span class="fixed">.htaccess</span> file 
1541         that references a group file stored at <span class="fixed">/pathname</span>:</p>
1542         <blockquote>
1543             <p><span class="fixed">AuthGroupFile /pathname<br>
1544             require group workgroup</span></p>
1545         </blockquote>
1546         <p>An
1547         <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1548         AuthGroupFile</a> used by Shibboleth might resemble:<br>
1549         <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1550         </dd>
1551         <dd class="attribute"><span class="fixed">Require &lt;string&gt;</span></dd>
1552         <dd class="value">Enforce authorization using one of the following 
1553         methods.<ul type="circle">
1554             <li><span class="fixed">valid-user</span><blockquote>
1555                 <p>Any Shibboleth user from a trusted origin site is accepted, 
1556                 even if no actual attributes are received. This is a very 
1557                 minimal kind of policy, but is useful for testing or for 
1558                 deferring real policy to an application.</p>
1559             </blockquote>
1560             </li>
1561             <p><span class="fixed">user</span></p>
1562             <blockquote>
1563                 <p>A space-delimited list of values, such as from the
1564                 <span class="fixed">
1565                 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> 
1566                 attribute. Actually, any attribute can be mapped to REMOTE_USER, 
1567                 even if this doesn&#39;t always make sense.</p>
1568             </blockquote>
1569             </li>
1570             <li><span class="fixed">group</span><blockquote>
1571                 <p>A space-delimited list of group names defined within
1572                 <span class="fixed">AuthGroupFile</span> files, again provided 
1573                 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1574             </blockquote>
1575             </li>
1576             <li><span class="fixed">&lt;alias&gt;</span><blockquote>
1577                 <p>An arbitrary rule name that matches an Alias defined in an 
1578                 AAP file. The rule value is a space-delimited list of attribute 
1579                 values, whose format depends on the attribute in question (e.g. 
1580                 an affiliation rule might look like:</p>
1581                 <p><span class="fixed">require affiliation staff@osu.edu 
1582                 faculty@mit.edu</span></p>
1583             </blockquote>
1584             </li>
1585         </ul>
1586         <p>Additionally, for <span class="fixed">user</span> and
1587         <span class="fixed">&lt;alias&gt;</span>-based rules, if a tilde character is 
1588         placed immediately following <span class="fixed">user</span> or
1589         <span class="fixed">&lt;alias&gt;</span>, the expressions that follow are 
1590         treated as regular expressions. The syntax supported is generally based 
1591         on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1592         XML Schema</a>. This specification borders on unreadable, but the syntax 
1593         is generally Perl-like. Expressions should generally be &quot;anchored&quot; with 
1594         the ^ and $ symbols to insure mid-string matches don&#39;t cause false 
1595         positives.</p>
1596         <p>For example, the rule:<br>
1597 &nbsp;&nbsp;&nbsp; <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1598         </span>would evaluate to allowing anyone with an <span class="fixed">
1599         affiliation</span> of <span class="fixed">member</span> from a .edu 
1600         domain.</dd>
1601     </dl>
1602 </blockquote>
1603 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1604 <blockquote>
1605     <p>Shibboleth allows a user and a site to release a varying set of 
1606     attributes to a destination site, and does not impose restrictions on the 
1607     kinds of attribute information provided by an AA. Target implementations 
1608     must be prepared to examine the attributes they receive and filter them 
1609     based on policies about what information to permit an origin site to assert 
1610     about its users.</p>
1611     <p>Attribute acceptance is the process of defining acceptable attributes and 
1612     filtering attribute values before passing them on to a resource manager, 
1613     such as the <span class="fixed">mod_shibrm</span> module. Data blocked by 
1614     AAP filters will not be passed to the CGI environment or used when enforcing
1615     <span class="fixed">.htaccess</span> rules. Note that the attribute 
1616     assertion exported to the <span class="fixed">Shib-Attributes</span> header 
1617     is unfiltered.</p>
1618     <p>The Shibboleth implementation supports Scoped and Simple attributes and 
1619     filtering policies for different kinds of attributes, and is potentially 
1620     extensible to more complex attributes in the future. An attribute is 
1621     considered Scoped if the XML representation of its values contains a &quot;Scope&quot; 
1622     attribute. As of 1.0.1, this is detected at runtime and requires no 
1623     configuration work.</p>
1624     <p><b>An essential part of the Shibboleth trust fabric is ensuring that 
1625     sites only assert attributes for domains for which they are considered 
1626     authoritative by the target. Typically, this means that Brown University 
1627     will be trusted to assert attributes only scoped to <span class="fixed">
1628     brown.edu</span>. Unless there are very specific circumstances requiring 
1629     this restriction be removed, it is strongly encouraged that such policies be 
1630     in place.</b></p>
1631     <h4>Scoped:</h4>
1632     <blockquote>
1633         <p>Scoped attributes are a special kind of attribute whose values are a 
1634         combination of a <span class="fixed">value</span> and a
1635         <span class="fixed">scope</span>, or <span class="fixed">context</span> 
1636         for the value. An example is <span class="fixed">
1637         eduPersonScopedAffiliation</span>, which adds a scope to the defined set 
1638         of <span class="fixed">eduPersonAffiliation</span> values, such as
1639         <span class="fixed">student</span>, <span class="fixed">member</span>, 
1640         or <span class="fixed">faculty</span>. Scopes are expressed as DNS 
1641         domains and subdomains.</p>
1642         <p>Any <span class="fixed">scoped</span> attribute can be scoped only to 
1643         the origin site&#39;s permitted domains. These domains are listed in the 
1644         site metadata that provides policy information to the system. Domains 
1645         can be explicit or regular expressions, and can be changed by a target 
1646         to meet its needs. Thus, attribute acceptance processing for
1647         <span class="fixed">scoped</span> attributes is based on site metadata, 
1648         in addition to the mechanism described below for <span class="fixed">
1649         simple</span> attributes.</p>
1650     </blockquote>
1651     <h4>Simple:</h4>
1652     <blockquote>
1653         <p>Simple attributes are attributes whose value is expressed in XML as a 
1654         Text node; that is, the value is just a string. Multiple values are 
1655         permitted. <span class="fixed">eduPersonEntitlement</span>, in which the 
1656         values are URIs, is one example of a simple attribute.</p>
1657         <p>Both Simple and Scoped attribute acceptance is controlled with an 
1658         external policy file written in XML. The schema for the file is 
1659         described by the <span class="fixed">shibboleth.xsd</span> schema, and 
1660         an example file is included, <span class="fixed">AAP.xml</span>. It is 
1661         mandatory to supply such a file, because attributes are recognized based 
1662         on their presence in this file, and not by separate configuration 
1663         processes. Only by listing an attribute in the file will it be accepted 
1664         and processed by the RM.</p>
1665         <p>The policy is a default-deny algorithm that requires permissible 
1666         attributes and values be listed explicitly. That is, an empty file 
1667         permits nothing. Each attribute to be supported must be listed in the 
1668         file by name in an <span class="fixed">&lt;AttributeRule&gt;</span>. Each such 
1669         rule is a collection of <span class="fixed">&lt;SiteRule&gt;</span> elements 
1670         along with an optional <span class="fixed">&lt;AnySite&gt;</span> default 
1671         rule. In turn each site rule is a set of <span class="fixed">&lt;Value&gt;</span> 
1672         rules that specify matches to permit, either literal or regular 
1673         expressions, or a wildcarded <span class="fixed">&lt;AnyValue&gt;</span> 
1674         default rule, which is equivalent to a single regular expression rule 
1675         allowing anything.</p>
1676     </blockquote>
1677     <p>A syntax summary follows:</p>
1678     <blockquote>
1679         <p><span class="fixed">&lt;AttributeAcceptancePolicy</span></p>
1680         <blockquote>
1681             <p>The top level element in the file.</p>
1682         </blockquote>
1683         <p><span class="fixed">&lt;AttributeRule<br>
1684 &nbsp;&nbsp;&nbsp; Name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;<br>
1685 &nbsp;&nbsp;&nbsp; Header=&quot;Shib-EP-Affiliation&quot; Alias=&quot;affiliation&quot;&gt;</span></p>
1686         <blockquote>
1687             <p>Specifies a rule for an attribute, named by its URI. The 
1688             following XML attributes can be supplied:</p>
1689             <table border="1" cellpadding="5" cellspacing="5">
1690                 <tr>
1691                     <td><span class="fixed">Name</span></td>
1692                     <td>The name of the Shibboleth attribute, usually a URI. 
1693                     This is the only required XML attribute.</td>
1694                 </tr>
1695                 <tr>
1696                     <td><span class="fixed">Namespace</span></td>
1697                     <td>If the attribute&#39;s name includes a SAML namespace, 
1698                     supply it here. Normally this is unused.</td>
1699                 </tr>
1700                 <tr>
1701                     <td><span class="fixed">Header</span></td>
1702                     <td>The HTTP request header to map the attribute&#39;s values 
1703                     to.</td>
1704                 </tr>
1705                 <tr>
1706                     <td><span class="fixed">Alias</span></td>
1707                     <td>A short name for the attribute, determines the name of 
1708                     the Apache <span class="fixed">Requires</span> rule.</td>
1709                 </tr>
1710             </table>
1711         </blockquote>
1712         <p><span class="fixed">&lt;AnySite&gt;</span></p>
1713         <blockquote>
1714             <p>Specifies a rule that always applies to the attribute, regardless 
1715             of the asserting AA.</p>
1716         </blockquote>
1717         <p><span class="fixed">&lt;SiteRule Name=&quot;host.domain.com&quot;&gt;</span></p>
1718         <blockquote>
1719             <p>A rule that applies to the origin site AA corresponding to the 
1720             hostname.</p>
1721         </blockquote>
1722         <p><span class="fixed">&lt;AnyValue&gt;</span></p>
1723         <blockquote>
1724             <p>Specifies a rule that always applies to the attribute and site, 
1725             regardless of the value(s).</p>
1726         </blockquote>
1727         <p><span class="fixed">&lt;Value Type=&quot;type&quot;&gt;</span></p>
1728         <blockquote>
1729             <p>Specifies a value to permit, either directly using
1730             <span class="fixed">type</span> <span class="fixed">literal</span>, 
1731             or using a set of matching expressions as <span class="fixed">type</span>
1732             <span class="fixed">regexp</span>. <span class="fixed">literal</span> 
1733             is the default if <span class="fixed">Type</span> is not specified.</p>
1734         </blockquote>
1735     </blockquote>
1736     <p>The regular expression syntax is a subset of the usual Perl and Unix 
1737     syntaxes that is described in the XML Schema specification by the W3C. Most 
1738     typical expressions should work. Be sure to anchor them using
1739     <span class="fixed">^</span> and <span class="fixed">$</span> to avoid 
1740     unintentional matches midstring.</p>
1741 </blockquote>
1742 <h4><a name="4.f."></a>4.f. Using Attributes in Applications</h4>
1743 <blockquote>
1744     <p>Apart from the simple RM functionality provided, attribute information 
1745     may be made available directly to applications via the standard practice of 
1746     creating custom HTTP request headers before passing control to the 
1747     application. Applications should make no assumption about the presence of 
1748     specific attributes for their use unless they have intimate knowledge of the 
1749     attribute release policies in place.</p>
1750     <p>The AAP metadata controls this interface, and maps a Shibboleth attribute 
1751     to a header name, such as <span class="fixed">Shib-EP-Affiliation</span>. 
1752     Using that example, any values of the mapped attribute will be placed in 
1753     that header, delimited by semicolons. An application that uses a CGI-like 
1754     syntax to access the header will find the values in the <span class="fixed">
1755     HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any 
1756     header, to drive legacy applications that expect information in a particular 
1757     location.</p>
1758     <p>The <span class="fixed">REMOTE_USER</span> variable is a special case 
1759     that is generally populated automatically by the web server based on an 
1760     internal piece of data that represents the current <span class="fixed">
1761     username</span>. Unlike many authentication modules, Shibboleth does not 
1762     guarantee that <span class="fixed">REMOTE_USER</span> will have any value, 
1763     because users may remain anonymous in many cases. If it does have a value, 
1764     it is set solely because of an AAP file that maps an attribute to that 
1765     header name. For many purposes, the <span class="fixed">
1766     urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be 
1767     mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be 
1768     provided by the AA, and <span class="fixed">REMOTE_USER</span> might still 
1769     be empty.</p>
1770     <p>The <span class="fixed">Shib-Origin-Site</span> variable will contain the 
1771     unique name/identifier of the origin site of the user. Some applications may 
1772     use this to lookup additional policy or application data. It normally takes 
1773     the form of a URI but could be any string in some deployments.</p>
1774     <p>Finally, configuration may instruct the web server to place the entire 
1775     XML message containing the SAML attribute information from the AA into a 
1776     base64-encoded header called <span class="fixed">Shib-Attributes</span>. 
1777     This is a raw interface that provides an application with the entire AA 
1778     response, and is not a filtered view based on any attribute acceptance rules 
1779     or even based on what attributes are recognized by the target. What was sent 
1780     is what you see.</p>
1781 </blockquote>
1782 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
1783 <blockquote>
1784     <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span> 
1785     in the <span class="fixed">/opt/shibboleth/bin</span> folder of the 
1786     distribution to maintain metadata files referenced by <span class="fixed">
1787     shibboleth.ini</span>. It will return 0 on success and a negative number on 
1788     failure and log errors to <span class="fixed">stderr</span>. If the data in 
1789     the new metadata file is bad or the signature is invalid, the existing copy 
1790     is kept. The SHAR and SHIRE stat all metadata files each time the data is 
1791     used, allowing them to detect and utilize updates in real-time operation.</p>
1792     <p><span class="fixed">siterefresh</span> takes the following command-line 
1793     parameters:</p>
1794     <dl>
1795         <dd class="attribute"><span class="fixed">--url &lt;URL&gt;</span> </dd>
1796         <dd class="value">Specifies the <span class="fixed">URL</span> of the 
1797         remote metadata file with which to update the local file.</dd>
1798         <dd class="attribute"><span class="fixed">--out &lt;pathname&gt;</span> </dd>
1799         <dd class="value">Specifies the local file to which to write the new 
1800         metadata.</dd>
1801         <dd class="attributeopt"><span class="fixed">--cert &lt;pathname&gt;</span>
1802         </dd>
1803         <dd class="valueopt">Specifies the location of a certificate stored in
1804         <span class="fixed">PEM</span> format used to validate the signature of 
1805         the metadata file. Since much of Shibboleth&#39;s security flows from 
1806         metadata files, this option is highly recommended, and the certificate 
1807         used should be verified independently.</dd>
1808         <dd class="attributeopt"><span class="fixed">--schema &lt;pathname&gt;</span>
1809         </dd>
1810         <dd class="valueopt">Optionally defines a base path for schemas to use 
1811         when validating the file. Defaults to <span class="fixed">
1812         /opt/shibboleth/etc/shibboleth/</span>.</dd>
1813     </dl>
1814     <p>A complete command issued to <span class="fixed">siterefresh</span> might 
1815     take the form:</p>
1816     <blockquote>
1817         <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out sites.xml 
1818         --cert internet2.pem \<br>
1819         --url http://wayf.internet2.edu/InQueue/sites.xml </span></p>
1820     </blockquote>
1821     <p>It is recommended that similar commands be added to a <span class="fixed">
1822     crontab</span> to keep the site and trust files refreshed. AAP files tend to 
1823     be site-specific, but could be maintained and distributed centrally. If the 
1824     command is invoked in a script that writes the file to a new location and 
1825     compares it with the old contents before overwriting the original, the 
1826     command could be run very often without impacting target operations, 
1827     providing a high degree of currency in case sites become compromised.</p>
1828 </blockquote>
1829 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
1830 <blockquote>
1831     <p>Shibboleth includes a useful plugin that extends the default memory cache 
1832     for storing session data in the SHAR with a backing cache using an embedded 
1833     MySQL database. In most distributions, it is enabled by default. The plugin 
1834     can be found in the <span class="fixed">/opt/shibboleth/libexec</span> 
1835     folder, and is loaded as an extension library using the <span class="fixed">
1836     [extensions:saml]</span> section of <span class="fixed">shibboleth.ini</span>. 
1837     The following configuration options are available:</p>
1838     <dl>
1839         <dd class="attributeopt"><span class="fixed">mysql-cache-timeout = 
1840         &lt;seconds&gt;&nbsp;&nbsp;&nbsp; (in [shar] section)</span></dd>
1841         <dd class="valueopt">Specifies the duration in <span class="fixed">
1842         seconds</span> that must elapse between user accesses before that user&#39;s 
1843         session is purged from the persistent cache. Defaults to
1844         <span class="fixed">28800</span> seconds, or 8 hours. This should 
1845         generally be longer than the associated server&#39;s settings for session 
1846         lifetime and timeout, and the memory cache&#39;s timeout.</dd>
1847         <dd class="attributeopt"><span class="fixed">&lt;MySQL Arguments&gt;&nbsp;&nbsp;&nbsp; 
1848         (one per line in [mysql] section)</span></dd>
1849         <dd class="valueopt">To pass arguments to the MySQL engine, create 
1850         argument lines in the <span class="fixed">[mysql]</span> section in the 
1851         form:
1852         <blockquote class="fixed">
1853             <p>arg1=&lt;argument&gt;<br>
1854             arg2=&lt;argument&gt;<br>
1855             etc... </p>
1856         </blockquote>
1857         <p>Important arguments you&#39;ll find by default include: </p>
1858         <blockquote class="fixed">
1859             <p>arg1 = --language=/opt/shibboleth/share/english<br>
1860             arg2 = --datadir=/opt/shibboleth/data</p>
1861         </blockquote>
1862         <p>which set the message file path and the location of the cache&#39;s 
1863         database files respectively. Make sure the data directory exists before 
1864         starting the SHAR if you change this path.</dd>
1865     </dl>
1866 </blockquote>
1867 <p><br>
1868 </p>
1869 <hr>
1870 <h3><a name="5."></a>5. Troubleshooting</h3>
1871 <p>This section provides basic information about testing Shibboleth targets. 
1872 This information is not intended to be comprehensive, but instead rudimentary 
1873 guidelines for basic configuration tests and problems. For more detailed 
1874 information or answers to specific problems not addressed in this section, 
1875 please mail <a href="mailto:mace-shib-users@internet2.edu">
1876 mace-shib-users@internet2.edu</a> with a thorough description of errors and 
1877 configurations used.</p>
1878 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
1879 <blockquote>
1880     <p>The target may be tested by generating a folder with very basic access 
1881     controls on it, and accessing it using a web browser. Place a simple webpage 
1882     such as <span class="fixed">index.html</span> in <span class="fixed">
1883     /secure/</span>. Then, add the following lines to <span class="fixed">
1884     httpd.conf</span>, which should be removed when testing is over:</p>
1885     <blockquote>
1886         <p><span class="fixed"># Configure a test directory<br>
1887         &lt;Location /secure&gt;<br>
1888         &nbsp;&nbsp;AuthType shibboleth<br>
1889         &nbsp;&nbsp;require valid-user<br>
1890         <br>
1891         &nbsp;&nbsp;# Per-directory SHIRE Configuration<br>
1892         &nbsp;&nbsp;#ShibBasicHijack On<br>
1893         &nbsp;&nbsp;#ShibSSLOnly On<br>
1894         &nbsp;&nbsp;#ShibAuthLifetime 60<br>
1895         &nbsp;&nbsp;#ShibAuthTimeout 600<br>
1896         <br>
1897         &nbsp;&nbsp;# RM Configuration<br>
1898         &nbsp;&nbsp;#AuthGroupFile /foo<br>
1899         &nbsp;&nbsp;#ShibExportAssertion On<br>
1900         &lt;/Location&gt;<br>
1901         </span></p>
1902     </blockquote>
1903     <p><b>For information regarding specific error messages that may be 
1904     generated if the target does not work successfully, please refer to section
1905     <a href="#5.b.">5.b.</a>, or write
1906     <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.</b></p>
1907 </blockquote>
1908 <h4><a name="5.b."></a>5.b. Common Problems</h4>
1909 <blockquote>
1910     <p>A knowledge base is being developed in the
1911     <a href="http://www.columbia.edu/~wassa/shib.faq/shibboleth-faq.%20%20%20%20%20%20html">
1912     Shibboleth Deployer&#39;s FAQ</a>. Please mail
1913     <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@ 
1914     internet2.edu</a> with any additional questions or problems encountered that 
1915     are not answered by this basic guide.</p>
1916 </blockquote>
1917
1918 </body>
1919
1920 </html>