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