Updated some version numbers and an outdated path.
[shibboleth/sp.git] / doc / DEPLOY-GUIDE-ORIGIN.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 Origin 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 font-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 font-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 font-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 font-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 font-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 font-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 .fixedwidth
133 {
134 font-family: monospace;
135 font-size: 90%;
136 font-color: #121212;
137 }
138 .feature
139 {
140 color: #00FF00
141 }
142  </style>
143 </head>
144
145 <body link="red" vlink="red" alink="black" bgcolor="white">
146
147 <center>
148 <h2>Shibboleth Origin Deployment Guide</h2>
149 </center>
150 <p>Shibboleth Origin Deployment Guide<br>
151 Shibboleth Version 1.1<br>
152 July 28, 2003<br>
153 </p>
154 <h3>This version of the deploy guide is for Shibboleth v1.1. For documentation 
155 related to prior versions of Shibboleth, please consult the appropriate branch 
156 in the Shibboleth CVS.</h3>
157 <h3>Federations have been abstracted out from the Shibboleth documentation. For 
158 further information on using Shibboleth in a federation, refer to the federation 
159 guide.</h3>
160 <p>Shibboleth v1.1 is stable and secure enough to deploy in production 
161 scenarios. It is backward compatible with 1.0 in all respects, including 
162 configuration, but some older commands have been deprecated or replaced.</p>
163 <p>Features and changes specific to 1.1 are marked with <span class="feature">
164 [1.1]</span></p>
165 <h4>Major New Features in 1.0 and 1.1</h4>
166 <p>This new release contains several improvements and enhancements, including:
167 </p>
168 <h5>Federation Support</h5>
169 <ol>
170     <li>Federation and trust support has been substantially extended. Federation 
171     structures are now defined. The set of metadata collected and managed by 
172     each Federation is more fully defined. The configuration values assigned by 
173     a Federation are now identified. </li>
174     <li>There is some support for targets to be members of multiple federations; 
175     this support will continue to evolve. When a browser user arrives, a target 
176     will determine which federation their origin belongs to, and then use the 
177     trust fabric associated with that Federation.</li>
178     <li>Better support for flexible and bilateral trust agreements. A key 
179     specific to an origin site can be used to vallidate its signature.</li>
180     <li>This version contains a significantly more mature security 
181     implementation, and should meet the security requirements of typical sites.</li>
182 </ol>
183 <h5>Origin</h5>
184 <ol>
185     <li>The Attribute Authority has a powerful new attribute resolver. Simple 
186     scenarios (using a string attribute stored in ldap) can be accomplished by 
187     merely editing a configuration file. Java classes may still be written for 
188     more complex evaluations (eg retrieving information from multiple disparate 
189     repositories, and computing the SAML attribute using business rules). This 
190     should greatly simplify the process of configuring the AA to support 
191     additional general attributes.</li>
192     <li>A sample resolver file for using standard LDAP person and inetOrgPerson 
193     attributes is included. <span class="feature">[1.1]</span></li>
194     <li>Support for a runtime-derived per-requester persistent identifier 
195     attribute to support anonymous personalization by targets has been added via 
196     an attribute plugin. <span class="feature">[1.1]</span></li>
197     <li>Specialized sites without privacy needs can configure identity-based 
198     handles interoperable with other SAML deployments. <span class="feature">
199     [1.1]</span></li>
200 </ol>
201 <h5>Target</h5>
202 <ol>
203     <li>Significantly more flexibility in configuring targets is provided to 
204     ensure robustness. Failover and redundant configurations are now supported.</li>
205     <li>The SHAR may now optionally store its session and attribute cache in a 
206     back-end database in addition to the previously available in-memory option.
207     </li>
208 &nbsp;<span class="feature">[1.1]</span> </li>
209     <li>Federation supplied files (sites.xml and trust.xml) are now refreshed in 
210     a much more robust manner. </li>
211     </li>
212     <li>The SHAR can be configured to request specific attributes from the 
213     Origin. </li>
214     <li>The SHAR can use TCP sockets when responding to the Apache module, for 
215     specialized deployment behind firewalls. <span class="feature">[1.1]</span>
216     </li>
217     <li>Attribute acceptance policies have been greatly enhanced, and are now 
218     used to configure all aspects of attribute handling by the target, except 
219     for requesting specific attributes by sitename. Adding attributes now takes 
220     place in one configuration step. <span class="feature">[1.1]</span> </li>
221     <li>Support for Apache 1.3 on Windows NT/2000/XP/2003 has been added.
222     <span class="feature">[1.1]</span> </li>
223     <li>Microsoft IIS web server support has been added via an ISAPI filter and 
224     extension. <span class="feature">[1.1]</span> </li>
225 </ol>
226 <h5>Miscellaneous</h5>
227 <ol>
228     <li>Origin sites can configure a value to describe the type of 
229     authentication mechanism used at the origin site (e.g. password, Kerberos, 
230     PKI, etc.). This value is made available on the target side as Shib-Authentication-Method.
231     <br>
232     </li>
233     <li>Various improvements to error handling. Origin sites are now able to 
234     supply an &quot;error URL&quot; and contact information to a federation. When a target 
235     encounters an error, it can include this information in the error page. <br>
236     </li>
237     <li>Local time string values are now used in log files. <br>
238     </li>
239     <li>Internationalization support has been extended.</li>
240 </ol>
241 <p>Before starting, please sign up for all applicable
242 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing 
243 lists</a>. Announcements pertinent to Shibboleth deployments and developments 
244 and resources for deployment assistance can be found here.</p>
245 <p>Please send any questions, concerns, or eventual confusion to
246 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>. 
247 This should include, but not be limited to, questions about the documentation, 
248 undocumented problems, installation or operational issues, and anything else 
249 that arises. Please ensure that you have the
250 <a href="http://shibboleth.internet2.edu/release/shib-download.html">appropriate 
251 .tarball</a> for your operating system.</p>
252 <p><br>
253 </p>
254 <hr>
255 <p><br>
256 <br>
257 </p>
258 <h3><a name="TOC"></a>Shibboleth Origin -- Table of Contents</h3>
259 <p><br>
260 </p>
261 <ol type="1">
262     <li>
263     <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
264     <ol type="a">
265         <li><a href="#1.a."><font color="black">Origin</font></a></li>
266         <li><a href="#1.b."><font color="black">Target</font></a></li>
267         <li><a href="#1.c."><font color="black">WAYF</font></a></li>
268         <li><a href="#1.d."><font color="black">Federations</font></a></li>
269     </ol>
270     </li>
271     <li>
272     <h4><a href="#2."><font color="black">Planning</font></a></h4>
273     <ol type="a">
274         <li><a href="#2.a."><font color="black">Requirements</font></a></li>
275         <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
276         <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
277         <li><a href="#2.d."><font color="black">Server Certs</font></a></li>
278         <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
279         <li><a href="#2.f."><font color="black">Designate Contacts</font></a></li>
280         <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
281         <li><a href="#2.h."><font color="black">Clocks</font></a></li>
282         <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
283     </ol>
284     </li>
285     <li>
286     <h4><a href="#3."><font color="black">Installation</font></a></h4>
287     <ol type="a">
288         <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
289         <li><a href="#3.b."><font color="black">Deploy HS and AA</font></a></li>
290     </ol>
291     </li>
292     <li>
293     <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
294     <ol type="a">
295         <li><a href="#4.a."><font color="black">Basic Configuration</font></a>
296         <ol type="i">
297             <li><a href="#4.a.i"><font color="black">Modifying the default 
298             Attribute Resolver configuration</font></a></li>
299         </ol>
300         </li>
301         <li><a href="#4.b."><font color="black">Key Generation and Certificate 
302         Installation</font></a> </li>
303         <li><a href="#4.c."><font color="black">Linking the Authentication 
304         System to the HS</font></a>
305         <ol type="i">
306             <li><a href="#4.c.i."><font color="black">Enabling client 
307             certificate authentication</font> <font color="#5555EE">(optional)</font></a></li>
308         </ol>
309         </li>
310         <li><a href="#4.d."><font color="black">Establishing default ARP&#39;s for 
311         the origin community</font></a></li>
312     </ol>
313     </li>
314     <li>
315     <h4><a href="#5."><font color="black">Advanced Configuration</font></a></h4>
316     <ol type="a">
317         <li><a href="#5.a."><font color="black"><span class="fixedwidth">
318         origin.properties</span></font></a></li>
319         <li><a href="#5.b."><font color="black">ARP Overview</font></a>
320         <ol type="i">
321             <li><a href="#5.b.i."><font color="black">ARP Processing</font></a></li>
322             <li><a href="#5.b.ii."><font color="black">ARP Syntax</font></a></li>
323         </ol>
324         </li>
325         <li><a href="#5.c."><font color="black">Sharing certificate/key pairs 
326         between Apache and Java keystores</font> <font color="#5555EE">
327         (optional)</font></a></li>
328         <li><a href="#5.d."><font color="black">The Attribute Resolver</font></a>
329         <ol type="i">
330             <li><a href="#5.d.i."><font color="black"><span class="fixedwidth">
331             resolvertest</span></font></a></li>
332         </ol>
333         </li>
334         <li><a href="#5.e."><font color="black">Local Error Page</font></a></li>
335     </ol>
336     </li>
337     <li>
338     <h4><a href="#6."><font color="black">Troubleshooting</font></a></h4>
339     <ol type="a">
340         <li><a href="#6.a."><font color="black">Basic Testing</font></a></li>
341         <li><a href="#6.b."><font color="black">Logging</font></a></li>
342         <li><a href="#6.c."><font color="black">Common Problems</font></a></li>
343     </ol>
344     </li>
345 </ol>
346 <p><br>
347 </p>
348 <hr>
349 <p><br>
350 </p>
351 <h3><a name="1."></a>1. Shibboleth Overview</h3>
352 <p>Shibboleth is a system designed to exchange attributes across realms for the 
353 primary purpose of authorization. It provides a secure framework for one 
354 organization to transmit attributes about a web-browsing individual across 
355 security domains to another institution. In the primary usage case, when a user 
356 attempts to access a resource at a remote domain, the user&#39;s own home security 
357 domain can send certain information about that user to the target site in a 
358 trusted exchange. These attributes can then be used by the resource to help 
359 determine whether to grant the user access to the resource. The user may have 
360 the ability to decide whether to release specific attributes to certain sites by 
361 specifying personal Attribute Release Policies (ARP&#39;s), effectively preserving 
362 privacy while still granting access based on trusted information.</p>
363 <p>When a user first tries to access a resource protected by Shibboleth, they 
364 are redirected to a service which asks the user to specify the organization from 
365 which they want to authenticate. If the user has not yet locally authenticated 
366 to a WebISO service, the user will then be redirected to their home 
367 institution&#39;s authentication system. After the user authenticates, the 
368 Shibboleth components at the local institution will generate a temporary 
369 reference to the user, known as a handle, for the individual and send this to 
370 the target site. The target site can then use the handle to ask for attributes 
371 about this individual. Based on these attributes, the target can decide whether 
372 or not to grant access to the resource. The user may then be allowed to access 
373 the requested materials.</p>
374 <p>There are several controls on privacy in Shibboleth, and mechanisms are 
375 provided to allow users to determine exactly which information about them is 
376 released. A user&#39;s actual identity isn&#39;t necessary for many access control 
377 decisions, so privacy often is needlessly compromised. Instead, the resource 
378 often utilizes other attributes such as faculty member or member of a certain 
379 class. While these are commonly determined using the identity of the user, 
380 Shibboleth provides a way to mutually refer to the same principal without 
381 revealing that principal&#39;s identity. Because the user is initially known to the 
382 target site only by a randomly generated temporary handle, if sufficient, the 
383 target site might know no more about the user than that the user is a member of 
384 the origin organization. This handle should never be used to decide whether or 
385 not to grant access, and is intended only as a temporary reference for 
386 requesting attributes.</p>
387 <h4><a name="1.a."></a>1.a. Origin</h4>
388 <blockquote>
389     <p>There are four primary components to the origin side in Shibboleth: the 
390     Attribute Authority (AA), the Handle Service (HS), the directory service, 
391     and the local sign-on system (SSO). The AA and HS are provided with 
392     Shibboleth, and an open-source WebISO solution, Pubcookie, can be obtained 
393     from www.pubcookie.org; the directory is provided by the origin site. 
394     Shibboleth is able to interface with a directory exporting an LDAP interface 
395     containing user attributes, and is designed such that programming interfaces 
396     to other repositories should be readily implemented. Shibboleth relies on 
397     standard web server mechanisms to trigger local authentication. A .htaccess 
398     file can be easily used to trigger either the local WebISO system or the web 
399     server&#39;s own Basic Auth mechanism, which will likely utilize an enterprise 
400     authentication system, such as Kerberos.</p>
401     <p>From the origin site&#39;s point of view, the first contact will be the 
402     redirection of a user to the handle service, which will then consult the SSO 
403     system to determine whether the user has already been authenticated. If not, 
404     then the browser user will be asked to authenticate, and then sent back to 
405     the target URL with a handle bundled in an attribute assertion. Next, a 
406     request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA 
407     which will include the previously mentioned handle. The AA then consults the 
408     ARP&#39;s for the directory entry corresponding to the handle, queries the 
409     directory for these attributes, and releases to the SHAR all attributes the 
410     SHAR is entitled to know about that user.</p>
411 </blockquote>
412 <h4><a name="1.b."></a>1.b. Target</h4>
413 <blockquote>
414     <p>There are three primary components to the target side in Shibboleth: the 
415     Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute 
416     Requester (SHAR), and the resource manager (RM). An implementation of each 
417     of these is included in the standard Shibboleth distribution. These 
418     components are intended to run on the same web server.</p>
419     <p>From the target&#39;s point of view, a browser will hit the RM with a request 
420     for a Shibboleth-protected resource. The RM then allows the SHIRE to step 
421     in, which will use the WAYF to acquire the name of a handle service to ask 
422     about the user. The handle service (HS) will then reply with a SAML 
423     authentication assertion containing a handle, which the SHIRE then hands off 
424     to the SHAR. The SHAR uses the handle and the supplied address of the 
425     corresponding attribute authority (AA) to request all attributes it is 
426     allowed to know about the handle. The SHAR performs some basic validation 
427     and analysis based on attribute acceptance policies (AAP&#39;s). These 
428     attributes are then handed off to the RM, which is responsible for using 
429     these attributes to decide whether to grant access.</p>
430 </blockquote>
431 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
432 <blockquote>
433     <p>The WAYF service can be either outsourced and operated by a federation or 
434     deployed as part of the SHIRE. It is responsible for allowing a user to 
435     associate themself with an institution of their specification, then 
436     redirecting the user to the known address for the handle service of that 
437     institution.</p>
438 </blockquote>
439 <h4><a name="1.d."></a>1.d. Federations</h4>
440 <blockquote>
441     <p>A Shibboleth federation provides part of the underlying trust required 
442     for function of the Shibboleth architecture. A federation is a group of 
443     organizations(universities, corporations, content providers, etc.) who agree 
444     to exchange attributes using the SAML/Shibboleth protocols and abide by a 
445     common set of policies and practices. In so doing, they must implicitly or 
446     explicitly agree to a common set of guidelines. Joining a federation is not 
447     explicitly necessary for operation of Shibboleth, but it dramatically 
448     expands the number of targets and origins that can interact without defining 
449     bilateral agreements between all these parties.</p>
450     <p>A federation can be created in a variety of formats and trust models, but 
451     must provide a certain set of services to federation members. It needs to 
452     supply a registry to process applications to the federation and distribute 
453     membership information to the origin and target sites. This must include 
454     distribution of the PKI components necessary for trust between origins and 
455     targets. There also needs to be a set of agreements and best practices 
456     defined by the federation governing the exchange, use, and population of 
457     attributes before and after transit, and there should be a way to find 
458     information on local authentication and authorization practices for 
459     federation members.</p>
460 </blockquote>
461 <p><br>
462 <br>
463 <br>
464 </p>
465 <hr>
466 <p><br>
467 </p>
468 <h3><a name="2."></a>2. Planning</h3>
469 <p>There are several essential elements that must be present in the environment 
470 to ensure Shibboleth functions well, both political and technical. Shibboleth is 
471 entirely written in Java on the origin side. These are the recommendations and 
472 requirements for a successful implementation of a Shibboleth origin.</p>
473 <h4><a name="2.a."></a>2.a. Requirements</h4>
474 <ul>
475     <li>A common institutional directory service should be operational; 
476     Shibboleth comes with LDAP capabilities built in, and the Attribute 
477     Authority has a Java API which will allow specification of interfaces with 
478     legacy directories. This is discussed further in <a href="#4.d.">section 4.d</a>.</li>
479     <li>A method to authenticate browser users must be in place, preferably in 
480     the form of an enterprise authentication service. Some form of an SSO or a 
481     WebISO service is not explicitly necessary for Shibboleth; however, it is 
482     highly recommended. Implementation details of this are discussed in
483     <a href="#4.c.">section 4.c</a>.</li>
484     <li>Shibboleth is known to work on Linux and Solaris, but should function on 
485     any platform that has a Tomcat implementation.</li>
486     <li>It is recommended that a web server must be deployed that can host Java 
487     servlets and Tomcat, although not explicitly necessary, as Tomcat can still 
488     host an origin without it.</li>
489 </ul>
490 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
491 <blockquote>
492     <p>While it is not necessary for a target or origin to join a federation, 
493     doing so greatly facilitates the implementation of multilateral trust 
494     relationships. Each federation will have a different application process. 
495     When an origin is accepted into a federation, its information is added to 
496     the sites file used by the WAYF and target sites.</p>
497     <p><b>It may be necessary to join multiple federations depending on the 
498     sites with whom you wish to exchange attributes and the terms under which 
499     these interactions will take place. An origin site exists within the context 
500     of a single federation, while a single target may accept assertions issued 
501     by multiple federations if they are all recognized by the SHAR. If an 
502     organization wishes to be a member of multiple federations, it must run a 
503     separate origin site for each federation, including a separate AA and HS.</b></p>
504     <p>Attribute release and acceptance policies, the use and caching of 
505     attributes, and definition of commonly traded attributes are examples of 
506     specifications a federation may make. For more information on federations, 
507     please refer to the Deployer&#39;s Guide to Federations and the Shibboleth v1.0 
508     architectural document.</p>
509 </blockquote>
510 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
511 <blockquote>
512     <p>Shibboleth&#39;s protocols and software have been extensively engineered to 
513     provide protection against many attacks. However, the most secure protocol 
514     can be compromised if it is placed in an insecure environment. To ensure 
515     Shibboleth is as secure as possible, there are several recommended security 
516     precautions which should be in place at local sites.</p>
517     <ol type="i">
518         <li>SSL use is optional for origin sites. Federation guidelines should 
519         be considered when determining whether to implement SSL, and, in 
520         general, SSL should be used for interactions with client machines to 
521         provide the necessary authentication and encryption to ensure protection 
522         from man-in-the-middle attacks. It is strongly suggested that all 
523         password traffic or similarly sensitive data should be SSL-protected. 
524         Assessment of the risk tradeoff against possible performance degradation 
525         should be performed for all applications.</li>
526         <li>Many other attacks can be made on the several redirection steps that 
527         Shibboleth takes to complete attribute transfer. The best protection 
528         against this is safeguarding the WAYF service and ensuring that rogue 
529         targets and origins are not used, generally by development of the trust 
530         model underneath Shibboleth. Shibboleth also leverages DNS for security, 
531         which is not uncommon, but attacks concerning bad domain information 
532         should be considered.</li>
533         <li>Information regarding origin users is generally provided by the 
534         authoritative enterprise directory, and the acceptance of requests from 
535         target applications can be carefully restricted to ensure that all 
536         requests the SHAR performs are authorized and all information the origin 
537         provides is accurate. Proper security measures should also be in place 
538         on directory access and population(see
539         <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/#AccessControl">
540         Access Control</a> in the
541         <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/">LDAP 
542         recipe</a> for more information). Use of plaintext passwords is strongly 
543         advised against.</li>
544         <li>Server platforms should be properly secured, commensurate with the 
545         level that would be expected for a campus&#39; other security services, and 
546         cookie stores on client machines should be well protected.</li>
547     </ol>
548 </blockquote>
549 <h4><a name="2.d."></a>2.d. Server Certs</h4>
550 <blockquote>
551     <p>In the Shibboleth architecture, the SHIRE, SHAR, HS, and AA must all have 
552     various client and/or server certificates for use in signing assertions and 
553     creating SSL channels. These should be issued by a commonly accepted CA, 
554     which may be stipulated by some Federation rules. Different federations may 
555     require the use of different CA&#39;s.</p>
556 </blockquote>
557 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
558 <blockquote>
559     <p>The Attribute Authority maintains a set of policies called Attribute 
560     Release Policies (or ARP&#39;s) that govern the sharing of user attributes with 
561     Shibboleth target sites. When a user attempts to access a 
562     Shibboleth-protected resource, that resource&#39;s SHAR queries the user&#39;s AA 
563     for all attributes to which it is entitled. The SHAR provides its own name 
564     and the URL of the resource on behalf of which it is making the request. The 
565     AA finds the attributes associated with the browser user, determines an 
566     &quot;Effective ARP&quot; for this user, and then sends to the SHAR only the 
567     attributes/values allowed in this policy.</p>
568     <p>An ARP may be thought of as a sort of filter for outbound attributes; it 
569     cannot create attributes or data that aren&#39;t originally present, but it can 
570     limit the attributes released and the values those attributes may have when 
571     released. It does not change the information in the data sources in any way.</p>
572     <p>Each ARP is comprised of one or more rules that specify which attributes 
573     and values may be released to a target or set of targets. The assignment of 
574     rules to various targets is quite flexible and includes mechanisms for 
575     specifying: that a rule should affect all targets (default rule), exact SHAR 
576     names for which a rule is applicable, regular expressions against which SHAR 
577     names should be matched to determine if a rule is applicable, URL trees for 
578     which a rule is applicable.</p>
579     <p>For each request, an Effective ARP is determined by locating all ARP&#39;s 
580     applicable to the designated user and extracting each rule that matches the 
581     querying SHAR and resource. Attributes and values that are specified for 
582     release are included in the effective ARP, while those specified for denial 
583     are blocked from release. See section <a href="#5.b.i.">5.b.i</a> for 
584     details on how ARP&#39;s are processed.</p>
585     <p>Various ARP&#39;s may be combined in forming the Effective ARP. For instance, 
586     the Site ARP is administratively maintained and applies to all users for 
587     which the AA is answerable. User ARP&#39;s apply to a specific user only, and 
588     can be maintained either administratively or by the users themselves. All 
589     ARP&#39;s are specified using the same syntax and semantics.</p>
590 </blockquote>
591 <h4><a name="2.f."></a>2.f. Designate Contacts</h4>
592 <blockquote>
593     <p>Since Shibboleth deals both with daily technical and operational issues 
594     and also with contractual issues, a set of contacts should be set up to 
595     support the user base and to facilitate interactions with other Shibboleth 
596     sites and federation members. It is recommended that at least technical and 
597     administrative contacts be designated.</p>
598 </blockquote>
599 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
600 <blockquote>
601     <p>A primary Shibboleth design consideration was to require very little or 
602     no modification to client machines. The only requirement is that a browser 
603     is used which supports cookies, redirection and SSL. Browser users will have 
604     to perform an additional click to submit the authentication assertion if 
605     JavaScript is not functional.</p>
606 </blockquote>
607 <h4><a name="2.h."></a>2.h. Clocks</h4>
608 <blockquote>
609     <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should be run on all 
610     web servers. Shibboleth employs a short handle issuance time to protect 
611     against replay attacks. Because of this, any significant degree of clock 
612     skew can hinder the ability of users to access sites successfully.</p>
613 </blockquote>
614 <h4><a name="2.i."></a>2.i. Other Considerations</h4>
615 <blockquote>
616     <p>Especially for higher education, there are a handful of laws enacted 
617     which may have important ramifications on the disclosure of personal 
618     information and attributes. Since Shibboleth does not necessarily need to 
619     transmit identity, it is an ideal solution for many higher education 
620     situations. Nevertheless, all parties within the United States of America 
621     are strongly advised to consult the
622     <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights 
623     and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal 
624     legislation before deploying Shibboleth.</p>
625 </blockquote>
626 <p><br>
627 <br>
628 </p>
629 <hr>
630 <p><br>
631 </p>
632 <h3><a name="3."></a>3. Installation</h3>
633 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
634 <p><b>The following requirements are primarily recommendations based on the most 
635 common ways to run Shibboleth. However, the origin should be able to run under 
636 any servlet container supporting <span class="fixedwidth">Servlet API v2.3</span> 
637 and <span class="fixedwidth">JSP specification 1.2</span>.</b></p>
638 <blockquote>
639     <ul type="circle">
640         <li><a href="http://http://www.apache.org/dist/httpd/">Apache 1.3.26+ 
641         (&lt;2.0)</a></li>
642         <li><a href="http://jakarta.apache.org/tomcat/">Tomcat 4.1.18-24 LE Java 
643         server</a></li>
644         <li><a href="http://java.sun.com/j2se/">Sun J2SE JDK v1.4.1_01 and above</a>
645         <blockquote>
646             <p>Other versions of the JRE are not supported and are known to 
647             cause errors when working with certificates.</p>
648         </blockquote>
649         </li>
650         <li>mod_jk
651         <blockquote>
652             <p>You may need to build mod_jk against Apache, which will generally 
653             require GCC or a platform-specific C compiler.</p>
654         </blockquote>
655         </li>
656         <li>An enterprise authentication mechanism
657         <blockquote>
658             <p>Ideally, this will be a WebISO or SSO system such as
659             <a href="http://pubcookie.org/">Pubcookie</a>. The minimal 
660             requirement is for the web server to be able to authenticate browser 
661             users and supply their identity to the Handle Server.</p>
662         </blockquote>
663         </li>
664         <li>An enterprise directory service
665         <blockquote>
666             <p>Shibboleth currently supports retrieving user attribute 
667             information from an <a href="http://www.openldap.org">LDAP</a> 
668             directory. For testing purposes, Shibboleth also supports a minimal 
669             echo responder which will always return pre-defined attributes.</p>
670         </blockquote>
671         </li>
672     </ul>
673 </blockquote>
674 <h4><a name="3.b."></a>3.b. Deploy HS and AA</h4>
675 <blockquote>
676     <ol type="1">
677         <li>Ensure you have already obtained the proper
678         <a href="http://shibboleth.internet2.edu/release/shib-download.html">.tarball</a>.</li>
679         <li>The archive will expand into a <span class="fixedwidth">
680         shibboleth-origin-1.1/</span> directory(<span class="fixedwidth">/opt/</span> 
681         recommended).</li>
682         <li>Run the following command to move the Java files into Tomcat&#39;s tree:<blockquote>
683             <p><span class="fixedwidth">cp /opt/shibboleth-origin-1.1/dist/shibboleth.war 
684             /usr/local/tomcat/webapps/</span> </p>
685         </blockquote>
686         </li>
687         <li>Tomcat 4.1.x requires that several Java jarfiles used by Shibboleth 
688         be located in a special &quot;endorsed&quot; folder to override obsolete classes 
689         that Sun includes with their JVM. To deal with this problem use the 
690         following command, adjusting paths as needed:<blockquote>
691             <p><span class="fixedwidth">$ cp 
692             /opt/shibboleth-origin-1.1/endorsed/*.jar /usr/local/tomcat/common/endorsed</span>
693             </p>
694         </blockquote>
695         <p>Different versions of Tomcat or other Java servers may have other 
696         locations in which to place these files or deal with this problem. Refer 
697         to your application server&#39;s documentation to find out how to properly 
698         endorse classes, if necessary.</li>
699         <li>Restart Tomcat, which will automatically detect that there has been 
700         a new .war file added. This file will by default be expanded into
701         <span class="fixedwidth">/usr/local/tomcat/webapps/shibboleth</span>.</li>
702         <li>Apache must be told to map the URL&#39;s for the Shibboleth HS and AA to 
703         Tomcat. Two popular ways of doing this are to include the following text 
704         directly in <span class="fixedwidth">httpd.conf</span>, or to place
705         <span class="fixedwidth">Include conf/mod_jk.conf</span> in
706         <span class="fixedwidth">httpd.conf</span>, and place the following 
707         lines in <span class="fixedwidth">/etc/httpd/conf/mod_jk.conf</span>:<blockquote>
708             <p><span class="fixedwidth">--------- begin ---------<br>
709             &lt;IfModule !mod_jk.c&gt;<br>
710             &nbsp;LoadModule jk_module libexec/mod_jk.so<br>
711             &lt;/IfModule&gt;<br>
712             <br>
713             JkWorkersFile &quot;/usr/local/tomcat/conf/jk/workers.properties&quot;<br>
714             JkLogFile &quot;/usr/local/apache/logs/mod_jk.log&quot;<br>
715             <br>
716             JkLogLevel emerg<br>
717             <br>
718             JkMount /shibboleth/* ajp13<br>
719             <br>
720             --------- end ---------</span> </p>
721         </blockquote>
722         </li>
723         <li>Tomcat&#39;s <span class="fixedwidth">/conf/server.xml</span> ships by 
724         default with the Coyote/JK2 connector enabled, which fails with 
725         Shibboleth due to the lack of support for <span class="fixedwidth">
726         REMOTE_USER</span>. This connector must be commented out. Then, 
727         uncomment and modify the traditional AJP 1.3 connector as follows:<ol type="A">
728             <li>Add <span class="fixedwidth">address=&quot;127.0.0.1&quot;</span> inside 
729             the <span class="fixedwidth">&lt;Ajp13Connector&gt;</span> configuration 
730             element to prevent off-host access.</li>
731             <li>Add <span class="fixedwidth">tomcatAuthentication=&quot;false&quot;</span> 
732             to the <span class="fixedwidth">&lt;Ajp13Connector&gt;</span> 
733             configuration element to ensure that the user&#39;s identity is passed 
734             from Apache to the servlet environment.</li>
735         </ol>
736         </li>
737         <li>It is <b>strongly</b> recommended that the AA be SSL-protected to 
738         protect attributes in transit. To do so, add an appropriate location 
739         block to <span class="fixedwidth">httpd.conf</span>:<blockquote>
740             <p><span class="fixedwidth">&lt;Location /shibboleth/AA&gt; 
741             SSLVerifyClient optional SSLOptions +StdEnvVars +ExportCertData 
742             &lt;/Location&gt; </span></p>
743         </blockquote>
744         </li>
745     </ol>
746 </blockquote>
747 <p><br>
748 </p>
749 <hr>
750 <p><br>
751 </p>
752 <h3><a name="4."></a>4. Getting Running</h3>
753 <h4><a name="4.a."></a>4.a. Basic Configuration</h4>
754 <blockquote>
755     <p><b>This section of the deploy guide specifies only the essential changes 
756     that need to be made to the configuration defaults for the origin to 
757     function successfully in a federated environment. More complex configuration 
758     will likely be required for many applications and federations; for a full 
759     description of every field in <span class="fixedwidth">origin.properties</span>, 
760     please refer to <a href="#5.a.">section 5.a</a>.</b></p>
761     <p>The main configuration file for Shibboleth&#39;s origin side is located in
762     <span class="fixedwidth">/webapps/shibboleth/WEB-INF/classes/conf/origin.properties.</span>. 
763     This file contains configuration information for the origin side in several 
764     sections. The configuration must be consistent with values elsewhere in the 
765     deployment, such as the <a href="#4.c.">HS&#39; certificate</a> and with 
766     directory access bindings, etc., or access errors may occur.</p>
767     <p>All pathnames are relative, and have an effective root path of
768     <span class="fixedwidth">$TOMCAT_HOME/webapps/shibboleth/WEB-INF/classes/</span>. 
769     To specify files outside of the webapp, specify a full URI, such as
770     <span class="fixedwidth">file:///usr/local/shibboleth/</span>.</p>
771     <ol type="1">
772         <li><span class="fixedwidth">
773         edu.internet2.middleware.shibboleth.hs.HandleServlet.issuer = &lt;domain 
774         name&gt;</span>
775         <blockquote>
776             <p>This will be, in most cases, the DNS name of the machine on which 
777             the HS runs. It must match the CN of the certificate used below.</p>
778         </blockquote>
779         </li>
780         <li><span class="fixedwidth">
781         edu.internet2.middleware.shibboleth.hs.HandleServlet.siteName = &lt;URI&gt;</span>
782         <blockquote>
783             <p>The value of this must entered as assigned by the federation used 
784             for testing or initial operation.</p>
785         </blockquote>
786         </li>
787         <li><span class="fixedwidth">
788         edu.internet2.middleware.shibboleth.hs.HandleServlet.AAUrl = &lt;url&gt;</span>
789         <blockquote>
790             <p>This will be the URL assigned the AA servlet in step
791             <a href="#3.b.">3.b</a>. Note that this <b>must</b> be an
792             <span class="fixedwidth">https://</span> URL in order for the AA to 
793             know which SHAR is requesting attributes.</p>
794         </blockquote>
795         </li>
796         <li>&nbsp;<ul type="circle">
797             <li><span class="fixedwidth">
798             edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePath = 
799             &lt;pathname&gt;</span></li>
800             <li><span class="fixedwidth">
801             edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePassword 
802             = &lt;password&gt;</span></li>
803             <li><span class="fixedwidth">
804             edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyAlias 
805             = &lt;alias&gt;</span></li>
806             <li><span class="fixedwidth">
807             edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyPassword 
808             = &lt;password&gt;</span></li>
809             <li><span class="fixedwidth">
810             edu.internet2.middleware.shibboleth.hs.HandleServlet.certAlias = 
811             &lt;alias&gt;</span></li>
812         </ul>
813         <blockquote>
814             <p>Respectively, the location and password of the Java keystore 
815             containing the x.509 certificate and matching private key to be used 
816             by the HS, the alias and password of the private key, and the 
817             optional certificate alias, if it differs from the key&#39;s alias.</p>
818         </blockquote>
819         </li>
820         <li><span class="fixedwidth">
821         edu.internet2.middleware.shibboleth.aa.AAServlet.authorityName = &lt;domain 
822         name&gt;</span>
823         <blockquote>
824             <p>Specifies the name of the AA, which is typically the domain name 
825             of the server running it.</p>
826         </blockquote>
827         </li>
828         <li><span class="fixedwidth">
829         edu.internet2.middleware.shibboleth.audiences = &lt;URI&gt;</span>
830         <blockquote>
831             <p>This section must contain the URI of the federation under which 
832             the origin will operate or test initially. This will be provided by 
833             the federation.</p>
834         </blockquote>
835         </li>
836     </ol>
837 </blockquote>
838 <p><br>
839 </p>
840 <h4><a name="4.a.i"></a>4.a.i Modifying the default Attribute Resolver 
841 configuration</h4>
842 <blockquote>
843     <p>The resolver.xml file controls the retrieval of attributes from 
844     enterprise repositories, and the process of mapping them to Shibboleth/SAML 
845     attributes. For more precise information regarding how attributes are 
846     processed or syntactically formed, please refer to section <a href="#5.d.">
847     5.d.</a></p>
848     <p>In order to make the Shibboleth software operational, however, minor 
849     edits must be made to the example version of the resolver.xml file. The file 
850     can be found at <span class="fixedwidth">/webapps/shibboleth/WEB-INF/classes/conf/resolver.xml.</span> 
851     Two changes are necessary:</p>
852     <p>1. The value of the smartScope attribute should be changed to the Domain 
853     Name value submitted to the Federation. It appears on two 
854     SimpleAttributeDefinition elements: eduPersonScopedAffiliation and 
855     eduPersonPrincipalName.</p>
856     <p>2. The comment indicators should be removed from around the definitions 
857     of those two elements ( &lt;!-- and --&gt; ).</p>
858 </blockquote>
859 <p><br>
860 </p>
861 <h4><a name="4.b."></a>4.b. Key Generation and Certificate Installation</h4>
862 <blockquote>
863     <p>The SAML messages generated by the HS must be digitally signed. Each HS 
864     must be issued a private and public keypair, which is stored in a Java 
865     keystore. The current implementation of Shibboleth requires the use of an 
866     ordinary file-based keystore. The keytool program is included with the Java 
867     development and runtime kits. Access parameters to the keystore will need to 
868     be consistent with those specified in <span class="fixedwidth">
869     origin.properties</span>.</p>
870     <p>A sample keystore is included in the distribution and can be found in
871     <span class="fixedwidth">/usr/local/tomcat/webapps/shibboleth/WEB-INF/classes/conf/keystore 
872     .jks</span> with a password of <span class="fixedwidth">shibhs</span>. It is 
873     intended to serve as an example and not as a production keystore.</p>
874     <p>The following commands will generate a new RSA keypair and store it in 
875     the <span class="fixedwidth">keystore.jks</span> file, with a keyentry alias 
876     of <span class="fixedwidth">hs</span> and new passwords of your choosing:</p>
877     <blockquote>
878         <p><span class="fixedwidth">$ cd /usr/local/tomcat/webapps/shibboleth/WEB-INF/classes/conf<br>
879         $ keytool -storepasswd -keystore keystore.jks -new &lt;newpassword&gt;<br>
880         $ keytool -genkey -keystore keystore.jks -alias hs -keyalg rsa -keysize 
881         2048<br>
882         </span></p>
883     </blockquote>
884     <p>You will be prompted for passwords during key generation as needed, to 
885     access the keystore and assign the key itself its own password. You will 
886     also be prompted for the distinguished name components to associate with the 
887     key. This DN will be placed in a self-signed certificate and will be the 
888     name that is associated with your HS by Shibboleth. In particular, the first 
889     component you enter for Name will be the <span class="fixedwidth">Common 
890     Name</span>(when keytool asks for first and last name, common name is 
891     intended), which in most cases should be the hostname of the HS system. Note 
892     that a specific federation of sites may dictate what type of key algorithm, 
893     key size, or validity period is appropriate.</p>
894     <p>Once you have a keypair generated, the self-signed certificate must be 
895     replaced with a certificate signed by a CA acceptable to the federation you 
896     will be joining. Shibboleth is generally able to climb trust chains to reach 
897     an intermediate CA&#39;s root CA. Note that the intermediate CA&#39;s signing 
898     certificate must still be signed by a root CA recognized by the federation.</p>
899     <p>To generate a certificate signing request for a CA, use the following 
900     command:</p>
901     <blockquote>
902         <p><span class="fixedwidth">$ keytool -certreq -keystore keystore.jks 
903         -alias hs -file &lt;csr-file&gt;<br>
904         </span></p>
905     </blockquote>
906     <p>The contents of <span class="fixedwidth">&lt;csr-file&gt;</span> can then be 
907     sent to a CA for signing. You will receive a signed certificate in return in 
908     a file. To install the new certificate into your keystore, use the following 
909     command:</p>
910     <blockquote>
911         <p><span class="fixedwidth">$ keytool -import -keystore keystore.jks 
912         -alias hs -file &lt;cert-file&gt;</span> </p>
913     </blockquote>
914     <p>Note that if the signing CA&#39;s certificate is not already installed in 
915     your keystore as a trusted signer, you may need to download the CA&#39;s root 
916     certificate and import it into the keystore file under a different alias, 
917     using a command similar to the above.</p>
918     <p>For information on sharing certificate/key pairs between Apache and Java 
919     keystores see section <a href="#5.c.">5.c.</a>.</p>
920 </blockquote>
921 <h4><a name="4.c."></a>4.c. Linking the Authentication System to the HS</h4>
922 <blockquote>
923     <p>The interaction between the HS and the local authentication system is 
924     implemented by supplying the HS with the identity of the browser user. Most 
925     often, this will mean protecting the HS servlet with some form of local 
926     authentication that populates <span class="fixedwidth">REMOTE_USER</span>. 
927     Location blocks can be added to <span class="fixedwidth">httpd.conf</span>, 
928     associating the appropriate authentication mechanism with the URL of the HS 
929     servlet. The following example demonstrates association of a very basic 
930     authentication method with the HS:</p>
931     <blockquote>
932         <p><span class="fixedwidth">&lt;Location /shibboleth/HS&gt;<br>
933         AuthType Basic<br>
934         AuthName &quot;Internet2 Handle Service&quot;<br>
935         AuthUserFile /usr/local/apache/conf/user.db<br>
936         require valid-user<br>
937         &lt;/Location&gt;<br>
938         </span></p>
939     </blockquote>
940     <p>Note that .htaccess files cannot be used for this purpose because URL&#39;s 
941     are &quot;virtualized&quot; by Tomcat.</p>
942     <p>It is recommended that the origin be tested at the end of this process 
943     using the process described in section <a href="#6.a.">6.a</a>.</p>
944 </blockquote>
945 <h4><a name="4.c.i."></a>4.c.i. Enabling client certificate authentication
946 <font color="#5555EE">(optional)</font></h4>
947 <blockquote>
948     <blockquote>
949         <p>Shibboleth supports client certificate authentication by utilization 
950         of a filter that relies on the web server to do all processing to ensure 
951         that the certificate is both valid and appropriate for the application. 
952         An example deployment descriptor is included with the Shibboleth 
953         distribution at <span class="fixedwidth">$SHIB_HOME/webAppConfig/origin-client-cert.xml</span>. 
954         To enable the filter, add the following to the deployment descriptor (<span class="fixedwidth">web.xml</span>):</p>
955         <blockquote>
956             <p><span class="fixedwidth">&nbsp;&nbsp;&lt;filter&gt;<br>
957             &nbsp;&nbsp;&nbsp;&nbsp;&lt;filter-name&gt;<br>
958             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client Cert AuthN Filter<br>
959             &nbsp;&nbsp;&nbsp;&nbsp;&lt;/filter-name&gt;<br>
960             &nbsp;&nbsp;&nbsp;&nbsp;&lt;filter-class&gt;<br>
961             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;edu.internet2.middleware.shibboleth.utils.ClientCertTrustFilter<br>
962             &nbsp;&nbsp;&nbsp;&nbsp;&lt;/filter-class&gt;<br>
963             &nbsp;&nbsp;&lt;/filter&gt;<br>
964             <br>
965             <br>
966             &nbsp;&nbsp;&lt;filter-mapping&gt;<br>
967             &nbsp;&nbsp;&nbsp;&nbsp;&lt;filter-name&gt;<br>
968             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Client Cert AuthN Filter<br>
969             &nbsp;&nbsp;&nbsp;&nbsp;&lt;/filter-name&gt;<br>
970             &nbsp;&nbsp;&nbsp;&nbsp;&lt;url-pattern&gt;<br>
971             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/HS<br>
972             &nbsp;&nbsp;&nbsp;&nbsp;&lt;/url-pattern&gt;<br>
973             &nbsp;&nbsp;&lt;/filter-mapping&gt;<br>
974             </span></p>
975         </blockquote>
976         <p>By default, the filter pulls the principal name out of the
977         <span class="fixedwidth">CN</span> of the cert&#39;s
978         <span class="fixedwidth">Subject</span> by using regular expression 
979         grouping. This may be done using patterns such as:</p>
980         <blockquote>
981             <p><span class="fixedwidth">regex: &#39;.*CN=([^,/]+).*&#39; match group: 1</span>
982             </p>
983         </blockquote>
984         <p>The servlet filter will accept two initialization parameters,
985         <span class="fixedwidth">regex</span> and <span class="fixedwidth">
986         matchGroup</span> that can be used to extract the principal name 
987         differently.</p>
988     </blockquote>
989 </blockquote>
990 <h4><a name="4.d."></a>4.d. Establishing default ARP&#39;s for the origin community</h4>
991 <p><b>For a more basic introduction to ARP&#39;s, please refer to section
992 <a href="#2.e.">2.e</a>.</b></p>
993 <blockquote>
994     <p>An ARP determines which attributes are released to a SHAR when a user 
995     tries to access a resource. It acts as a sort of filter on user information 
996     contained in the authoritative directory, deciding what can be released to 
997     whom, but not modifying or creating information itself. ARP&#39;s are generally 
998     administered by the site, but Shibboleth will provide for users to broker 
999     control of their own information and privacy by allowing them to create 
1000     ARP&#39;s pertaining to themselves.</p>
1001     <p>It is recommended that a set of policies be established between an origin 
1002     and frequently accessed targets to specify default releases of expected 
1003     attributes. Federation guidelines may provide more information on population 
1004     of ARP&#39;s.</p>
1005     <p>Currently, there is no direct mechanism for users to create their own 
1006     ARP&#39;s besides direct XML writing. In future versions, a GUI will be provided 
1007     for simpler management of ARP&#39;s. Care should be given to balancing giving 
1008     sufficient control over information to users and avoiding access problems. 
1009     For example, users may decide to restrict the release of their personal 
1010     information to such a degree that access to a site for a class may become 
1011     impossible because Shibboleth cannot release enough information to grant 
1012     access.</p>
1013     <p>The Shibboleth distribution contains an example site arp that releases 
1014     the eduPersonScopedAffiliation attribute to all targets. For more precise 
1015     information regarding how ARP&#39;s are processed or syntactically formed, 
1016     please refer to section <a href="#5.b.i.">5.b.i</a>.</p>
1017 </blockquote>
1018 <p><br>
1019 </p>
1020 <hr>
1021 <p><br>
1022 </p>
1023 <h3><a name="5."></a>5. Advanced Configuration</h3>
1024 <h4><a name="5.a."></a><span class="fixedwidth">origin.properties</span></h4>
1025 <blockquote>
1026     <p>The main configuration file for Shibboleth&#39;s origin side is located in
1027     <span class="fixedwidth">/webapps/shibboleth/WEB-INF/classes/conf/origin.properties.</span>. 
1028     This file contains configuration information for the origin side in several 
1029     sections. The configuration must be consistent with values elsewhere in the 
1030     deployment, such as the <a href="#4.c.">HS&#39; certificate</a> and with 
1031     directory access bindings, etc., or access errors may occur.</p>
1032     <p>All pathnames are relative, and have an effective root path of
1033     <span class="fixedwidth">$TOMCAT_HOME/webapps/shibboleth/WEB-INF/classes/</span>. 
1034     To specify files outside of the webapp, specify a full URI, such as
1035     <span class="fixedwidth">file:///usr/local/shibboleth/</span>.</p>
1036     <p>Fields that are purple are optional; grey fields are mandatory.</p>
1037     <p>These are the variables that may be specified for each component of
1038     <span class="fixedwidth">origin.properties</span>:</p>
1039     <p><br>
1040     </p>
1041     <p>General Configuration:</p>
1042     <dl>
1043         <dd class="attributelong"><span class="fixedwidth">
1044         edu.internet2.middleware.shibboleth.hs.HandleServlet.issuer = &lt;domain 
1045         name&gt;</span> </dd>
1046         <dd class="value">Specifies the DNS name the HS should use for itself in 
1047         issuing assertions.</dd>
1048         <dd class="attributelong"><span class="fixedwidth">
1049         edu.internet2.middleware.shibboleth.hs.HandleServlet.siteName = &lt;URI&gt;</span>
1050         </dd>
1051         <dd class="value">Specifies the the <span class="fixedwidth">URI</span> 
1052         to use as the name of the origin site as a whole. This field is 
1053         primarily meant to be populated in the context of the federation in 
1054         which the origin site resides, is intended to be globally unique, and 
1055         will typically be assigned by the federation.</dd>
1056         <dd class="attributelong"><span class="fixedwidth">
1057         edu.internet2.middleware.shibboleth.hs.HandleServlet.AAUrl = &lt;url&gt;</span>
1058         </dd>
1059         <dd class="value">Specifies the <span class="fixedwidth">URL</span> at 
1060         which the HS&#39; corresponding AA may be contacted. Note that this <b>must</b> 
1061         be an <span class="fixedwidth">https://</span> URL in order for the AA 
1062         to know which SHAR is requesting attributes.</dd>
1063         <dd class="attributeoptlong"><span class="fixedwidth">
1064         edu.internet2.middleware.shibboleth.hs.HandleServlet.username = &lt;var&gt;</span>
1065         </dd>
1066         <dd class="valueopt">Specifies the HTTP request header that should be 
1067         used to acquire the user&#39;s principal name from the authentication 
1068         service. Defaults to <span class="fixedwidth">REMOTE_USER</span>.</dd>
1069         <dd class="attributeoptlong"><span class="fixedwidth">
1070         edu.internet2.middleware.shibboleth.hs.HandleServlet.authMethod = &lt;uri&gt;</span>
1071         </dd>
1072         <dd class="valueopt">Specifes the URI used to populate
1073         <span class="fixedwidth">AuthenticationMethod</span> in the SAML 
1074         attribute assertion. This corresponds to the method used to authenticate 
1075         users by the authentication service used by the HS. Some common 
1076         authentication methods and corresponding URI&#39;s are listed below; for a 
1077         complete list, please consult section 7.1 of the SAML 1.1 core 
1078         specifications or your federation&#39;s guidelines.<table border="2" cellpadding="0" cellspacing="0">
1079             <tr>
1080                 <td><span class="fixedwidth">
1081                 urn:oasis:names:tc:SAML:1.0:am:password</span></td>
1082                 <td>The authentication was performed using a password.</td>
1083             </tr>
1084             <tr>
1085                 <td><span class="fixedwidth">urn:ietf:rfc:1510</span></td>
1086                 <td>The authentication was performed using Kerberos.</td>
1087             </tr>
1088             <tr>
1089                 <td><span class="fixedwidth">
1090                 urn:oasis:names:tc:SAML:1.0:am:X509-PKI</span></td>
1091                 <td>The authentication was performed using a certificate and key 
1092                 issued to the end user. More specific forms of PKI 
1093                 authentication such as SPKI and XKMS are also assigned URN&#39;s in 
1094                 the SAML specs.</td>
1095             </tr>
1096         </table>
1097         </dd>
1098     </dl>
1099     <p><br>
1100     </p>
1101     <p>Assertion Signing:</p>
1102     <dl>
1103         <dd class="attributelong"><span class="fixedwidth">
1104         edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePath = 
1105         &lt;pathname&gt;</span> </dd>
1106         <dd class="value">Specifies the location of the Java keystore containing 
1107         the x.509 certificate and matching private key to be used by the HS.</dd>
1108         <dd class="attributelong"><span class="fixedwidth">
1109         edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePassword = 
1110         &lt;password&gt;</span> </dd>
1111         <dd class="value">Specifies the password to the referenced keystore.</dd>
1112         <dd class="attributelong"><span class="fixedwidth">
1113         edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyAlias = 
1114         &lt;alias&gt;</span> </dd>
1115         <dd class="value">Specifies the alias used for accessing the private 
1116         key.</dd>
1117         <dd class="attributelong"><span class="fixedwidth">
1118         edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyPassword 
1119         = &lt;password&gt;</span> </dd>
1120         <dd class="value">Specifies the password used to retrieve the private 
1121         key.</dd>
1122         <dd class="attributeoptlong"><span class="fixedwidth">
1123         edu.internet2.middleware.shibboleth.hs.HandleServlet.certAlias = &lt;alias&gt;</span>
1124         </dd>
1125         <dd class="valueopt">Specifies the alias for the certificate 
1126         corresponding to the private key used by the HS. Defaults to the private 
1127         key&#39;s alias.</dd>
1128     </dl>
1129     <p><br>
1130     </p>
1131     <p>General AA Configuration:</p>
1132     <dl>
1133         <dd class="attributelong"><span class="fixedwidth">
1134         edu.internet2.middleware.shibboleth.aa.AAServlet.authorityName = &lt;domain 
1135         name&gt;</span> </dd>
1136         <dd class="value">Specifies the name of the AA, which is typically the 
1137         domain name of the server running it.</dd>
1138         <dd class="attributelong"><span class="fixedwidth">
1139         edu.internet2.middleware.shibboleth.aa.AAServlet.passThruErrors = 
1140         &lt;true/false&gt;</span> </dd>
1141         <dd class="value">Specifies whether the AA should pass on internal 
1142         errors to the SHAR for debugging purposes. Defaults to
1143         <span class="fixedwidth">false</span>.</dd>
1144     </dl>
1145     <p>AA Attribute Resolution:</p>
1146     <dl>
1147         <dd class="attributelong"><span class="fixedwidth">
1148         edu.internet2.middleware.shibboleth.aa.attrresolv.AttributeResolver.ResolverConfig 
1149         = &lt;pathname&gt;</span> </dd>
1150         <dd class="value">Specifies the location of the configuration file for 
1151         the resolver the AA uses to build attributes. Defaults to
1152         <span class="fixedwidth">/conf/resolver.xml</span>. For information on 
1153         how to configure and use the attribute resolver, consult section
1154         <a href="4.e.">4.e</a>.</dd>
1155     </dl>
1156     <p>ARP Configuration:</p>
1157     <dl>
1158         <dd class="attributelong"><span class="fixedwidth">
1159         edu.internet2.middleware.shibboleth.aa.arp.ArpRepository.implementation 
1160         = &lt;string&gt;</span> </dd>
1161         <dd class="value">References the type of ARP repository implemented. 
1162         Shibboleth provides a built-in ARP repository specified by
1163         <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.arp. 
1164         provider.FileSystemArpRepository</span>.<p>Note that the set of 
1165         principals that an ARP applies to is not expressed by the ARP itself, 
1166         but rather the implementation of the ARP repository. For example, if the 
1167         ARP repository were implemented in LDAP, the ARP&#39;s that apply to a user 
1168         would be attributes of that user&#39;s personal LDAP entry, and the site ARP 
1169         would be an attribute of an entry representing the site. While not 
1170         performed by the built-in ARP repository, a repository implementation 
1171         might also implement group ARP&#39;s; for example, in an LDAP directory, the 
1172         user entry might have some group membership attributes that refer to 
1173         group entries, and those group entries would have ARP attributes, and 
1174         all those ARP&#39;s would be applicable.</dd>
1175         <dd class="attributelong"><span class="fixedwidth">
1176         edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path 
1177         = &lt;pathname&gt;</span> </dd>
1178         <dd class="value">Specifies the relative or absolute path to the folder 
1179         containing the ARP files.</dd>
1180         <dd class="attributeoptlong"><span class="fixedwidth">
1181         edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.ArpTTL 
1182         = &lt;seconds&gt;</span> </dd>
1183         <dd class="valueopt">Specifies the duration in <span class="fixedwidth">
1184         seconds</span> that ARP&#39;s may be cached by the AA. Defaults to
1185         <span class="fixedwidth">0</span>, or no caching.</dd>
1186     </dl>
1187     <p>Handle Repository Configuration:</p>
1188     <dl>
1189         <dd class="attributeoptlong"><span class="fixedwidth">
1190         edu.internet2.middleware.shibboleth.hs.HandleRepository.implementation = 
1191         &lt;string&gt;</span> </dd>
1192         <dd class="valueopt">Specifies the method by which the HS and AA share 
1193         handles. These are by default passed by memory(which can be specified 
1194         explicitly using <span class="fixedwidth">
1195         edu.internet2.middleware.shibboleth.hs.provider. MemoryHandleRepository</span>), 
1196         and may also be passed using symmetric encryption with
1197         <span class="fixedwidth">
1198         edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository</span>.</dd>
1199     </dl>
1200     <p>edu.internet2.middleware.shibboleth.hs.provider. MemoryHandleRepository
1201     <font color="#5555EE">(specify if <span class="fixedwidth">
1202     edu.internet2.middleware.shibboleth.hs.HandleRepository. implementation</span> 
1203     is <span class="fixedwidth">MemoryHandleRepository</span>)</font></p>
1204     <blockquote>
1205         <dl>
1206             <dd class="attributeoptlong"><span class="fixedwidth">
1207             edu.internet2.middleware.shibboleth.hs.BaseHandleRepository.handleTTL 
1208             = &lt;seconds&gt;</span> </dd>
1209             <dd class="valueopt">Specifies the time in <span class="fixedwidth">
1210             seconds</span> for which issued handles are valid. Defaults to
1211             <span class="fixedwidth">1800</span>, or 30 minutes. The time should 
1212             be long enough to allow for clock skew and short enough to protect 
1213             against various attacks. Consult your federation guidelines for 
1214             further advice.</dd>
1215         </dl>
1216     </blockquote>
1217     <p>edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository
1218     <font color="#5555EE">(specify if <span class="fixedwidth">
1219     edu.internet2.middleware.shibboleth.hs.HandleRepository. implementation</span> 
1220     is <span class="fixedwidth">CryptoHandleRepository</span>)</font></p>
1221     <p>In order to use the crypto repository implementation, you must have a
1222     <span class="fixedwidth">DESede</span> secret key in a keystore of type
1223     <span class="fixedwidth">JCEKS</span>. The origin distribution includes a 
1224     program that will automatically generate such a key. In order to invoke it, 
1225     run <span class="fixedwidth">./ant genSecret</span>, which will create a 
1226     keystore in <span class="fixedwidth">$SHIB_HOME/src/conf/handle.jks</span> 
1227     that includes the key, with an alias of <span class="fixedwidth">handleKey</span> 
1228     and a password of <span class="fixedwidth">shibhs</span>. If
1229     <span class="fixedwidth">./ant dist</span> is run subsequently, this 
1230     keystore will be included in the webapp archive that is created.</p>
1231     <blockquote>
1232         <dl>
1233             <dd class="attributelong"><span class="fixedwidth">
1234             edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath 
1235             = &lt;pathname&gt;</span> </dd>
1236             <dd class="value">Specifies the path to the keystore containing the 
1237             key used to encrypt passed principal identifiers.</dd>
1238             <dd class="attributelong"><span class="fixedwidth">
1239             edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePassword 
1240             = &lt;password&gt;</span> </dd>
1241             <dd class="value">Specifies the password for the keystore.</dd>
1242             <dd class="attributelong"><span class="fixedwidth">
1243             edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStoreKeyAlias 
1244             = &lt;password&gt;</span> </dd>
1245             <dd class="value">Specifies the alias for the appropriate encryption 
1246             key within the keystore.</dd>
1247             <dd class="attributelong"><span class="fixedwidth">
1248             edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStoreKeyPassword 
1249             = &lt;password&gt;</span> </dd>
1250             <dd class="valueopt">Specifies the password used to retrieve the 
1251             key.</dd>
1252             <dd class="attributeoptlong"><span class="fixedwidth">
1253             edu.internet2.middleware.shibboleth.hs.CryptoHandleRepository.handleTTL 
1254             = &lt;seconds&gt;</span> </dd>
1255             <dd class="valueopt">Specifies the time in <span class="fixedwidth">
1256             seconds</span> for which issued handles are valid. Defaults to
1257             <span class="fixedwidth">1800</span>, or 30 minutes. The time should 
1258             be long enough to allow for clock skew and short enough to protect 
1259             against various attacks. Consult your federation guidelines for 
1260             further advice.</dd>
1261         </dl>
1262     </blockquote>
1263     <p>Federation Configuration:</p>
1264     <dl>
1265         <dd class="attributelong"><span class="fixedwidth">
1266         edu.internet2.middleware.shibboleth.audiences = &lt;URI&#39;s&gt;</span> </dd>
1267         <dd class="value">Specifies a list of <span class="fixedwidth">URI</span>&#39;s 
1268         that will be used for the <span class="fixedwidth">Audience</span> field 
1269         of the SAML attribute assertion. All URI&#39;s listed will be sent with any 
1270         assertion issued by the AA. These URI&#39;s are defined and provided by and 
1271         correspond to federations.<p>Note that the values of the URI&#39;s here <b>
1272         must</b> match one of the policy URI&#39;s accepted by the receiving target 
1273         in the <span class="fixedwidth">[policies]</span> section of
1274         <span class="fixedwidth">shibboleth.ini</span> or interoperation will 
1275         fail by design. </dd>
1276     </dl>
1277 </blockquote>
1278 <p><br>
1279 </p>
1280 <h4><a name="5.b."></a>5.b. ARP Overview</h4>
1281 <blockquote>
1282     <h5>This section applies primarily to the syntactic and technical details of 
1283     ARP&#39;s. For basic information on and explanation of what an ARP is and how it 
1284     should be managed, please refer to sections <a href="#2.e.">2.e</a> and
1285     <a href="#4.d.">4.d</a>.</h5>
1286     <p>Every ARP file contains one ARP. ARP&#39;s may be specified either as the 
1287     site ARP or user ARP&#39;s. The site ARP pertains to every principal for whom 
1288     the AA retrieves information; a user ARP applies only to the individual user 
1289     for whom it is defined. The set of principals to whom the ARP applies is 
1290     defined by the name of the ARP file: the site ARP is stored in
1291     <span class="fixedwidth">arp.site.xml</span> and user ARP&#39;s are stored as
1292     <span class="fixedwidth">arp.user.$PRINCIPALNAME.xml</span>. Up to two ARP&#39;s 
1293     will apply to a principal: the site ARP, and the user ARP for that 
1294     principal.</p>
1295     <p>Each ARP acts as a container that holds a set of ARP rules that are 
1296     applicable to the principals that ARP is effective for. Each ARP rule 
1297     specifies a single release policy within the ARP container pertaining to a 
1298     specific set of targets. This set of targets may be specified as a specific 
1299     SHAR, a SHAR tree, or a regular expression, and becomes the ARP rule&#39;s 
1300     target definition. Each ARP rule may contain specifications regarding the 
1301     release of any number of attribute values to requests matching that ARP rule 
1302     for that user. ARP rules may be flagged as default, implying that they are 
1303     always applied to any user matched by the ARP container. Note that ARP&#39;s may 
1304     also be used to restrict specific attribute/value pairs in addition to 
1305     restricting or releasing individual attributes.</p>
1306     <p>When a query is received, the AA generates an effective ARP, which is the 
1307     fully evaluated set of ARP rules regarding that SHAR based on all ARP 
1308     containers applicable to the principal. This effective ARP is then applied 
1309     to attribute values retrieved from the directory and the appropriate 
1310     assertion is constructed. Default rules are always included in construction 
1311     of the effective ARP.</p>
1312 </blockquote>
1313 <h4><a name="5.b.i."></a>5.b.i. ARP Processing</h4>
1314 <blockquote>
1315     <blockquote>
1316         <p>When a request arrives from a particular SHAR, the applicable set of 
1317         ARP rules are parsed into an effective ARP. This parsing is done as 
1318         follows:</p>
1319         <ol type="1">
1320             <li>Identify all ARP&#39;s that should be applied to a particular 
1321             principal. This is done by isolating the files in the folder 
1322             specified by <span class="fixedwidth">
1323             edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path</span> 
1324             that have the name either arp.site.xml or 
1325             arp.user.$PRINCIPALNAME.xml.</li>
1326             <li>Find all ARP rules relevant to the query:
1327             <ol type="i">
1328                 <li>Any ARP rules within the identified ARP&#39;s designated as 
1329                 defaults are automatically included in the effective ARP without 
1330                 performing any matching functions.</li>
1331                 <li>For each non-default rule in each identified ARP, the 
1332                 matching functions specified in the rule&#39;s target definition are 
1333                 performed. A separate matching function is performed for the 
1334                 requesting SHAR and the resource on behalf of which the SHAR is 
1335                 making the request.</li>
1336                 <li>Each matching function evaluates to <span class="fixedwidth">
1337                 TRUE</span> if the match is successful or
1338                 <span class="fixedwidth">FALSE</span> if it is unsuccessful. If 
1339                 both functions evaluate to <span class="fixedwidth">TRUE</span>, 
1340                 the rule is included in the Effective ARP.</li>
1341             </ol>
1342             </li>
1343             <li>Construct the Attribute Filter:
1344             <ol type="i">
1345                 <li>For each attribute, compile a temporary list of associated 
1346                 rules that includes all values with a release qualifier of
1347                 <span class="fixedwidth">permit</span>.</li>
1348                 <li>Subtract from this list all attribute values with rules 
1349                 specifying a release qualifier of <span class="fixedwidth">deny</span>. 
1350                 The resulting list represents the allowable release values for 
1351                 the attribute and is used as a mask for the values which are 
1352                 returned from the Attribute Resolver.</li>
1353                 <li>If a statement specifies that all values should be 
1354                 permitted, then specific <span class="fixedwidth">deny</span> 
1355                 qualifiers for specific values should still be enforced. If a 
1356                 statement specifies that all values should be denied, then
1357                 <span class="fixedwidth">permit</span> qualifiers for specific 
1358                 values will be ignored.</li>
1359             </ol>
1360             </li>
1361             <li>Using the mask and attributes returned from the Attribute 
1362             Resolver, an assertion is constructed.</li>
1363         </ol>
1364     </blockquote>
1365 </blockquote>
1366 <h4><a name="5.b.ii."></a>5.b.ii. ARP Syntax</h4>
1367 <blockquote>
1368     <blockquote>
1369         <p>Each ARP is described by an XML file based on a standard
1370         <span class="fixedwidth">.xsd</span> schema. It consists of a standard
1371         <span class="fixedwidth">AttributeReleasePolicy</span> element 
1372         referencing the appropriate <span class="fixedwidth">xsi:schemaLocation</span> 
1373         and a self-explanatory <span class="fixedwidth">Description</span> 
1374         element followed by any number of <span class="fixedwidth">Rule</span> 
1375         elements. Each <span class="fixedwidth">Rule</span> element must consist 
1376         of a <span class="fixedwidth">Target</span> element and one or more
1377         <span class="fixedwidth">Attribute</span> elements. The
1378         <span class="fixedwidth">Target</span> element specifies the rules by 
1379         which the target definition is formed. The <span class="fixedwidth">
1380         Attribute</span> elements specifies the name and values of the 
1381         attributes that may be released.</p>
1382         <p>The simplest possible ARP is as follows, which releases
1383         <span class="fixedwidth">eduPersonScopedAffiliation</span> to any target 
1384         for the users the ARP applies to:</p>
1385         <blockquote>
1386             <p><span class="fixedwidth">&lt;?xml version=&quot;1.0&quot;?&gt;<br>
1387             &lt;AttributeReleasePolicy xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
1388             xmlns=&quot;urn:mace:shibboleth:arp:1.0&quot; xsi:schemaLocation=&quot;urn:mace:shibboleth:arp:1.0 
1389             shibboleth-arp-1.0.xsd&quot;&gt;<br>
1390 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Description&gt;Simplest possible 
1391             ARP.&lt;/Description&gt;<br>
1392 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Rule&gt;<br>
1393 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1394             &lt;Target&gt;<br>
1395 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1396             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;AnyTarget/&gt;<br>
1397 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1398             &lt;/Target&gt;<br>
1399 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1400             &lt;Attribute name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;&gt;<br>
1401 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1402             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;AnyValue release= &quot;permit&quot;/&gt;<br>
1403 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
1404             &lt;/Attribute &gt;<br>
1405 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Rule &gt;<br>
1406             &lt;/AttributeReleasePolicy&gt;<br>
1407             </span></p>
1408         </blockquote>
1409     </blockquote>
1410     <p>All ARP&#39;s must take the same basic form. A detailed description of how 
1411     each element of the <span class="fixedwidth">Rule</span> element may be 
1412     sub-populated follows:</p>
1413     <p>The <span class="fixedwidth">Target</span> element:</p>
1414     <blockquote>
1415         <p><span class="fixedwidth">Target</span> may contain either the
1416         <span class="fixedwidth">AnyTarget</span> element, which will cause the
1417         <span class="fixedwidth">Target</span> to always return
1418         <span class="fixedwidth">TRUE</span>, or both the
1419         <span class="fixedwidth">Requester</span> element, which provides for 
1420         matches to be performed against the SHAR name and the
1421         <span class="fixedwidth">Resource</span> element, which provides for 
1422         matches to be performed against the requested URL.</p>
1423         <p>There are three matches that may be performed by the AA in evaluating 
1424         ARP&#39;s by using the <span class="fixedwidth">matchFunction</span> 
1425         component of the <span class="fixedwidth">Requester</span> and
1426         <span class="fixedwidth">Resource</span> elements. The following match 
1427         patterns may be specified directly following the
1428         <span class="fixedwidth">Requester</span> or <span class="fixedwidth">
1429         Resource</span> elements, such as <span class="fixedwidth">&lt;Requester 
1430         matchFunction=&quot;urn:mace:shibboleth:arp:matchFunction:regexMatch&quot;&gt;</span>:</p>
1431         <ul type="disc">
1432             <li><span class="fixedwidth">
1433             urn:mace:shibboleth:arp:matchFunction:exactShar </span>
1434             <blockquote>
1435                 <p>May be used with the <span class="fixedwidth">Requester</span> 
1436                 element.</p>
1437                 <p>Evaluates to <span class="fixedwidth">TRUE</span> when the 
1438                 string content of the <span class="fixedwidth">Requester</span> 
1439                 element matches exactly the name of the requesting SHAR. 
1440                 Otherwise evaluates to <span class="fixedwidth">FALSE</span>. 
1441                 Serves as the default value associated with
1442                 <span class="fixedwidth">Requester</span> if none is specified.</p>
1443             </blockquote>
1444             </li>
1445             <li><span class="fixedwidth">
1446             urn:mace:shibboleth:arp:matchFunction:resourceTree </span>
1447             <blockquote>
1448                 <p>May be used with the <span class="fixedwidth">Resource</span> 
1449                 element.</p>
1450                 <p>Evaluates to <span class="fixedwidth">TRUE</span> when the 
1451                 location of the resource either matches exactly or begins with 
1452                 the string content of the <span class="fixedwidth">Resource</span> 
1453                 element. Otherwise evaluates to <span class="fixedwidth">FALSE</span>.</p>
1454             </blockquote>
1455             </li>
1456             <li><span class="fixedwidth">
1457             urn:mace:shibboleth:arp:matchFunction:regexMatch </span>
1458             <blockquote>
1459                 <p>May be used with both the <span class="fixedwidth">Requester</span> 
1460                 and <span class="fixedwidth">Resource</span> elements.</p>
1461                 <p>Evaluates to <span class="fixedwidth">TRUE</span> when the 
1462                 name of the requesting SHAR or the requested URL tree is a valid 
1463                 match of the regular expression represented as the content of 
1464                 the containing element. Otherwise evaluates to
1465                 <span class="fixedwidth">FALSE</span>. Regular expressions are 
1466                 evaluated in accordance with the the
1467                 <a href="http://java.sun.com/j2se/1.4/docs/api/java/util/%20%20%20%20%20%20%20%20%20%20%20%20%20%20regex/Pattern.html#sum">
1468                 Java 1.4 Pattern API</a>.</p>
1469             </blockquote>
1470             </li>
1471         </ul>
1472     </blockquote>
1473     <p>The <span class="fixedwidth">Attribute</span> element:</p>
1474     <blockquote>
1475         <p>The <span class="fixedwidth">Attribute</span> element must always 
1476         specify the URN of the attribute whose release parameters it specifies. 
1477         Additionally, it must contain either the <span class="fixedwidth">
1478         AnyValue</span> element or one or more <span class="fixedwidth">Value</span> 
1479         elements. These elements, in turn, must specify either
1480         <span class="fixedwidth">release</span> = <span class="fixedwidth">
1481         permit</span> or <span class="fixedwidth">deny</span>. The
1482         <span class="fixedwidth">Value</span> element must then contain one 
1483         value for which the rule applies. Examples:</p>
1484         <blockquote>
1485             <p><span class="fixedwidth">&lt;Attribute name=&quot;urn:mace:dir:attribute-def:eduPersonPrincipalName&quot;&gt;<br>
1486             &nbsp;&nbsp;&lt;AnyValue release=&quot;Permit&quot;&gt;<br>
1487             &lt;/Attribute&gt;<br>
1488             </span><br>
1489             </p>
1490             <p>Permits the release of <span class="fixedwidth">
1491             eduPersonPrincipalName</span> with any value.</p>
1492         </blockquote>
1493         <blockquote>
1494             <p><span class="fixedwidth">&lt;Attribute name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;&gt;<br>
1495             &nbsp;&nbsp;&lt;Value release=&quot;deny&quot;&gt;member@example.edu&lt;/Value&gt;<br>
1496             &lt;/Attribute&gt;<br>
1497             </span><br>
1498             </p>
1499             <p>Denies the release of <span class="fixedwidth">
1500             eduPersonScopedAffiliation</span> value <span class="fixedwidth">
1501             member@example.edu</span>. Other values of the attribute may still 
1502             be released if so specified by a <span class="fixedwidth">permit</span> 
1503             ARP.</p>
1504         </blockquote>
1505     </blockquote>
1506     <!-- ##To be included in future releases.  Not yet implemented.
1507       
1508       <p>There is also a special <span class="fixedwidth">AttributeIdentifier</span>
1509       element that allows internal references to an attribute
1510       within an ARP.  This is useful for quickly applying multiple
1511       rules to the same target.  It is used as follows:</p>
1512
1513         <blockquote>
1514           <span class="fixedwidth">
1515           &nbsp;&nbsp;&lt;Rule&gt;<br>
1516           
1517           &nbsp;&nbsp;&nbsp;&nbsp;&lt;Target&gt;<br>
1518           
1519           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;AnyTarget/&gt;<br>
1520           
1521           &nbsp;&nbsp;&nbsp;&nbsp;&lt;/Target&gt;<br>
1522           
1523           &nbsp;&nbsp;&nbsp;&nbsp;&lt;Attribute
1524           name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;&gt;<br>
1525
1526           &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Value
1527           release=&quot;permit&quot;&gt;member@example.edu&lt;/Value
1528           &gt;<br>
1529
1530           &nbsp;&nbsp;&nbsp;&nbsp;&lt;/Attribute&gt;<br>
1531           
1532           &nbsp;&nbsp;&lt;/Rule&gt;<br>
1533           
1534           &nbsp;&nbsp;&lt;AttributeReference identifier=&quot;http://www.example.edu/attributes/attribute1&quot;&gt;<br>
1535
1536           &nbsp;&nbsp;&lt;Attribute name=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot; identifier=&quot;http://www.example.edu/attributes/attribute1&quot;&gt;<br>
1537
1538           &nbsp;&nbsp;&nbsp;&nbsp;&lt;Value release=&quot;permit&quot;&gt;student@example.edu&lt;Value&gt;<br>
1539
1540           &nbsp;&nbsp;&lt;/Attribute&gt;<br>
1541           </span>
1542       -->
1543 </blockquote>
1544 <h4><a name="5.c."></a>5.c. Sharing certificate/key pairs between Apache and 
1545 Java keystores <font color="#5555EE">(optional)</font></h4>
1546 <blockquote>
1547     <blockquote>
1548         <p>The JDK includes the command line program <span class="fixedwidth">
1549         keytool</span> for managing Java keystores. This utility cannot import 
1550         or export private key information, making it difficult to use the same 
1551         private key and certificate for Apache and Java-based applications. The 
1552         Shibboleth distribution includes <span class="fixedwidth">extkeytool</span>, 
1553         a program that can be used in conjunction with <span class="fixedwidth">
1554         keytool</span> to perform these tasks. Select the appropriate 
1555         step-by-step procedure for your situation from the following guides.</p>
1556         <p>Before running <span class="fixedwidth">extkeytool</span>, the 
1557         variable SHIB_HOME must be set to the path to the directory where the 
1558         Shibboleth tarball was exploded(typically /opt/shibboleth-origin-1.1/).</p>
1559         <p><b>If you have a pre-exiting RSA key/certificate combination in a 
1560         keystore and you would like to use it with Apache:</b></p>
1561         <ol type="1">
1562             <li>Determine the alias of the keystore keyEntry containing the key 
1563             you would like to use in your Apache setup. Assuming that your 
1564             keystore is named <span class="fixedwidth">yourstore</span>, the 
1565             following command should present a list of the entries in the 
1566             keystore.<blockquote>
1567                 <p><span class="fixedwidth">$ keytool -list -v -keystore 
1568                 yourstore</span></p>
1569             </blockquote>
1570             </li>
1571             <li>Assuming that you identified the appropriate alias as
1572             <span class="fixedwidth">youralias</span> and the password for the 
1573             keystore is <span class="fixedwidth">yourpass</span>, enter the 
1574             following command to export the key in Base64-encoded pkcs8 format.<blockquote>
1575                 <p><span class="fixedwidth">$ extkeytool -exportkey -keystore 
1576                 yourstore -alias youralias -storepass yourpass -rfc -file 
1577                 yourkey.pkcs8</span></p>
1578             </blockquote>
1579             </li>
1580             <li>In order to use this key with Apache, you must convert it to PEM-encoded 
1581             RSA native format. You have the option of storing the key 
1582             unencrypted or encrypted:<ol type="A">
1583                 <li>To use the unencrypted format, enter the following command 
1584                 for the conversion:<blockquote>
1585                     <p><span class="fixedwidth">$ openssl pkcs8 -in 
1586                     yourkey.pkcs8 -nocrypt|openssl rsa -out yourkey.key</span></p>
1587                 </blockquote>
1588                 </li>
1589                 <li>To use the encrypted format, enter the following command for 
1590                 the conversion:<blockquote>
1591                     <p><span class="fixedwidth">$ openssl pkcs8 -in 
1592                     yourkey.pkcs8 -nocrypt|openssl rsa -des3 -out yourkey.enckey</span></p>
1593                 </blockquote>
1594                 </li>
1595             </ol>
1596             </li>
1597             <li>The following command will export the corresponding certificate.<blockquote>
1598                 <p><span class="fixedwidth">$ keytool -export -keystore 
1599                 yourstore -alias youralias -rfc -file yourcert</span></p>
1600             </blockquote>
1601             </li>
1602             <li>Set the <span class="fixedwidth">mod_ssl</span>
1603             <span class="fixedwidth">SSLCertificateKeyFile</span> and
1604             <span class="fixedwidth">SSLCertificateFile</span> directives to 
1605             point to the two files you have just created. Take care to remove 
1606             any temporary files you created (i.e. <span class="fixedwidth">
1607             yourkey.pkcs8</span>) and set appropriate file permissions, 
1608             especially if you chose to store the key in an unencrypted format.</li>
1609         </ol>
1610         <p><b>If you have a pre-existing RSA key/certificate combination that 
1611         you use with Apache and would like to import it into a java keystore:</b></p>
1612         <ol type="1">
1613             <li>Convert the private key to unencrypted DER-encoded pkcs8 format. 
1614             Assuming your PEM-encoded key is stored in a file named
1615             <span class="fixedwidth">yourkey.enckey</span>, enter the following 
1616             command.<blockquote>
1617                 <p><span class="fixedwidth">$ openssl pkcs8 -in yourkey.enckey 
1618                 -topk8 -nocrypt -outform DER -out yourkey.der.pkcs8</span></p>
1619             </blockquote>
1620             </li>
1621             <li>Create a certificate bundle file. This file should include a 
1622             series of PEM-encoded X509 certificates representing a complete 
1623             trust chain, from the root CA certificate to the certificate that 
1624             matches your private key. If your certificate is stored in a file 
1625             named <span class="fixedwidth">mycert</span> and the CA signer 
1626             certificate is stored in a file named <span class="fixedwidth">
1627             ca.cert</span>, you might enter the following command to create the 
1628             bundle.<blockquote>
1629                 <p><span class="fixedwidth">$ cat mycert ca.cert &gt; cert.bundle</span></p>
1630             </blockquote>
1631             <p><b>Note: <span class="fixedwidth">mod_ssl</span>-enabled Apache 
1632             installations include a number of commonly recognized CA 
1633             certificates in the <span class="fixedwidth">ca-bundle.crt</span> 
1634             file under the <span class="fixedwidth">$ServerRoot/conf/ssl.crt/</span> 
1635             directory.</b> </li>
1636             <li>Import the key and certificate into the keystore. Assuming you 
1637             have already created a keystore named <span class="fixedwidth">
1638             yourstore</span> with a password of of <span class="fixedwidth">
1639             yourpass</span>, enter the following command to store the data under 
1640             the alias <span class="fixedwidth">youralias</span>.<blockquote>
1641                 <p><span class="fixedwidth">$ ./extkeytool -importkey -keystore 
1642                 yourstore -alias youralias -storepass yourpass -keyfile 
1643                 yourkey.der.pkcs8 -certfile cert.bundle -provider 
1644                 org.bouncycastle.jce.provider.BouncyCastleProvider</span></p>
1645             </blockquote>
1646             </li>
1647             <li>You can verify that the import was successful by listing entry. 
1648             Use the command below.<blockquote>
1649                 <p><span class="fixedwidth">$ keytool -list -v -keystore 
1650                 yourstore -alias youralias</span></p>
1651             </blockquote>
1652             </li>
1653             <li>Remember to delete <span class="fixedwidth">yourkey.der.pkcs8</span>, 
1654             as it contains your unencrypted private key.</li>
1655         </ol>
1656         <p><b>If you are starting from scratch and do not yet have a 
1657         certificate/key pair:</b></p>
1658         <ol type="1">
1659             <li>Generate an RSA private key. Use the command below, substituting
1660             <span class="fixedwidth">yourkey</span> with an appropriate name to 
1661             use to refer to the key.<blockquote>
1662                 <p><span class="fixedwidth">$ openssl genrsa -des3 -out 
1663                 yourkey.enckey 1024</span></p>
1664             </blockquote>
1665             </li>
1666             <li>The following command generates a Certificate Signing Request, 
1667             which should be communicated to a Certificate Authority.<blockquote>
1668                 <p><span class="fixedwidth">$ openssl req -new -key 
1669                 yourkey.enckey</span></p>
1670             </blockquote>
1671             </li>
1672             <li>The Certificate Authority should respond with a PEM-encoded X509 
1673             certificate. Set the <span class="fixedwidth">mod_ssl</span>
1674             <span class="fixedwidth">SSLCertificateKeyFile</span> directive to 
1675             point to the key file you just created and the
1676             <span class="fixedwidth">SSLCertificateFile</span> directive to 
1677             point to file containing the certificate issued by the Certificate 
1678             Authority. Previous sections explaion how to share the 
1679             key/certificate pair with a Java keystore.</li>
1680         </ol>
1681     </blockquote>
1682 </blockquote>
1683 <p><br>
1684 </p>
1685 <h4><a name="5.d."></a>5.d. The Attribute Resolver</h4>
1686 <blockquote>
1687     <p>Shibboleth provides a powerful attribute resolver that allows origins to 
1688     quickly configure the retrieval of simple attributes from standard types of 
1689     attribute stores. The resolver is configured using an xml file wich should 
1690     be pointed to with the <span class="fixedwidth">
1691     edu.internet2.middleware.shibboleth.aa. 
1692     attrresolv.AttributeResolver.ResolverConfig</span> propety in
1693     <span class="fixedwidth">origin.properties</span> as described in section
1694     <a href="#4.a.">4.a</a>. For more complex attributes or those that require 
1695     processing before release, customized Java classes will need to be written. 
1696     For more information, consult the programmer&#39;s guide.</p>
1697     <p>The resolver is essentially a directed graph from attribute definitions 
1698     to data connectors. The data connectors pull data, in the form of 
1699     attributes, from external data sources. The attribute definitions then 
1700     process this data into a from suitable for use by Shibboleth. This procedure 
1701     can be as simple as taking an unmodified string value from a data connector 
1702     and tagging it with a name or can include arbitrarily complex business 
1703     rules.</p>
1704     <p>The <span class="fixedwidth">resolver.xml</span> file that is pointed to 
1705     by <span class="fixedwidth">origin.properties</span> consists of zero or 
1706     more attribute definitions followed by zero or more data connectors. Each 
1707     attribute definition consists of an identifier corresponding to the URN of 
1708     the attribute, and optional references to data connectors on which it 
1709     depends. Each data connector consists of a string identifier which is used 
1710     by attribute definitions that refer to it, and one or more elements specific 
1711     to the configuration of that data connector.</p>
1712     <p>Shibboleth comes with two attribute definitions provided in version 1.1: 
1713     the <span class="fixedwidth">SimpleAttributeDefinition</span>, which acts as 
1714     a basic proxy for attributes supplied by data connectors with some name 
1715     conversion and attribute scoping added, and a <span class="fixedwidth">
1716     CustomAttributeDefinition</span>, which can be used to configure 
1717     user-created attribute definition plugins. Similarly, Shibboleth 1.1 comes 
1718     with two data connectors: the <span class="fixedwidth">
1719     JNDIDirectoryDataConnector</span>, which pulls data from any source for 
1720     which there is a JNDI Directory Context implementation, including LDAP, NDS, 
1721     etc., and the <span class="fixedwidth">CustomDataConnector</span>, which is 
1722     used to configure user-created data connector plugins.</p>
1723     <p>A detailed explanation of each configuration option for the provided 
1724     connectors follows:</p>
1725     <p><span class="fixedwidth">JNDIDirectoryDataConnector</span>:</p>
1726     <dl>
1727         <dd class="attribute"><span class="fixedwidth">id = &lt;string&gt;</span> </dd>
1728         <dd class="value">Specifies a unique, textual name for the connector 
1729         used by attribute definitions to refer to and use it to build 
1730         attributes. Contained within the <span class="fixedwidth">
1731         JNDIDirectoryDataConnector</span> element.</dd>
1732         <dd class="attribute"><span class="fixedwidth">&lt;Property name=&quot;&lt;name&gt;&quot; 
1733         value=&quot;&lt;value&gt;&quot;/&gt;</span> </dd>
1734         <dd class="value">An element of the element <span class="fixedwidth">
1735         JNDIDirectoryDataConnector</span>. Specifies a set of name/value pairs 
1736         that are used to configure the JNDI Directory Context. This list of 
1737         name/value pairs is defined by the context itself, but is specified 
1738         within <span class="fixedwidth">resolver.xml</span>. Refer to the
1739         <a href="http://http://marsalis.internet2.edu/cgi-bin/viewcvs.cgi%20%20%20%20%20%20%20%20%20%20/shibboleth/java/src/conf/resolver.ldap.xml">
1740         Shibboleth CVS</a> for an example of names and values used to connect to 
1741         an LDAP directory.</dd>
1742         <dd class="attributeopt"><span class="fixedwidth">&lt;Search&gt;</span> </dd>
1743         <dd class="valueopt">An element of the element <span class="fixedwidth">
1744         JNDIDirectoryDataConnector</span>. This element defines the DN filter 
1745         used to perform the LDAP search. The search string must return no more 
1746         than one result.</dd>
1747         <dd class="attributeopt"><span class="fixedwidth">&lt;Controls&gt;</span> </dd>
1748         <dd class="valueopt">An element of the element <span class="fixedwidth">
1749         Search</span>. This element grants some fine-grained control over the 
1750         LDAP API calls.</dd>
1751         <dd class="attributeopt"><span class="fixedwidth">&lt;cacheTime 
1752         &quot;&lt;seconds&gt;&quot;/&gt;</span> </dd>
1753         <dd class="valueopt">An element of the element <span class="fixedwidth">
1754         JNDIDirectoryDataConnector</span>. Specifies an optional duration in
1755         <span class="fixedwidth">seconds</span> for which the attribute resolver 
1756         may cache information retrieved from this connector.</dd>
1757     </dl>
1758     <p>A representation of a properly constructed <span class="fixedwidth">
1759     JNDIDirectoryDataConnector</span> element would look like:</p>
1760     <blockquote>
1761         <p><span class="fixedwidth">&lt;JNDIDirectoryDataConnector id=&quot;directory&quot;&gt;<br>
1762         &nbsp;&nbsp;&lt;Search filter=&quot;cn=%PRINCIPAL%&quot;&gt;<br>
1763         &nbsp;&nbsp;&nbsp;&nbsp;&lt;Controls searchScope=&quot;SUBTREE_SCOPE&quot; returningObjects=&quot;false&quot; /&gt;<br>
1764         &nbsp;&nbsp;&lt;/Search&gt;<br>
1765         &nbsp;&nbsp;&lt;Property name=&quot;java.naming.factory.initial&quot; value=&quot;com.sun.jndi.ldap.LdapCtxFactory&quot; 
1766         /&gt;<br>
1767         &nbsp;&nbsp;&lt;cacheTime=&quot;2400&quot;/&gt;<br>
1768         &lt;/JNDIDirectoryDataConnector&gt; </span></p>
1769     </blockquote>
1770     <p><span class="fixedwidth">SimpleAttributeDefinition</span>:</p>
1771     <dl>
1772         <dd class="attribute"><span class="fixedwidth">id = &lt;string&gt;</span> </dd>
1773         <dd class="value">Specifies a unique, textual name for the attribute 
1774         which is used as the attribute&#39;s name when it is sent over the wire by 
1775         Shibboleth. Contained within the <span class="fixedwidth">
1776         SimpleAttributeDefinition</span> element.</dd>
1777         <dd class="attributeopt"><span class="fixedwidth">&lt;AttributeDependency / 
1778         DataConnectorDependency requires=&quot;&lt;id&gt;&quot;/&gt;</span> </dd>
1779         <dd class="valueopt">An element of the element <span class="fixedwidth">
1780         SimpleAttributeDefinition</span>, which may contain 0 or more of either
1781         <span class="fixedwidth">AttributeDependency</span> or
1782         <span class="fixedwidth">DataConnectorDependency</span>. These specify 
1783         attributes and data connectors that can be utilized by this attribute 
1784         definition. Each of these elements must contain a
1785         <span class="fixedwidth">requires</span> statement which this attribute 
1786         definition can then use to build its value.</dd>
1787         <dd class="attributeopt"><span class="fixedwidth">smartScope = 
1788         &quot;&lt;domain&gt;&quot;</span> </dd>
1789         <dd class="valueopt">Specifes a domain scope to be attached to the 
1790         attribute. If the value of the attribute as retrieved from the data 
1791         connector includes a pre-existing scope (<span class="fixedwidth">bob@foo.edu</span>), 
1792         that scope is used instead. Contained within the
1793         <span class="fixedwidth">SimpleAttributeDefinition</span> element.</dd>
1794         <dd class="attributeopt"><span class="fixedwidth">sourceName = 
1795         &quot;&lt;string&gt;&quot;</span> </dd>
1796         <dd class="valueopt">Specifies a different source attribute name to be 
1797         used in calls to the data connector, while the name on the wire will be 
1798         the specified <span class="fixedwidth">id</span>. This would be useful 
1799         to send a local UniversityID attribute as eduPersonPrincipalName. If not 
1800         supplied, the connector tokenizes the <span class="fixedwidth">id</span> 
1801         field and uses the section following the <span class="fixedwidth">#</span> 
1802         to query data connectors. Contained within the <span class="fixedwidth">
1803         SimpleAttributeDefinition</span> element.</dd>
1804         <dd class="attributeopt"><span class="fixedwidth">&lt;cacheTime 
1805         &quot;&lt;seconds&gt;&quot;/&gt;</span> </dd>
1806         <dd class="valueopt">An element of the element <span class="fixedwidth">
1807         SimpleAttributeDefinition</span>. Specifies an optional duration in
1808         <span class="fixedwidth">seconds</span> for which the attribute resolver 
1809         may cache this attribute for use in additional assertions.</dd>
1810         <dd class="attributeopt"><span class="fixedwidth">&lt;lifeTime 
1811         &quot;&lt;seconds&gt;&quot;/&gt;</span> </dd>
1812         <dd class="valueopt">An element of the element <span class="fixedwidth">
1813         SimpleAttributeDefinition</span>. Specifies in the attribute assertion 
1814         how long the attribute should be cached and retained by the target upon 
1815         receipt. Federations and trust agreements may have some bearing on the 
1816         population and use of this field.</dd>
1817     </dl>
1818     <p>A representation of a properly constructed <span class="fixedwidth">
1819     SimpleAttributeDefinition</span> element would look like:</p>
1820     <blockquote>
1821         <p><span class="fixedwidth">&lt;SimpleAttributeDefinition id=&quot;urn:mace:dir:attribute-def:eduPersonPrincipalName&quot; 
1822         smartScope=&quot;shibdev.edu&quot; sourceName=&quot;universityPerson&quot;&gt;<br>
1823         &nbsp;&nbsp;&lt;DataConnectorDependency requires=&quot;dataConnector&quot;/&gt;<br>
1824         &nbsp;&nbsp;&lt;AttributeDependency requires=&quot;urn:mace:dir:attribute-def:eduPersonScopedAffiliation&quot;/&gt;<br>
1825         &nbsp;&nbsp;&lt;cacheTime=&quot;600&quot;/&gt;&lt;br&gt;<br>
1826         &nbsp;&nbsp;&lt;lifeTime=&quot;3600&quot;/&gt;&lt;br&gt;<br>
1827         &lt;/SimpleAttributeDefinition&gt; </span></p>
1828     </blockquote>
1829     <p>A properly formed <span class="fixedwidth">resolver.xml</span> file to 
1830     automatically generate a simple response for EPPN may take the form:</p>
1831     <blockquote>
1832         <p><span class="fixedwidth">&lt;AttributeResolver xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
1833         xmlns=&quot;urn:mace:shibboleth:resolver:1.0&quot; xsi:schemaLocation=&quot;urn:mace:shibboleth:resolver:1.0 
1834         shibboleth-resolver-1.0.xsd&quot;&gt;<br>
1835         <br>
1836         &nbsp;&nbsp;&lt;SimpleAttributeDefinition id=&quot;urn:mace:dir:attribute-def:eduPersonPrincipalName&quot; 
1837         smartScope=&quot;shibdev.edu&quot;&gt;<br>
1838         &nbsp;&nbsp;&nbsp;&nbsp;&lt;DataConnectorDependency requires=&quot;echo&quot;/&gt;<br>
1839         &nbsp;&nbsp;&lt;/SimpleAttributeDefinition&gt;<br>
1840         <br>
1841         &nbsp;&nbsp;&lt;CustomDataConnector id=&quot;echo&quot; 
1842         class=&quot;edu.internet2.middleware.shibboleth.aa.attrresolv.provider.SampleConnector&quot; 
1843         /&gt;<br>
1844         &lt;/AttributeResolver&gt; </span></p>
1845     </blockquote>
1846     <p>There are additional examples of <span class="fixedwidth">resolver.xml</span> 
1847     files provided in the
1848     <a href="http://marsalis.internet2.edu/cgi-bin/viewcvs.cgi/shibboleth/java/src/conf/">
1849     Shibboleth CVS</a>.</p>
1850 </blockquote>
1851 <p><br>
1852 </p>
1853 <h4><a name="5.d.i."></a>5.d.i <span class="fixedwidth">resolvertest</span></h4>
1854 <blockquote>
1855     <p>Shibboleth comes bundled with the command line utility
1856     <span class="fixedwidth">resolvertest</span> for testing Attribute Resolver 
1857     configurations. This program takes as input <span class="fixedwidth">
1858     resolver.xml</span>, the name of a user, and optionally the name of a 
1859     requesting SHAR. It outputs the resulting SAML &lt;Attribute /&gt; elements. This 
1860     allows administrators to view the results of tweaking the resolver 
1861     configuration without having to continually reload the origin web 
1862     application. Initially, the following two steps must be performed:</p>
1863     <ol>
1864         <li>Set the shell variable <span class="fixedwidth">SHIB_HOME</span> to 
1865         the directory path where the Shibboleth tarball was exploded (typically
1866         <span class="fixedwidth">/opt/shibboleth-origin-1.1/</span>).</li>
1867         <li>Move to $SHIB_HOME/bin</li>
1868     </ol>
1869     <p><span class="fixedwidth">resolvertest</span> may then be used by 
1870     executing the shell script, passing the name of a user and a URL to the 
1871     Attribute Resolver configuration file as parameters. For example:</p>
1872     <blockquote>
1873         <p><span class="fixedwidth">$ ./resolvertest --user=wassa 
1874         --file=file:///$SHIB_HOME/src/conf/resolver.xml</span></p>
1875     </blockquote>
1876     <h5>NOTE: This program does not filter the resulting attributes through the 
1877     applicable ARP&#39;s. Although it does show the attributes generated by the 
1878     resolver for a particular user or URL, it does not necessarily reflect what 
1879     will be released by the AA to a requesting SHAR.</h5>
1880 </blockquote>
1881 <p><br>
1882 </p>
1883 <h4><a name="5.e."></a>5.e. Local Error Page</h4>
1884 <blockquote>
1885     <p>Origin sites are encouraged to provide federations with the URL of a 
1886     local Shibboleth error page. If a browser user from the origin site 
1887     encounters a problem at a shibbolized target, the target is likely to 
1888     display an error page that includes a link back to this origin provided 
1889     page.</p>
1890     <p>The page should provide information on how to obtain local support for 
1891     using Shibbolized resources. It might also include suggestions on what 
1892     information should be recorded before beginning the problem resolution 
1893     process.</p>
1894 </blockquote>
1895 <p><br>
1896 <br>
1897 </p>
1898 <hr>
1899 <p><br>
1900 </p>
1901 <h3><a name="6."></a>6. Troubleshooting</h3>
1902 <p>This section provides basic information about testing, logging, and error 
1903 handling for Shibboleth origins. This information is not intended to be 
1904 comprehensive, but instead rudimentary guidelines for basic configuration tests 
1905 and problems. For more detailed information or answers to specific problems not 
1906 addressed in this section, please mail
1907 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a> 
1908 with a thorough description of errors and configurations used.</p>
1909 <h4><a name="6.a."></a>6.a. Basic Testing</h4>
1910 <blockquote>
1911     <p>Internet2 provides a basic target that can be used to test origin setup 
1912     functionality. After your origin is recognized by InQueue, simply use any 
1913     browser to access <a href="https://wayf.internet2.edu/InQueue/sample.jsp">
1914     https://wayf.internet2.edu/InQueue/sample.jsp</a>. Select your origin&#39;s name 
1915     and follow the login process as a user would. Note that SSL must be used, 
1916     and both the HS and AA must be fully configured.</p>
1917     <p>The test target will then display a simple page which includes the basic 
1918     information sent to it by your origin and the authentication rules it is 
1919     using.</p>
1920     <p><b>For information regarding specific error messages that may be 
1921     generated if the origin does not work successfully, please refer to section
1922     <a href="#6.c.">6.c</a>.</b></p>
1923 </blockquote>
1924 <h4><a name="6.b."></a>6.b. Logging</h4>
1925 <blockquote>
1926     <p>Shibboleth&#39;s origin components log various operations which may prove 
1927     useful for auditing, testing, and security purposes. This data is sent 
1928     through <span class="fixedwidth">log4j</span>&#39;s standard mechanism. The 
1929     location of the log file, the level at which the log is output, the 
1930     formatting of the logs, and many more options may be configured by editing
1931     <span class="fixedwidth">/WEB-INF/classes/conf/log4j.properties</span>. By 
1932     default, it is setup to log to the console of the servlet container, with a 
1933     level of <span class="fixedwidth">WARN</span>, but there is also a commented 
1934     out example in the file to give a possible alternate configuration.</p>
1935 </blockquote>
1936 <h4><a name="6.c."></a>6.c. Common Problems</h4>
1937 <blockquote>
1938     <p>A knowledge base is being developed in the
1939     <a href="http://www.columbia.edu/~wassa/shib.faq/shibboleth-faq.html">
1940     Shibboleth Deployer&#39;s FAQ</a>. Please mail
1941     <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@ 
1942     internet2.edu</a> with any additional questions or problems encountered that 
1943     are not answered by this basic guide.</p>
1944 </blockquote>
1945
1946 </body>
1947
1948 </html>