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