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