1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 <meta name="generator" content=
6 "HTML Tidy for Mac OS X (vers 1st January 2002), see www.w3.org">
8 <title>Shibboleth Origin Deployment Guide</title>
9 <meta http-equiv="Content-Type" content=
10 "text/html; charset=utf-8">
11 <style type="text/css">
15 background-color: #FFFFFF;
33 background-color: #DDDDDD;
34 background-image: none;
38 border-bottom-width: 2px;
39 border-top-width: 2px;
40 border-left-width: 2px;
41 border-right-width: 2px;
45 background-color: #DDDDDD;
46 background-image: none;
52 background-color: #DDDDDD;
53 background-image: none;
62 background-color: #DDDDDD;
63 border: 1px black inset;
64 background-image: none;
72 background-color: #EEEEEE;
73 background-image: none;
75 padding-bottom: 0.5em;
79 border-bottom-width: none;
80 border-top-width: none;
81 border-left-width: 1px;
82 border-right-width: 1px;
89 background-color: #BCBCEE;
90 border: 1px black inset;
91 background-image: none;
99 background-color: #DDDDFF;
100 background-image: none;
102 padding-bottom: 0.5em;
106 border-bottom-width: none;
107 border-top-width: none;
108 border-left-width: 1px;
109 border-right-width: 1px;
116 background-color: #DDDDDD;
117 border: 1px black inset;
118 background-image: none;
127 background-color: #BCBCEE;
128 border: 1px black inset;
129 background-image: none;
135 background-color: #EEEEEE;
140 font-family: monospace;
148 <body link="red" vlink="red" alink="black" bgcolor="white">
150 <h2>Shibboleth Origin Deployment Guide</h2>
152 Shibboleth Origin Deployment Guide<br>
153 Shibboleth Version 1.1<br>
155 <h3>This version of the deploy guide is for Shibboleth v1.1. For documentation
156 related to prior versions of Shibboleth, please consult the appropriate branch
157 in the Shibboleth CVS.</h3>
158 <h3>Federations have been abstracted out from the Shibboleth documentation. For
159 further information on using Shibboleth in a federation, refer to the federation
161 <p>Shibboleth v1.1 is stable and secure enough to deploy in production
162 scenarios. It is backward compatible with 1.0 in all respects, including
163 configuration, but some older commands have been deprecated or replaced.</p>
164 <p>Features and changes specific to 1.1 are marked with <span class="feature">
166 <h4>Major New Features in 1.0 and 1.1</h4>
167 <p>This new release contains several improvements and enhancements, including:
169 <h5>Federation Support</h5>
171 <li>Federation and trust support has been substantially extended. Federation
172 structures are now defined. The set of metadata collected and managed by
173 each Federation is more fully defined. The configuration values assigned by
174 a Federation are now identified. </li>
175 <li>There is some support for targets to be members of multiple federations;
176 this support will continue to evolve. When a browser user arrives, a target
177 will determine which federation their origin belongs to, and then use the
178 trust fabric associated with that Federation.</li>
179 <li>Better support for flexible and bilateral trust agreements. A key
180 specific to an origin site can be used to vallidate its signature.</li>
181 <li>This version contains a significantly more mature security
182 implementation, and should meet the security requirements of typical sites.</li>
186 <li>The Attribute Authority has a powerful new attribute resolver. Simple
187 scenarios (using a string attribute stored in ldap) can be accomplished by
188 merely editing a configuration file. Java classes may still be written for
189 more complex evaluations (eg retrieving information from multiple disparate
190 repositories, and computing the SAML attribute using business rules). This
191 should greatly simplify the process of configuring the AA to support
192 additional general attributes.</li>
193 <li>Support for a runtime-derived per-requester persistent identifier
194 attribute to support anonymous personalization by targets has been added via
195 an attribute plugin. <span class="feature">[1.1]</span></li>
196 <li>Specialized sites without privacy needs can configure identity-based
197 handles interoperable with other SAML deployments. <span class="feature">
202 <li>Significantly more flexibility in configuring targets to ensure
203 robustness. Failover and redundant configurations are now supported.</li>
204 <li>The SHAR may now optionally store its session and attribute cache in a
205 back-end database in addition to the previously available in-memory option.
206 This would allow a site to run an apache server farm, with multiple SHARs,
207 supporting the same set of sessions.</li>
208 <li>Federation supplied files (sites.xml and trust.xml) are now refreshed in
209 a much more robust manner. </li>
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>
241 <p>Before starting, please sign up for all applicable <a href=
242 "http://shibboleth.internet2.edu/shib-misc.html#mailinglist">
243 mailing lists</a>. Announcements pertinent to Shibboleth
244 deployments and developments and resources for deployment
245 assistance can be found here.</p>
247 <p>Please send any questions, concerns, or eventual confusion
249 "mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.
250 This should include, but not be limited to, questions about the
251 documentation, undocumented problems, installation or
252 operational issues, and anything else that arises. Please
253 ensure that you have the <a href=
254 "http://shibboleth.internet2.edu/release/shib-download.html">appropriate
255 .tarball</a> for your operating system.</p>
262 <h3><a name="TOC"></a>Shibboleth Origin -- Table of
269 <h4><a href="#1."><font color="black">Shibboleth
270 Overview</font></a></h4>
273 <li><a href="#1.a."><font color=
274 "black">Origin</font></a></li>
276 <li><a href="#1.b."><font color=
277 "black">Target</font></a></li>
279 <li><a href="#1.c."><font color=
280 "black">WAYF</font></a></li>
282 <li><a href="#1.d."><font color=
283 "black">Federations</font></a></li>
288 <h4><a href="#2."><font color=
289 "black">Planning</font></a></h4>
292 <li><a href="#2.a."><font color=
293 "black">Requirements</font></a></li>
295 <li><a href="#2.b."><font color="black">Join a
296 Federation</font></a></li>
298 <li><a href="#2.c."><font color="black">Security
299 Considerations</font></a></li>
301 <li><a href="#2.d."><font color="black">Server
302 Certs</font></a></li>
304 <li><a href="#2.e."><font color="black">Attribute Release
305 Policies</font></a></li>
307 <li><a href="#2.f."><font color="black">Designate
308 Contacts</font></a></li>
310 <li><a href="#2.g."><font color="black">Browser
311 Requirements</font></a></li>
313 <li><a href="#2.h."><font color=
314 "black">Clocks</font></a></li>
316 <li><a href="#2.i."><font color="black">Other
317 Considerations</font></a></li>
322 <h4><a href="#3."><font color=
323 "black">Installation</font></a></h4>
326 <li><a href="#3.a."><font color="black">Software
327 Requirements</font></a></li>
329 <li><a href="#3.b."><font color="black">Deploy HS and
336 <h4><a href="#4."><font color="black">Getting
337 Running</font></a></h4>
340 <li><a href="#4.a."><font color="black">Basic
341 Configuration</font></a>
343 <li><a href="#4.a.i"><font color="black">Modifying
344 the default Attribute Resolver configuration</font></a></li>
348 <a href="#4.b."><font color="black">Key Generation and
349 Certificate Installation</font></a>
353 <li><a href="#4.c."><font color="black">Linking the
354 Authentication System to the HS</font></a>
357 <li><a href="#4.c.i."><font color="black">Enabling client
358 certificate authentication</font> <font color="#5555EE">(optional)</font></a></li>
362 <li><a href="#4.d."><font color="black">Establishing
363 default ARP's for the origin community</font></a></li>
369 <h4><a href="#5."><font color="black">Advanced
370 Configuration</font></a></h4>
373 <li><a href="#5.a."><font
374 color="black"><span class="fixedwidth">origin.properties</span></font></a></li>
376 <li><a href="#5.b."><font color="black">ARP
380 <li><a href="#5.b.i."><font color="black">ARP
381 Processing</font></a></li>
383 <li><a href="#5.b.ii."><font color="black">ARP
384 Syntax</font></a></li>
386 <li><a href="#5.c."><font color="black">Sharing
387 certificate/key pairs between Apache and Java
388 keystores</font> <font color="#5555EE">(optional)</font></a></li>
389 <li><a href="#5.d."><font color="black">The Attribute Resolver</font></a>
391 <li><a href="#5.d.i."><font color="black"><span class="fixedwidth">resolvertest</span></font></a></li>
393 <li><a href="#5.e."><font color="black">Local Error Page</font></a></li>
398 <h4><a href="#6."><font color=
399 "black">Troubleshooting</font></a></h4>
402 <li><a href="#6.a."><font color="black">Basic
403 Testing</font></a></li>
405 <li><a href="#6.b."><font color=
406 "black">Logging</font></a></li>
408 <li><a href="#6.c."><font color="black">Common
409 Problems</font></a></li>
418 <h3><a name="1."></a>1. Shibboleth Overview</h3>
420 <p>Shibboleth is a system designed to exchange attributes
421 across realms for the primary purpose of authorization. It
422 provides a secure framework for one organization to transmit
423 attributes about a web-browsing individual across security
424 domains to another institution. In the primary usage case, when
425 a user attempts to access a resource at a remote domain, the
426 user's own home security domain can send certain information
427 about that user to the target site in a trusted exchange. These
428 attributes can then be used by the resource to help determine
429 whether to grant the user access to the resource. The user may
430 have the ability to decide whether to release specific
431 attributes to certain sites by specifying personal Attribute
432 Release Policies (ARP's), effectively preserving privacy while
433 still granting access based on trusted information.</p>
435 <p>When a user first tries to access a resource protected by
436 Shibboleth, they are redirected to a service which asks the
437 user to specify the organization from which they want to
438 authenticate. If the user has not yet locally authenticated to
439 a WebISO service, the user will then be redirected to their
440 home institution's authentication system. After the user
441 authenticates, the Shibboleth components at the local
442 institution will generate a temporary reference to the user,
443 known as a handle, for the individual and send this to the
444 target site. The target site can then use the handle to ask for
445 attributes about this individual. Based on these attributes,
446 the target can decide whether or not to grant access to the
447 resource. The user may then be allowed to access the requested
450 <p>There are several controls on privacy in Shibboleth, and
451 mechanisms are provided to allow users to determine exactly
452 which information about them is released. A user's actual
453 identity isn't necessary for many access control decisions, so
454 privacy often is needlessly compromised. Instead, the resource
455 often utilizes other attributes such as faculty member or member
456 of a certain class. While these are commonly determined using
457 the identity of the user, Shibboleth provides a way to mutually
458 refer to the same principal without revealing that principal's
459 identity. Because the user is initially known to the target site
460 only by a randomly generated temporary handle, if sufficient,
461 the target site might know no more about the user than that the
462 user is a member of the origin organization. This handle should
463 never be used to decide whether or not to grant access, and is
464 intended only as a temporary reference for requesting
467 <h4><a name="1.a."></a>1.a. Origin</h4>
470 <p>There are four primary components to the origin side in
471 Shibboleth: the Attribute Authority (AA), the Handle Service
472 (HS), the directory service, and the local sign-on system
473 (SSO). The AA and HS are provided with Shibboleth, and an
474 open-source WebISO solution, Pubcookie, can be obtained from
475 www.pubcookie.org; the directory is provided by the origin
476 site. Shibboleth is able to interface with a directory
477 exporting an LDAP interface containing user attributes, and is
478 designed such that programming interfaces to other
479 repositories should be readily implemented. Shibboleth relies
480 on standard web server mechanisms to trigger local
481 authentication. A .htaccess file can be easily used to trigger
482 either the local WebISO system or the web server's own Basic
483 Auth mechanism, which will likely utilize an enterprise
484 authentication system, such as Kerberos.</p>
486 <p>From the origin site's point of view, the first contact
487 will be the redirection of a user to the handle service,
488 which will then consult the SSO system to determine whether
489 the user has already been authenticated. If not, then the
490 browser user will be asked to authenticate, and then sent
491 back to the target URL with a handle bundled in an attribute
492 assertion. Next, a request from the Shibboleth Attribute
493 Requester (SHAR) will arrive at the AA which will include the
494 previously mentioned handle. The AA then consults the ARP's
495 for the directory entry corresponding to the handle, queries
496 the directory for these attributes, and releases to the SHAR
497 all attributes the SHAR is entitled to know about that
501 <h4><a name="1.b."></a>1.b. Target</h4>
504 <p>There are three primary components to the target side in
505 Shibboleth: the Shibboleth Indexical Reference Establisher
506 (SHIRE), the Shibboleth Attribute Requester (SHAR), and the
507 resource manager (RM). An implementation of each of these is
508 included in the standard Shibboleth distribution. These
509 components are intended to run on the same web server.</p>
511 <p>From the target's point of view, a browser will hit the RM
512 with a request for a Shibboleth-protected resource. The RM
513 then allows the SHIRE to step in, which will use the WAYF to
514 acquire the name of a handle service to ask about the user.
515 The handle service (HS) will then reply with a SAML
516 authentication assertion containing a handle, which the SHIRE
517 then hands off to the SHAR. The SHAR uses the handle and the
518 supplied address of the corresponding attribute authority
519 (AA) to request all attributes it is allowed to know about
520 the handle. The SHAR performs some basic validation and
521 analysis based on attribute acceptance policies (AAP's).
522 These attributes are then handed off to the RM, which is
523 responsible for using these attributes to decide whether to
527 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
530 <p>The WAYF service can be either outsourced and operated by
531 a federation or deployed as part of the SHIRE. It is responsible
532 for allowing a user to associate themself with an institution
533 of their specification, then redirecting the user to the
534 known address for the handle service of that institution.</p>
537 <h4><a name="1.d."></a>1.d. Federations</h4>
540 <p>A Shibboleth federation provides part of the underlying trust
541 required for function of the Shibboleth architecture. A federation
542 is a group of organizations(universities, corporations,
543 content providers, etc.) who agree to exchange attributes
544 using the SAML/Shibboleth protocols and abide by a common set
545 of policies and practices. In so doing, they must implicitly
546 or explicitly agree to a common set of guidelines. Joining a
547 federation is not explicitly necessary for operation of Shibboleth,
548 but it dramatically expands the number of targets and origins
549 that can interact without defining bilateral agreements
550 between all these parties.</p>
552 <p>A federation can be created in a variety of formats and trust
553 models, but must provide a certain set of services to federation
554 members. It needs to supply a registry to process
555 applications to the federation and distribute membership
556 information to the origin and target sites. This must include
557 distribution of the PKI components necessary for trust
558 between origins and targets. There also needs to be a set of
559 agreements and best practices defined by the federation governing
560 the exchange, use, and population of attributes before and
561 after transit, and there should be a way to find information
562 on local authentication and authorization practices for federation
572 <h3><a name="2."></a>2. Planning</h3>
574 <p>There are several essential elements that must be present in
575 the environment to ensure Shibboleth functions well, both
576 political and technical. Shibboleth is entirely written in
577 Java on the origin side. These are the recommendations and
578 requirements for a successful implementation of a Shibboleth
581 <h4><a name="2.a."></a>2.a. Requirements</h4>
585 <p>A common institutional directory service should be
586 operational; Shibboleth comes with LDAP capabilities
587 built in, and the Attribute Authority has a Java API which
588 will allow specification of interfaces with legacy
589 directories. This is discussed further in <a href=
590 "#4.d.">section 4.d</a>.</p>
594 <p>A method to authenticate browser users must be in place,
595 preferably in the form of an enterprise authentication
596 service. Some form of an SSO or a WebISO service is not
597 explicitly necessary for Shibboleth; however, it is highly
598 recommended. Implementation details of this are discussed in
599 <a href="#4.c.">section 4.c</a>.</p>
603 <p>Shibboleth is known to work on Linux and Solaris, but
604 should function on any platform that has a Tomcat
609 <p>It is recommended that a web server must be deployed that
610 can host Java servlets and Tomcat, although not explicitly
611 necessary, as Tomcat can still host an origin without it.</p>
615 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
618 <p>While it is not necessary for a target or origin to join a
619 federation, doing so greatly facilitates the implementation of
620 multilateral trust relationships. Each federation will have a
621 different application process. When an origin is accepted into a
622 federation, its information is added to the sites file used by the
623 WAYF and target sites.</p>
625 <p><b>It may be necessary to join multiple federations
626 depending on the sites with whom you wish to exchange
627 attributes and the terms under which these interactions will
628 take place. An origin site exists within the context of a
629 single federation, while a single target may accept assertions
630 issued by multiple federations if they are all recognized by
631 the SHAR. If an organization wishes to be a member of
632 multiple federations, it must run a separate origin site for
633 each federation, including a separate AA and HS.</b></p>
635 <p>Attribute release and acceptance policies, the use and
636 caching of attributes, and definition of commonly traded
637 attributes are examples of specifications a federation may
638 make. For more information on federations, please refer to
639 the Deployer's Guide to Federations and the Shibboleth v1.0
640 architectural document.</p>
643 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
646 <p>Shibboleth's protocols and software have been extensively
647 engineered to provide protection against many attacks.
648 However, the most secure protocol can be compromised if it is
649 placed in an insecure environment. To ensure Shibboleth is as
650 secure as possible, there are several recommended security
651 precautions which should be in place at local sites.</p>
655 <p>SSL use is optional for origin sites. Federation guidelines
656 should be considered when determining whether to
657 implement SSL, and, in general, SSL should be used for
658 interactions with client machines to provide the
659 necessary authentication and encryption to ensure
660 protection from man-in-the-middle attacks. It is strongly
661 suggested that all password traffic or similarly
662 sensitive data should be SSL-protected. Assessment of the
663 risk tradeoff against possible performance degradation
664 should be performed for all applications.</p>
668 <p>Many other attacks can be made on the several
669 redirection steps that Shibboleth takes to complete
670 attribute transfer. The best protection against this is
671 safeguarding the WAYF service and ensuring that rogue
672 targets and origins are not used, generally by
673 development of the trust model underneath Shibboleth.
674 Shibboleth also leverages DNS for security, which is not
675 uncommon, but attacks concerning bad domain information
676 should be considered.</p>
680 <p>Information regarding origin users is generally
681 provided by the authoritative enterprise directory, and
682 the acceptance of requests from target applications can
683 be carefully restricted to ensure that all requests the
684 SHAR performs are authorized and all information the
685 origin provides is accurate. Proper security measures
686 should also be in place on directory access and
687 population(see <a href=
688 "http://www.georgetown.edu/giia/internet2/ldap-recipe/#AccessControl">
689 Access Control</a> in the <a href=
690 "http://www.georgetown.edu/giia/internet2/ldap-recipe/">LDAP
691 recipe</a> for more information). Use of plaintext
692 passwords is strongly advised against.</p>
696 <p>Server platforms should be properly secured,
697 commensurate with the level that would be expected for a
698 campus' other security services, and cookie stores on
699 client machines should be well protected.</p>
704 <h4><a name="2.d."></a>2.d. Server Certs</h4>
707 <p>In the Shibboleth architecture, the SHIRE, SHAR, HS, and AA
708 must all have various client and/or server certificates for use in
709 signing assertions and creating SSL channels. These should be
710 issued by a commonly accepted CA, which may be stipulated by some
711 Federation rules. Different federations may require the use of
715 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
718 <p>The Attribute Authority maintains a set of policies called
719 Attribute Release Policies (or ARP's) that govern the sharing
720 of user attributes with Shibboleth target sites. When a user
721 attempts to access a Shibboleth-protected resource, that
722 resource's SHAR queries the user's AA for all attributes to
723 which it is entitled. The SHAR provides its own name and the
724 URL of the resource on behalf of which it is making the
725 request. The AA finds the attributes associated with the
726 browser user, determines an "Effective ARP" for this user, and
727 then sends to the SHAR only the attributes/values allowed in
730 <p>An ARP may be thought of as a sort of filter for outbound
731 attributes; it cannot create attributes or data that aren't
732 originally present, but it can limit the attributes released
733 and the values those attributes may have when released. It
734 does not change the information in the data sources in any
737 <p>Each ARP is comprised of one or more rules that specify
738 which attributes and values may be released to a target or set
739 of targets. The assignment of rules to various targets is
740 quite flexible and includes mechanisms for specifying: that a
741 rule should affect all targets (default rule), exact SHAR
742 names for which a rule is applicable, regular expressions
743 against which SHAR names should be matched to determine if a
744 rule is applicable, URL trees for which a rule is
747 <p>For each request, an Effective ARP is determined by
748 locating all ARP's applicable to the designated user and
749 extracting each rule that matches the querying SHAR and
750 resource. Attributes and values that are specified for
751 release are included in the effective ARP, while those
752 specified for denial are blocked from release. See section <a
753 href="#5.b.i.">5.b.i</a> for details on how ARP's are
757 <p>Various ARP's may be combined in forming the Effective ARP.
758 For instance, the Site ARP is administratively maintained and
759 applies to all users for which the AA is answerable. User
760 ARP's apply to a specific user only, and can be maintained
761 either administratively or by the users themselves. All ARP's
762 are specified using the same syntax and semantics.</p>
765 <h4><a name="2.f."></a>2.f. Designate Contacts</h4>
768 <p>Since Shibboleth deals both with daily technical and
769 operational issues and also with contractual issues, a set of
770 contacts should be set up to support the user base and to
771 facilitate interactions with other Shibboleth sites and federation
772 members. It is recommended that at least technical and
773 administrative contacts be designated.</p>
776 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
779 <p>A primary Shibboleth design consideration was to require
780 very little or no modification to client machines. The only
781 requirement is that a browser is used which supports cookies,
782 redirection and SSL. Browser users will have to perform an
783 additional click to submit the authentication assertion if
784 JavaScript is not functional.</p>
787 <h4><a name="2.h."></a>2.h. Clocks</h4>
790 <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should
791 be run on all web servers. Shibboleth employs a short handle
792 issuance time to protect against replay attacks. Because of
793 this, any significant degree of clock skew can hinder the
794 ability of users to access sites successfully.</p>
797 <h4><a name="2.i."></a>2.i. Other Considerations</h4>
800 <p>Especially for higher education, there are a handful of
801 laws enacted which may have important ramifications on the
802 disclosure of personal information and attributes. Since
803 Shibboleth does not necessarily need to transmit identity, it
804 is an ideal solution for many higher education situations.
805 Nevertheless, all parties within the United States of America
806 are strongly advised to consult the <a href=
807 "http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational
808 Rights and Privacy Act of 1974(FERPA)</a>, and all other
809 relevant state and federal legislation before deploying
818 <h3><a name="3."></a>3. Installation</h3>
820 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
822 <p><b>The following requirements are primarily recommendations
823 based on the most common ways to run Shibboleth. However, the
824 origin should be able to run under any servlet container
825 supporting <span class="fixedwidth">Servlet API v2.3</span> and <span class="fixedwidth">JSP specification
831 "http://http://www.apache.org/dist/httpd/">Apache
832 1.3.26+ (<2.0)</a></li>
834 <li><a href="http://jakarta.apache.org/tomcat/">Tomcat
835 4.1.18-24 LE Java server</a></li>
838 <a href="http://java.sun.com/j2se/">Sun J2SE JDK v1.4.1_01 and above</a>
841 <p>Other versions of the JRE are not supported and are
842 known to cause errors when working with
851 <p>You may need to build mod_jk against Apache, which
852 will generally require GCC or a platform-specific C
858 An enterprise authentication mechanism
861 <p>Ideally, this will be a WebISO or SSO system such as
862 <a href= "http://pubcookie.org/">Pubcookie</a>. The
863 minimal requirement is for the web server to be able to
864 authenticate browser users and supply their identity to
865 the Handle Server.</p>
870 An enterprise directory service
873 <p>Shibboleth currently supports retrieving user
874 attribute information from an <a href=
875 "http://www.openldap.org">LDAP</a> directory. For
876 testing purposes, Shibboleth also supports a minimal
877 echo responder which will always return pre-defined
884 <h4><a name="3.b."></a>3.b. Deploy HS and AA</h4>
889 <p>Ensure you have already obtained the proper <a href=
890 "http://shibboleth.internet2.edu/release/shib-download.html">.tarball</a>.</p>
894 <p>The archive will expand into a <span class="fixedwidth">shibboleth-origin-1.0/</span>
895 directory(<span class="fixedwidth">/opt/</span> recommended).</p>
899 <p>Run the following command to move the Java files into
903 <span class="fixedwidth">cp /opt/shibboleth-origin-1.0/dist/shibboleth.war
904 /usr/local/tomcat/webapps/</span>
909 <p>Tomcat 4.1.x requires that several Java jarfiles used
910 by Shibboleth be located in a special "endorsed" folder to
911 override obsolete classes that Sun includes with their JVM.
912 To deal with this problem use the following command, adjusting
915 <span class="fixedwidth">$ cp /opt/shibboleth-origin-1.0/endorsed/*.jar /usr/local/tomcat/common/endorsed</span>
917 <p>Different versions of Tomcat or other Java servers may have
918 other locations in which to place these files or deal with this
919 problem. Refer to your application server's documentation to
920 find out how to properly endorse classes, if necessary.</p>
924 <p>Restart Tomcat, which will automatically detect that
925 there has been a new .war file added. This file will by
926 default be expanded into
927 <span class="fixedwidth">/usr/local/tomcat/webapps/shibboleth</span>.</p>
931 <p>Apache must be told to map the URL's for the
932 Shibboleth HS and AA to Tomcat. Two popular ways of doing
933 this are to include the following text directly in
934 <span class="fixedwidth">httpd.conf</span>, or to place <span class="fixedwidth">Include
935 conf/mod_jk.conf</span> in <span class="fixedwidth">httpd.conf</span>, and place
936 the following lines in
937 <span class="fixedwidth">/etc/httpd/conf/mod_jk.conf</span>:</p>
940 <span class="fixedwidth">--------- begin ---------<br>
941 <IfModule !mod_jk.c><br>
942 LoadModule jk_module libexec/mod_jk.so<br>
943 </IfModule><br>
946 "/usr/local/tomcat/conf/jk/workers.properties"<br>
947 JkLogFile "/usr/local/apache/logs/mod_jk.log"<br>
951 JkMount /shibboleth/* ajp13<br>
953 --------- end ---------</span>
958 <p>Tomcat's <span class="fixedwidth">/conf/server.xml</span>
959 ships by default with the Coyote/JK2 connector enabled, which
960 fails with Shibboleth due to the lack of support for <span
961 class="fixedwidth">REMOTE_USER</span>. This connector must be
962 commented out. Then, uncomment and modify the traditional AJP
963 1.3 connector as follows:</p>
967 <p>Add <span class="fixedwidth">address="127.0.0.1"</span> inside the
968 <span class="fixedwidth"><Ajp13Connector></span> configuration
969 element to prevent off-host access.</p>
973 <p>Add <span class="fixedwidth">tomcatAuthentication="false"</span> to the
974 <span class="fixedwidth"><Ajp13Connector></span> configuration element
975 to ensure that the user's identity is passed from
976 Apache to the servlet environment.</p>
981 <p>It is <b>strongly</b> recommended that the AA be SSL-protected to protect attributes in transit. To do so, add an appropriate location block to <span class="fixedwidth">httpd.conf</span>:</p>
982 <blockquote><span class="fixedwidth">
983 <Location /shibboleth/AA>
984 SSLVerifyClient optional
985 SSLOptions +StdEnvVars +ExportCertData
996 <h3><a name="4."></a>4. Getting Running</h3>
998 <h4><a name="4.a."></a>4.a. Basic Configuration</h4>
1001 <p><b>This section of the deploy guide specifies only the
1002 essential changes that need to be made to the configuration
1003 defaults for the origin to function successfully in a
1004 federated environment. More complex configuration will likely
1005 be required for many applications and federations; for a full
1006 description of every field in <span
1007 class="fixedwidth">origin.properties</span>, please refer to
1008 <a href="#5.a.">section 5.a</a>.</b></p>
1010 <p>The main configuration file for Shibboleth's origin side is
1012 <span class="fixedwidth">/webapps/shibboleth/WEB-INF/classes/conf/origin.properties.</span>. This file contains configuration information
1013 for the origin side in several sections. The configuration
1014 must be consistent with values elsewhere in the deployment,
1015 such as the <a href="#4.c.">HS' certificate</a> and with
1016 directory access bindings, etc., or access errors may occur.</p>
1018 <p>All pathnames are relative, and have an effective root
1020 <span class="fixedwidth">$TOMCAT_HOME/webapps/shibboleth/WEB-INF/classes/</span>. To
1021 specify files outside of the webapp, specify a full URI, such
1022 as <span class="fixedwidth">file:///usr/local/shibboleth/</span>.</p>
1025 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.issuer
1026 = <domain name></span>
1027 <blockquote>This will be, in most cases, the DNS name of the machine on which the HS runs. It must match the CN of the certificate used below.</blockquote>
1029 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.siteName
1030 = <URI></span>
1031 <blockquote>The value of this must entered as assigned by the
1032 federation used for testing or initial operation.</blockquote>
1034 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.AAUrl
1035 = <url></span>
1036 <blockquote>This will be the URL assigned the AA servlet in
1037 step <a href="#3.b.">3.b</a>. Note that this <b>must</b> be
1038 an <span class="fixedwidth">https://</span> URL in order for
1039 the AA to know which SHAR is requesting
1040 attributes.</blockquote>
1044 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePath
1045 = <pathname></span></li>
1046 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePassword
1047 = <password></span></li>
1048 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyAlias
1049 = <alias></span></li>
1050 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyPassword
1051 = <password></span></li>
1052 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.certAlias
1053 = <alias></span></li></ul>
1055 <blockquote>Respectively, the location and password of
1056 the Java keystore containing the x.509 certificate and
1057 matching private key to be used by the HS, the alias
1058 and password of the private key, and the optional
1059 certificate alias, if it differs from the key's
1062 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.AAServlet.authorityName
1063 = <domain name></span>
1065 <blockquote>Specifies the name of the AA, which is typically
1066 the domain name of the server running it.</blockquote></li>
1068 <li><span class="fixedwidth">edu.internet2.middleware.shibboleth.audiences
1069 = <URI></span>
1071 <blockquote>This section must contain the URI of the
1072 federation under which the origin will operate or test
1073 initially. This will be provided by the
1074 federation.</blockquote></li>
1079 <h4><a name="4.a.i"></a>4.a.i Modifying the default Attribute Resolver configuration</h4>
1081 <p>The resolver.xml file controls the retrieval of attributes from enterprise repositories, and the process of mapping them to Shibboleth/SAML attributes. For more precise information regarding how attributes are processed or syntactically formed, please refer to section <a href="#5.d.">5.d.</a></p>
1083 <p>In order to make the Shibboleth software operational, however, minor edits must be made to the example version of the resolver.xml file. The file can be found at <span class="fixedwidth">/webapps/shibboleth/WEB-INF/classes/conf/resolver.xml.</span> Two changes are necessary:</p>
1085 <p>1. The value of the smartScope attribute should be changed to the Domain Name value submitted to the Federation. It appears on two SimpleAttributeDefinition elements: eduPersonScopedAffiliation and eduPersonPrincipalName.</p>
1087 <p>2. The comment indicators should be removed from around the definitions of those two elements ( <!-- and --> ).</p>
1093 <h4><a name="4.b."></a>4.b. Key Generation and Certificate
1097 <p>The SAML messages generated by the HS must be digitally
1098 signed. Each HS must be issued a private and public keypair,
1099 which is stored in a Java keystore. The current
1100 implementation of Shibboleth requires the use of an ordinary
1101 file-based keystore. The keytool program is included with the
1102 Java development and runtime kits. Access parameters to the
1103 keystore will need to be consistent with those specified in
1104 <span class="fixedwidth">origin.properties</span>.</p>
1106 <p>A sample keystore is included in the distribution and can
1108 <span class="fixedwidth">/usr/local/tomcat/webapps/shibboleth/WEB-INF/classes/conf/keystore
1109 .jks</span> with a password of <span class="fixedwidth">shibhs</span>. It is intended
1110 to serve as an example and not as a production keystore.</p>
1112 <p>The following commands will generate a new RSA keypair and
1113 store it in the <span class="fixedwidth">keystore.jks</span> file, with a keyentry
1114 alias of <span class="fixedwidth">hs</span> and new passwords of your choosing:</p>
1117 <span class="fixedwidth">$ cd
1118 /usr/local/tomcat/webapps/shibboleth/WEB-INF/classes/conf<br>
1119 $ keytool -storepasswd -keystore keystore.jks -new
1120 <newpassword><br>
1121 $ keytool -genkey -keystore keystore.jks -alias hs -keyalg
1122 rsa -keysize 2048<br>
1126 <p>You will be prompted for passwords during key generation
1127 as needed, to access the keystore and assign the key itself
1128 its own password. You will also be prompted for the
1129 distinguished name components to associate with the key. This
1130 DN will be placed in a self-signed certificate and will be
1131 the name that is associated with your HS by Shibboleth. In
1132 particular, the first component you enter for Name will be
1133 the <span class="fixedwidth">Common Name</span>(when keytool asks for first and last
1134 name, common name is intended), which in most cases should be
1135 the hostname of the HS system. Note that a specific federation of
1136 sites may dictate what type of key algorithm, key size, or
1137 validity period is appropriate.</p>
1139 <p>Once you have a keypair generated, the self-signed certificate
1140 must be replaced with a certificate signed by a CA acceptable to
1141 the federation you will be joining. Shibboleth is generally able to
1142 climb trust chains to reach an intermediate CA's root CA. Note
1143 that the intermediate CA's signing certificate must still be
1144 signed by a root CA recognized by the federation.</p>
1146 <p>To generate a certificate signing request for a CA, use
1147 the following command:</p>
1150 <span class="fixedwidth">$ keytool -certreq -keystore keystore.jks -alias hs
1151 -file <csr-file><br>
1155 <p>The contents of <span class="fixedwidth"><csr-file></span> can then be sent
1156 to a CA for signing. You will receive a signed certificate in
1157 return in a file. To install the new certificate into your
1158 keystore, use the following command:</p>
1161 <span class="fixedwidth">$ keytool -import -keystore keystore.jks -alias hs
1162 -file <cert-file></span>
1165 <p>Note that if the signing CA's certificate is not already
1166 installed in your keystore as a trusted signer, you may need
1167 to download the CA's root certificate and import it into the
1168 keystore file under a different alias, using a command
1169 similar to the above.</p>
1171 <p>For information on sharing certificate/key pairs between Apache
1172 and Java keystores see section <a href="#5.c.">5.c.</a>.</p>
1175 <h4><a name="4.c."></a>4.c. Linking the Authentication System
1179 <p>The interaction between the HS and the local authentication
1180 system is implemented by supplying the HS with the identity of
1181 the browser user. Most often, this will mean protecting the HS
1182 servlet with some form of local authentication that populates
1183 <span class="fixedwidth">REMOTE_USER</span>. Location blocks can be added to
1184 <span class="fixedwidth">httpd.conf</span>, associating the appropriate
1185 authentication mechanism with the URL of the HS servlet. The
1186 following example demonstrates association of a very basic
1187 authentication method with the HS:</p>
1190 <span class="fixedwidth"><Location /shibboleth/HS><br>
1192 AuthName "Internet2 Handle Service"<br>
1193 AuthUserFile /usr/local/apache/conf/user.db<br>
1194 require valid-user<br>
1195 </Location><br>
1199 <p>Note that .htaccess files cannot be used for this purpose
1200 because URL's are "virtualized" by Tomcat.</p>
1202 <p>It is recommended that the origin be tested at the end of
1203 this process using the process described in section <a href=
1204 "#6.a.">6.a</a>.</p>
1207 <h4><a name="4.c.i."></a>4.c.i. Enabling client certificate
1208 authentication <font color="#5555EE">(optional)</font></h4>
1213 <p>Shibboleth supports client certificate authentication by
1214 utilization of a filter that relies on the web server to do all
1215 processing to ensure that the certificate is both valid and
1216 appropriate for the application. An example deployment descriptor
1217 is included with the Shibboleth distribution at <span
1218 class="fixedwidth">$SHIB_HOME/webAppConfig/origin-client-cert.xml</span>.
1219 To enable the filter, add the following to the deployment
1220 descriptor (<span class="fixedwidth">web.xml</span>):</p>
1223 <span class="fixedwidth"> <filter><br>
1224 <filter-name><br>
1225 Client Cert AuthN Filter<br>
1226 </filter-name><br>
1227 <filter-class><br>
1228 edu.internet2.middleware.shibboleth.utils.ClientCertTrustFilter<br>
1229 </filter-class><br>
1230 </filter><br>
1233 <filter-mapping><br>
1234 <filter-name><br>
1235 Client Cert AuthN Filter<br>
1236 </filter-name><br>
1237 <url-pattern><br>
1238 /HS<br>
1239 </url-pattern><br>
1240 </filter-mapping><br></span>
1243 <p>By default, the filter pulls the principal name out of the <span
1244 class="fixedwidth">CN</span> of the cert's <span
1245 class="fixedwidth">Subject</span> by using regular expression
1246 grouping. This may be done using patterns such as:</p>
1249 <span class="fixedwidth">regex: '.*CN=([^,/]+).*' match group: 1</span>
1252 <p>The servlet filter will accept two initialization parameters,
1253 <span class="fixedwidth">regex</span> and <span
1254 class="fixedwidth">matchGroup</span> that can be used to extract
1255 the principal name differently.</p>
1260 <h4><a name="4.d."></a>4.d. Establishing default ARP's for the
1261 origin community</h4>
1263 <p><b>For a more basic introduction to ARP's, please refer to
1264 section <a href="#2.e.">2.e</a>.</b></p>
1267 <p>An ARP determines which attributes are released to a SHAR
1268 when a user tries to access a resource. It acts as a sort of
1269 filter on user information contained in the authoritative
1270 directory, deciding what can be released to whom, but not
1271 modifying or creating information itself. ARP's are generally
1272 administered by the site, but Shibboleth will provide for users to
1273 broker control of their own information and privacy by
1274 allowing them to create ARP's pertaining to themselves.</p>
1276 <p>It is recommended that a set of policies be established
1277 between an origin and frequently accessed targets to specify
1278 default releases of expected attributes. Federation guidelines may
1279 provide more information on population of ARP's.</p>
1281 <p>Currently, there is no direct mechanism for users to create
1282 their own ARP's besides direct XML writing. In future
1283 versions, a GUI will be provided for simpler management of
1284 ARP's. Care should be given to balancing giving sufficient
1285 control over information to users and avoiding access
1286 problems. For example, users may decide to restrict the
1287 release of their personal information to such a degree that
1288 access to a site for a class may become impossible because
1289 Shibboleth cannot release enough information to grant
1292 <p>The Shibboleth distribution contains an example site arp that
1293 releases the eduPersonScopedAffiliation attribute to all targets. For
1294 more precise information regarding how ARP's are processed or
1295 syntactically formed, please refer to section <a href="#5.b.i.">5.b.i</a>.</p>
1302 <h3><a name="5."></a>5. Advanced Configuration</h3>
1304 <h4><a name="5.a."></a><span class="fixedwidth">origin.properties</span></h4>
1307 <p>The main configuration file for Shibboleth's origin side is
1309 <span class="fixedwidth">/webapps/shibboleth/WEB-INF/classes/conf/origin.properties.</span>. This file contains configuration information
1310 for the origin side in several sections. The configuration
1311 must be consistent with values elsewhere in the deployment,
1312 such as the <a href="#4.c.">HS' certificate</a> and with
1313 directory access bindings, etc., or access errors may occur.</p>
1315 <p>All pathnames are relative, and have an effective root
1317 <span class="fixedwidth">$TOMCAT_HOME/webapps/shibboleth/WEB-INF/classes/</span>. To
1318 specify files outside of the webapp, specify a full URI, such
1319 as <span class="fixedwidth">file:///usr/local/shibboleth/</span>.</p>
1321 <p>Fields that are purple are optional; grey fields are
1324 <p>These are the variables that may be specified for each
1325 component of <span class="fixedwidth">origin.properties</span>:</p>
1328 <p>General Configuration:</p>
1331 <dd class="attributelong">
1332 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.issuer
1333 = <domain name></span>
1337 <p>Specifies the DNS name the HS should use for
1338 itself in issuing assertions.</p>
1341 <dd class="attributelong">
1342 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.siteName
1343 = <URI></span>
1347 <p>Specifies the the <span
1348 class="fixedwidth">URI</span> to use as the name of
1349 the origin site as a whole. This field is primarily
1350 meant to be populated in the context of the federation
1351 in which the origin site resides, is intended to be
1352 globally unique, and will typically be assigned by the
1356 <dd class="attributelong">
1357 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.AAUrl
1358 = <url></span>
1362 <p>Specifies the <span class="fixedwidth">URL</span>
1363 at which the HS' corresponding AA may be contacted.
1364 Note that this <b>must</b> be an <span
1365 class="fixedwidth">https://</span> URL in order for
1366 the AA to know which SHAR is requesting
1370 <dd class="attributeoptlong">
1371 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.username
1372 = <var></span>
1375 <dd class="valueopt">
1376 <p>Specifies the HTTP request header that should be used
1377 to acquire the user's principal name from the
1378 authentication service. Defaults to <span
1379 class="fixedwidth">REMOTE_USER</span>.</p>
1382 <dd class="attributeoptlong">
1383 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.authMethod
1384 = <uri></span>
1387 <dd class="valueopt">
1388 <p>Specifes the URI used to populate <span
1389 class="fixedwidth">AuthenticationMethod</span> in the SAML
1390 attribute assertion. This corresponds to the method used
1391 to authenticate users by the authentication service used
1392 by the HS. Some common authentication methods and
1393 corresponding URI's are listed below; for a complete list,
1394 please consult section 7.1 of the SAML 1.1 core
1395 specifications or your federation's guidelines.</p>
1396 <table border=2 cellpadding=0 cellspacing=0>
1398 <td><span class="fixedwidth">urn:oasis:names:tc:SAML:1.0:am:password</span></td>
1399 <td>The authentication was performed using a password.</td>
1402 <td><span class="fixedwidth">urn:ietf:rfc:1510</span></td>
1403 <td>The authentication was performed using Kerberos.</td>
1406 <td><span class="fixedwidth">urn:oasis:names:tc:SAML:1.0:am:X509-PKI</span></td>
1407 <td>The authentication was performed using a
1408 certificate and key issued to the end user. More
1409 specific forms of PKI authentication such as SPKI and
1410 XKMS are also assigned URN's in the SAML specs.</td>
1417 <p>Assertion Signing:</p>
1420 <dd class="attributelong">
1421 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePath
1422 = <pathname></span>
1426 <p>Specifies the location of the Java keystore
1427 containing the x.509 certificate and matching private
1428 key to be used by the HS.</p>
1431 <dd class="attributelong">
1432 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStorePassword
1433 = <password></span>
1437 <p>Specifies the password to the referenced
1441 <dd class="attributelong">
1442 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyAlias
1443 = <alias></span>
1447 <p>Specifies the alias used for accessing the private
1451 <dd class="attributelong">
1452 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.keyStoreKeyPassword
1453 = <password></span>
1457 <p>Specifies the password used to retrieve the private key.</p>
1460 <dd class="attributeoptlong">
1461 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleServlet.certAlias
1462 = <alias></span>
1465 <dd class="valueopt">
1466 <p>Specifies the alias for the certificate
1467 corresponding to the private key used by the HS.
1468 Defaults to the private key's alias.</p>
1473 <p>General AA Configuration:</p>
1476 <dd class="attributelong">
1477 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.AAServlet.authorityName
1478 = <domain name></span>
1482 <p>Specifies the name of the AA, which is typically
1483 the domain name of the server running it.</p>
1486 <dd class="attributelong">
1487 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.AAServlet.passThruErrors
1488 = <true/false></span>
1492 <p>Specifies whether the AA should pass on internal errors
1493 to the SHAR for debugging purposes. Defaults to <span
1494 class="fixedwidth">false</span>.</p>
1498 <p>AA Attribute Resolution:</p>
1501 <dd class="attributelong">
1502 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.attrresolv.AttributeResolver.ResolverConfig
1503 = <pathname></span>
1507 <p>Specifies the location of the configuration file
1508 for the resolver the AA uses to build attributes.
1510 class="fixedwidth">/conf/resolver.xml</span>. For
1511 information on how to configure and use the attribute
1512 resolver, consult section <a href="4.e.">4.e</a>.</p>
1516 <p>ARP Configuration:</p>
1519 <dd class="attributelong">
1520 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.arp.ArpRepository.implementation
1521 = <string></span>
1525 <p>References the type of ARP repository implemented.
1526 Shibboleth provides a built-in ARP repository
1528 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.arp.
1529 provider.FileSystemArpRepository</span>.</p>
1531 <p>Note that the set of principals that an ARP applies
1532 to is not expressed by the ARP itself, but rather the
1533 implementation of the ARP repository. For example, if
1534 the ARP repository were implemented in LDAP, the ARP's
1535 that apply to a user would be attributes of that
1536 user's personal LDAP entry, and the site ARP would be
1537 an attribute of an entry representing the site. While
1538 not performed by the built-in ARP repository, a
1539 repository implementation might also implement group
1540 ARP's; for example, in an LDAP directory, the user
1541 entry might have some group membership attributes that
1542 refer to group entries, and those group entries would
1543 have ARP attributes, and all those ARP's would be
1547 <dd class="attributelong">
1548 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path
1549 = <pathname></span>
1553 <p>Specifies the relative or absolute path to the
1554 folder containing the ARP files.</p>
1557 <dd class="attributeoptlong">
1558 <span class="fixedwidth">edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.ArpTTL
1559 = <seconds></span>
1562 <dd class="valueopt">
1563 <p>Specifies the duration in <span
1564 class="fixedwidth">seconds</span> that ARP's may be
1565 cached by the AA. Defaults to <span
1566 class="fixedwidth">0</span>, or no caching.</p>
1570 <p>Handle Repository Configuration:</p>
1573 <dd class="attributeoptlong">
1574 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleRepository.implementation
1575 = <string></span>
1578 <dd class="valueopt">
1579 <p>Specifies the method by which the HS and AA share
1580 handles. These are by default passed by memory(which
1581 can be specified explicitly using
1582 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.provider.
1583 MemoryHandleRepository</span>), and may also be passed
1584 using symmetric encryption with
1585 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository</span>.</p>
1589 <p>edu.internet2.middleware.shibboleth.hs.provider.
1590 MemoryHandleRepository <font color="#5555EE">(specify
1592 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleRepository.
1593 implementation</span> is <span class="fixedwidth">MemoryHandleRepository</span>)</font></p>
1597 <dd class="attributeoptlong">
1598 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.BaseHandleRepository.handleTTL
1599 = <seconds></span>
1602 <dd class="valueopt">
1603 <p>Specifies the time in <span
1604 class="fixedwidth">seconds</span> for which issued handles
1605 are valid. Defaults to <span
1606 class="fixedwidth">1800</span>, or 30 minutes. The time
1607 should be long enough to allow for clock skew and short
1608 enough to protect against various attacks. Consult your
1609 federation guidelines for further advice.</p>
1614 <p>edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository <font color="#5555EE">(specify
1616 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.HandleRepository.
1617 implementation</span> is <span class="fixedwidth">CryptoHandleRepository</span>)</font></p>
1619 <p>In order to use the crypto repository implementation, you must
1620 have a <span class="fixedwidth">DESede</span> secret key in a
1621 keystore of type <span class="fixedwidth">JCEKS</span>. The
1622 origin distribution includes a program that will automatically
1623 generate such a key. In order to invoke it, run <span
1624 class="fixedwidth">./ant genSecret</span>, which will create a
1626 class="fixedwidth">$SHIB_HOME/src/conf/handle.jks</span> that
1627 includes the key, with an alias of <span
1628 class="fixedwidth">handleKey</span> and a password of <span
1629 class="fixedwidth">shibhs</span>. If <span
1630 class="fixedwidth">./ant dist</span> is run subsequently, this
1631 keystore will be included in the webapp archive that is
1636 <dd class="attributelong">
1637 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePath
1638 = <pathname></span>
1642 <p>Specifies the path to the keystore containing the
1643 key used to encrypt passed principal identifiers.</p>
1646 <dd class="attributelong">
1647 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStorePassword
1648 = <password></span>
1652 <p>Specifies the password for the keystore.</p>
1655 <dd class="attributelong">
1656 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStoreKeyAlias
1657 = <password></span>
1661 <p>Specifies the alias for the appropriate encryption
1662 key within the keystore.</p>
1665 <dd class="attributelong">
1666 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.provider.CryptoHandleRepository.keyStoreKeyPassword
1667 = <password></span>
1670 <dd class="valueopt">
1671 <p>Specifies the password used to retrieve the key.</p>
1674 <dd class="attributeoptlong">
1675 <span class="fixedwidth">edu.internet2.middleware.shibboleth.hs.CryptoHandleRepository.handleTTL
1676 = <seconds></span>
1679 <dd class="valueopt">
1680 <p>Specifies the time in <span
1681 class="fixedwidth">seconds</span> for which issued handles
1682 are valid. Defaults to <span
1683 class="fixedwidth">1800</span>, or 30 minutes. The time
1684 should be long enough to allow for clock skew and short
1685 enough to protect against various attacks. Consult your
1686 federation guidelines for further advice.</p>
1692 <p>Federation Configuration:</p>
1695 <dd class="attributelong">
1696 <span class="fixedwidth">edu.internet2.middleware.shibboleth.audiences
1697 = <URI's></span>
1701 <p>Specifies a list of <span
1702 class="fixedwidth">URI</span>'s that will be used for
1703 the <span class="fixedwidth">Audience</span> field of
1704 the SAML attribute assertion. All URI's listed will
1705 be sent with any assertion issued by the AA. These
1706 URI's are defined and provided by and correspond to
1709 <p>Note that the values of the URI's here <b>must</b>
1710 match one of the policy URI's accepted by the
1711 receiving target in the <span
1712 class="fixedwidth">[policies]</span> section of <span
1713 class="fixedwidth">shibboleth.ini</span> or
1714 interoperation will fail by design.
1721 <h4><a name="5.b."></a>5.b. ARP Overview</h4>
1724 <h5>This section applies primarily to the syntactic and
1725 technical details of ARP's. For basic information on and
1726 explanation of what an ARP is and how it should be managed,
1727 please refer to sections <a href="#2.e.">2.e</a> and <a href=
1728 "#4.d.">4.d</a>.</h5>
1730 <p>Every ARP file contains one ARP. ARP's may be specified either
1731 as the site ARP or user ARP's. The site ARP pertains to every
1732 principal for whom the AA retrieves information; a user ARP
1733 applies only to the individual user for whom it is defined. The
1734 set of principals to whom the ARP applies is defined by the name
1735 of the ARP file: the site ARP is stored in <span
1736 class="fixedwidth">arp.site.xml</span> and user ARP's are stored as
1737 <span class="fixedwidth">arp.user.$PRINCIPALNAME.xml</span>.
1738 Up to two ARP's will apply to a principal: the site ARP, and the
1739 user ARP for that principal.</p>
1741 <p>Each ARP acts as a container that holds a set of ARP rules
1742 that are applicable to the principals that ARP is effective
1743 for. Each ARP rule specifies a single release policy within
1744 the ARP container pertaining to a specific set of targets.
1745 This set of targets may be specified as a specific SHAR, a
1746 SHAR tree, or a regular expression, and becomes the ARP rule's
1747 target definition. Each ARP rule may contain specifications
1748 regarding the release of any number of attribute values to
1749 requests matching that ARP rule for that user. ARP rules may
1750 be flagged as default, implying that they are always applied
1751 to any user matched by the ARP container. Note that ARP's may
1752 also be used to restrict specific attribute/value pairs in
1753 addition to restricting or releasing individual attributes.</p>
1755 <p>When a query is received, the AA generates an effective
1756 ARP, which is the fully evaluated set of ARP rules regarding
1757 that SHAR based on all ARP containers applicable to the
1758 principal. This effective ARP is then applied to attribute
1759 values retrieved from the directory and the appropriate
1760 assertion is constructed. Default rules are always
1761 included in construction of the effective ARP.</p>
1765 <h4><a name="5.b.i."></a>5.b.i. ARP Processing</h4>
1769 <p>When a request arrives from a particular SHAR, the
1770 applicable set of ARP rules are parsed into an effective
1771 ARP. This parsing is done as follows:</p>
1774 <li>Identify all ARP's that should be applied to a particular
1775 principal. This is done by isolating the files in the folder
1777 class="fixedwidth">edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository.Path</span> that have the
1778 name either arp.site.xml or arp.user.$PRINCIPALNAME.xml.</li>
1779 <li>Find all ARP rules relevant to the query:
1781 <li>Any ARP rules within the identified ARP's designated
1782 as defaults are automatically included in the effective
1783 ARP without performing any matching functions.</li>
1784 <li>For each non-default rule in each identified ARP,
1785 the matching functions specified in the rule's target
1786 definition are performed. A separate matching function
1787 is performed for the requesting SHAR and the resource on
1788 behalf of which the SHAR is making the request.</li>
1789 <li>Each matching function evaluates to <span class="fixedwidth">TRUE</span> if
1790 the match is successful or <span class="fixedwidth">FALSE</span> if it is
1791 unsuccessful. If both functions evaluate to
1792 <span class="fixedwidth">TRUE</span>, the rule is included in the Effective
1795 <li>Construct the Attribute Filter:
1797 <li>For each attribute, compile a temporary list of
1798 associated rules that includes all values with a release
1799 qualifier of <span class="fixedwidth">permit</span>.</li>
1800 <li>Subtract from this list all attribute values with
1801 rules specifying a release qualifier of <span class="fixedwidth">deny</span>.
1802 The resulting list represents the allowable release
1803 values for the attribute and is used as a mask for the
1804 values which are returned from the Attribute
1806 <li>If a statement specifies that all values should be
1807 permitted, then specific <span class="fixedwidth">deny</span> qualifiers for
1808 specific values should still be enforced. If a
1809 statement specifies that all values should be denied,
1810 then <span class="fixedwidth">permit</span> qualifiers for specific values will
1813 <li>Using the mask and attributes returned from the
1814 Attribute Resolver, an assertion is constructed.</li>
1820 <h4><a name="5.b.ii."></a>5.b.ii. ARP Syntax</h4>
1825 <p>Each ARP is described by an XML file based on a standard
1826 <span class="fixedwidth">.xsd</span> schema. It consists of a standard
1827 <span class="fixedwidth">AttributeReleasePolicy</span> element referencing the
1828 appropriate <span class="fixedwidth">xsi:schemaLocation</span> and a self-explanatory
1829 <span class="fixedwidth">Description</span> element followed by any number of
1830 <span class="fixedwidth">Rule</span> elements. Each <span class="fixedwidth">Rule</span> element must
1831 consist of a <span class="fixedwidth">Target</span> element and one or more
1832 <span class="fixedwidth">Attribute</span> elements. The <span class="fixedwidth">Target</span> element
1833 specifies the rules by which the target definition is formed.
1834 The <span class="fixedwidth">Attribute</span> elements specifies the name and values
1835 of the attributes that may be released.</p>
1837 <p>The simplest possible ARP is as follows, which releases
1838 <span class="fixedwidth">eduPersonScopedAffiliation</span> to any target for the
1839 users the ARP applies to:</p>
1842 <span class="fixedwidth">
1843 <?xml version="1.0"?><br>
1845 <AttributeReleasePolicy
1846 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1847 xmlns="urn:mace:shibboleth:arp:1.0"
1848 xsi:schemaLocation="urn:mace:shibboleth:arp:1.0
1849 shibboleth-arp-1.0.xsd"><br>
1851
1852 <Description>Simplest possible
1853 ARP.</Description><br>
1855
1858
1859 <Target><br>
1861
1862
1863 <AnyTarget/><br>
1865
1866 </Target><br>
1868
1869 <Attribute
1870 name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"><br>
1872
1873
1874 <AnyValue release=
1875 "permit"/><br>
1877
1878 </Attribute
1881 </Rule
1884 </AttributeReleasePolicy><br>
1890 <p>All ARP's must take the same basic form. A detailed
1891 description of how each element of the <span class="fixedwidth">Rule</span> element
1892 may be sub-populated follows:</p>
1894 <p>The <span class="fixedwidth">Target</span> element:</p>
1898 <p><span class="fixedwidth">Target</span> may contain either the
1899 <span class="fixedwidth">AnyTarget</span> element, which will cause the
1900 <span class="fixedwidth">Target</span> to always return <span class="fixedwidth">TRUE</span>, or both the
1901 <span class="fixedwidth">Requester</span> element, which provides for matches to be
1902 performed against the SHAR name and the <span class="fixedwidth">Resource</span>
1903 element, which provides for matches to be performed against
1904 the requested URL.</p>
1906 <p>There are three matches that may be performed by the AA
1907 in evaluating ARP's by using the <span class="fixedwidth">matchFunction</span>
1908 component of the <span class="fixedwidth">Requester</span> and <span class="fixedwidth">Resource</span>
1909 elements. The following match patterns may be
1910 specified directly following the <span class="fixedwidth">Requester</span> or
1911 <span class="fixedwidth">Resource</span> elements, such as <span class="fixedwidth"><Requester
1912 matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch"></span>:</p>
1916 <p><span class="fixedwidth">urn:mace:shibboleth:arp:matchFunction:exactShar
1919 <p>May be used with the <span class="fixedwidth">Requester</span>
1922 <p>Evaluates to <span class="fixedwidth">TRUE</span> when the string content
1923 of the <span class="fixedwidth">Requester</span> element matches exactly the
1924 name of the requesting SHAR. Otherwise evaluates to
1925 <span class="fixedwidth">FALSE</span>. Serves as the default value
1926 associated with <span class="fixedwidth">Requester</span> if none is
1931 <p><span class="fixedwidth">urn:mace:shibboleth:arp:matchFunction:resourceTree
1934 <p>May be used with the <span class="fixedwidth">Resource</span> element.</p>
1936 <p>Evaluates to <span class="fixedwidth">TRUE</span> when the location of
1937 the resource either matches exactly or begins with
1938 the string content of the <span class="fixedwidth">Resource</span> element.
1939 Otherwise evaluates to <span class="fixedwidth">FALSE</span>.</p>
1943 <p><span class="fixedwidth">urn:mace:shibboleth:arp:matchFunction:regexMatch
1946 <p>May be used with both the <span class="fixedwidth">Requester</span>
1947 and <span class="fixedwidth">Resource</span> elements.</p>
1949 <p>Evaluates to <span class="fixedwidth">TRUE</span> when the name of the
1950 requesting SHAR or the requested URL tree is a valid
1951 match of the regular expression represented as the
1952 content of the containing element. Otherwise evaluates
1953 to <span class="fixedwidth">FALSE</span>. Regular expressions are evaluated in
1954 accordance with the the <a
1955 href="http://java.sun.com/j2se/1.4/docs/api/java/util/
1956 regex/Pattern.html#sum">Java 1.4 Pattern API</a>.</p>
1963 <p>The <span class="fixedwidth">Attribute</span> element:</p>
1967 <p>The <span class="fixedwidth">Attribute</span> element must always specify the
1968 URN of the attribute whose release parameters it specifies.
1969 Additionally, it must contain either the <span class="fixedwidth">AnyValue</span>
1970 element or one or more <span class="fixedwidth">Value</span> elements. These
1971 elements, in turn, must specify either <span class="fixedwidth">release</span> =
1972 <span class="fixedwidth">permit</span> or <span class="fixedwidth">deny</span>. The <span class="fixedwidth">Value</span>
1973 element must then contain one value for which the rule
1974 applies. Examples:</p>
1977 <span class="fixedwidth">
1978 <Attribute name="urn:mace:dir:attribute-def:eduPersonPrincipalName"><br>
1979 <AnyValue release="Permit"><br>
1980 </Attribute><br>
1982 <p>Permits the release of <span class="fixedwidth">eduPersonPrincipalName</span>
1987 <span class="fixedwidth">
1988 <Attribute name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"><br>
1989 <Value release="deny">member@example.edu</Value><br>
1990 </Attribute><br>
1992 <p>Denies the release of
1993 <span class="fixedwidth">eduPersonScopedAffiliation</span> value
1994 <span class="fixedwidth">member@example.edu</span>. Other values of the
1995 attribute may still be released if so specified by a
1996 <span class="fixedwidth">permit</span> ARP.</p>
2000 <!-- ##To be included in future releases. Not yet implemented.
2002 <p>There is also a special <span class="fixedwidth">AttributeIdentifier</span>
2003 element that allows internal references to an attribute
2004 within an ARP. This is useful for quickly applying multiple
2005 rules to the same target. It is used as follows:</p>
2008 <span class="fixedwidth">
2009 <Rule><br>
2011 <Target><br>
2013 <AnyTarget/><br>
2015 </Target><br>
2017 <Attribute
2018 name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"><br>
2020 <Value
2021 release="permit">member@example.edu</Value
2024 </Attribute><br>
2026 </Rule><br>
2028 <AttributeReference identifier="http://www.example.edu/attributes/attribute1"><br>
2030 <Attribute name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation" identifier="http://www.example.edu/attributes/attribute1"><br>
2032 <Value release="permit">student@example.edu<Value><br>
2034 </Attribute><br>
2039 <h4><a name="5.c."></a>5.c. Sharing certificate/key pairs
2040 between Apache and Java keystores <font color="#5555EE">(optional)</font></h4>
2044 <p>The JDK includes the command line program
2045 <span class="fixedwidth">keytool</span> for managing Java keystores. This utility
2046 cannot import or export private key information, making it
2047 difficult to use the same private key and certificate for
2048 Apache and Java-based applications. The Shibboleth
2049 distribution includes <span class="fixedwidth">extkeytool</span>, a program that
2050 can be used in conjunction with <span class="fixedwidth">keytool</span> to perform
2051 these tasks. Select the appropriate step-by-step procedure
2052 for your situation from the following guides.</p>
2054 <p>Before running <span class="fixedwidth">extkeytool</span>, the variable
2055 SHIB_HOME must be set to the path to the directory where the
2056 Shibboleth tarball was exploded(typically
2057 /usr/local/shibboleth-origin-1.0/).</p>
2059 <p><b>If you have a pre-exiting RSA key/certificate
2060 combination in a keystore and you would like to use it with
2065 <p>Determine the alias of the keystore keyEntry
2066 containing the key you would like to use in your Apache
2067 setup. Assuming that your keystore is named
2068 <span class="fixedwidth">yourstore</span>, the following command should
2069 present a list of the entries in the keystore.</p>
2072 <p><span class="fixedwidth">$ keytool -list -v -keystore
2073 yourstore</span></p>
2078 <p>Assuming that you identified the appropriate alias
2079 as <span class="fixedwidth">youralias</span> and the password for the keystore
2080 is <span class="fixedwidth">yourpass</span>, enter the following command to
2081 export the key in Base64-encoded pkcs8 format.</p>
2084 <p><span class="fixedwidth">$ extkeytool -exportkey -keystore yourstore
2085 -alias youralias -storepass yourpass -rfc -file
2086 yourkey.pkcs8</span></p>
2091 <p>In order to use this key with Apache, you must
2092 convert it to PEM-encoded RSA native format. You have
2093 the option of storing the key unencrypted or
2098 <p>To use the unencrypted format, enter the
2099 following command for the conversion:</p>
2102 <p><span class="fixedwidth">$ openssl pkcs8 -in yourkey.pkcs8
2103 -nocrypt|openssl rsa -out yourkey.key</span></p>
2108 <p>To use the encrypted format, enter the following
2109 command for the conversion:</p>
2112 <p><span class="fixedwidth">$ openssl pkcs8 -in yourkey.pkcs8
2113 -nocrypt|openssl rsa -des3 -out
2114 yourkey.enckey</span></p>
2121 <p>The following command will export the corresponding
2125 <p><span class="fixedwidth">$ keytool -export -keystore yourstore -alias
2126 youralias -rfc -file yourcert</span></p>
2131 <p>Set the <span class="fixedwidth">mod_ssl</span>
2132 <span class="fixedwidth">SSLCertificateKeyFile</span> and
2133 <span class="fixedwidth">SSLCertificateFile</span> directives to point to the
2134 two files you have just created. Take care to remove
2135 any temporary files you created (i.e.
2136 <span class="fixedwidth">yourkey.pkcs8</span>) and set appropriate file
2137 permissions, especially if you chose to store the key
2138 in an unencrypted format.</p>
2142 <p><b>If you have a pre-existing RSA key/certificate
2143 combination that you use with Apache and would like to
2144 import it into a java keystore:</b></p>
2148 <p>Convert the private key to unencrypted DER-encoded
2149 pkcs8 format. Assuming your PEM-encoded key is stored
2150 in a file named <span class="fixedwidth">yourkey.enckey</span>, enter the
2151 following command.</p>
2154 <p><span class="fixedwidth">$ openssl pkcs8 -in yourkey.enckey -topk8
2155 -nocrypt -outform DER -out yourkey.der.pkcs8</span></p>
2160 <p>Create a certificate bundle file. This file should
2161 include a series of PEM-encoded X509 certificates
2162 representing a complete trust chain, from the root CA
2163 certificate to the certificate that matches your
2164 private key. If your certificate is stored in a file
2165 named <span class="fixedwidth">mycert</span> and the CA signer certificate is
2166 stored in a file named <span class="fixedwidth">ca.cert</span>, you might
2167 enter the following command to create the bundle.</p>
2170 <p><span class="fixedwidth">$ cat mycert ca.cert > cert.bundle</span></p>
2173 <b>Note: <span class="fixedwidth">mod_ssl</span>-enabled Apache
2174 installations include a number of commonly recognized
2175 CA certificates in the <span class="fixedwidth">ca-bundle.crt</span> file
2176 under the <span class="fixedwidth">$ServerRoot/conf/ssl.crt/</span>
2181 <p>Import the key and certificate into the keystore.
2182 Assuming you have already created a keystore named
2183 <span class="fixedwidth">yourstore</span> with a password of of
2184 <span class="fixedwidth">yourpass</span>, enter the following command to store
2185 the data under the alias <span class="fixedwidth">youralias</span>.</p>
2188 <p><span class="fixedwidth">$ ./extkeytool -importkey -keystore yourstore
2189 -alias youralias -storepass yourpass -keyfile
2190 yourkey.der.pkcs8 -certfile cert.bundle -provider
2191 org.bouncycastle.jce.provider.BouncyCastleProvider</span></p>
2196 <p>You can verify that the import was successful by
2197 listing entry. Use the command below.</p>
2200 <p><span class="fixedwidth">$ keytool -list -v -keystore yourstore -alias
2201 youralias</span></p>
2206 <p>Remember to delete <span class="fixedwidth">yourkey.der.pkcs8</span>, as it
2207 contains your unencrypted private key.</p>
2211 <p><b>If you are starting from scratch and do not yet have
2212 a certificate/key pair:</b></p>
2216 <p>Generate an RSA private key. Use the command below,
2217 substituting <span class="fixedwidth">yourkey</span> with an appropriate name
2218 to use to refer to the key.</p>
2221 <p><span class="fixedwidth">$ openssl genrsa -des3 -out yourkey.enckey
2227 <p>The following command generates a Certificate
2228 Signing Request, which should be communicated to a
2229 Certificate Authority.</p>
2232 <p><span class="fixedwidth">$ openssl req -new -key
2233 yourkey.enckey</span></p>
2238 <p>The Certificate Authority should respond with a
2239 PEM-encoded X509 certificate. Set the <span class="fixedwidth">mod_ssl</span>
2240 <span class="fixedwidth">SSLCertificateKeyFile</span> directive to point to
2241 the key file you just created and the
2242 <span class="fixedwidth">SSLCertificateFile</span> directive to point to file
2243 containing the certificate issued by the Certificate
2244 Authority. Previous sections explaion how to share the
2245 key/certificate pair with a Java keystore.</p>
2252 <h4><a name="5.d."></a>5.d. The Attribute Resolver</h4>
2255 <p>Shibboleth provides a powerful attribute resolver that allows
2256 origins to quickly configure the retrieval of simple attributes
2257 from standard types of attribute stores. The resolver is configured
2258 using an xml file wich should be pointed to with the <span
2259 class="fixedwidth">edu.internet2.middleware.shibboleth.aa.
2260 attrresolv.AttributeResolver.ResolverConfig</span> propety in <span
2261 class="fixedwidth">origin.properties</span> as described in
2262 section <a href="#4.a.">4.a</a>. For more complex attributes or
2263 those that require processing before release, customized Java
2264 classes will need to be written. For more information,
2265 consult the programmer's guide.</p>
2267 <p>The resolver is essentially a directed graph from attribute
2268 definitions to data connectors. The data connectors pull data, in
2269 the form of attributes, from external data sources. The attribute
2270 definitions then process this data into a from suitable for use
2271 by Shibboleth. This procedure can be as simple as taking an
2272 unmodified string value from a data connector and tagging it with
2273 a name or can include arbitrarily complex business rules.</p>
2275 <p>The <span class="fixedwidth">resolver.xml</span> file that is
2276 pointed to by <span class="fixedwidth">origin.properties</span>
2277 consists of zero or more attribute definitions followed by zero or
2278 more data connectors. Each attribute definition consists of an
2279 identifier corresponding to the URN of the attribute, and optional
2280 references to data connectors on which it depends. Each data connector
2281 consists of a string identifier which is used by attribute
2282 definitions that refer to it, and one or more elements specific to
2283 the configuration of that data connector.</p>
2285 <p>Shibboleth comes with two attribute definitions provided in
2286 version 1.0: the <span
2287 class="fixedwidth">SimpleAttributeDefinition</span>, which acts as
2288 a basic proxy for attributes supplied by data connectors with some
2289 name conversion and attribute scoping added, and a <span
2290 class="fixedwidth">CustomAttributeDefinition</span>, which can be
2291 used to configure user-created attribute definition plugins.
2292 Similarly, Shibboleth 1.0 comes with two data connectors: the
2293 <span class="fixedwidth">JNDIDirectoryDataConnector</span>, which
2294 pulls data from any source for which there is a JNDI Directory
2295 Context implementation, including LDAP, NDS, etc., and the <span
2296 class="fixedwidth">CustomDataConnector</span>, which is used to
2297 configure user-created data connector plugins.</p>
2299 <p>A detailed explanation of each configuration option for the
2300 provided connectors follows:</p>
2302 <p><span class="fixedwidth">JNDIDirectoryDataConnector</span>:</p>
2305 <dd class="attribute">
2306 <span class="fixedwidth">id = <string></span>
2310 <p>Specifies a unique, textual name for the connector used by
2311 attribute definitions to refer to and use it to build
2312 attributes. Contained within the <span
2313 class="fixedwidth">JNDIDirectoryDataConnector</span>
2317 <dd class="attribute">
2318 <span class="fixedwidth"><Property name="<name>" value="<value>"/></span>
2322 <p>An element of the element <span
2323 class="fixedwidth">JNDIDirectoryDataConnector</span>.
2324 Specifies a set of name/value pairs that are used to configure
2325 the JNDI Directory Context. This list of name/value pairs is
2326 defined by the context itself, but is specified within <span
2327 class="fixedwidth">resolver.xml</span>. Refer to the <a
2328 href="http://http://marsalis.internet2.edu/cgi-bin/viewcvs.cgi
2329 /shibboleth/java/src/conf/resolver.ldap.xml">Shibboleth
2330 CVS</a> for an example of names and values used to connect to
2331 an LDAP directory.</p>
2334 <dd class="attributeopt">
2335 <span class="fixedwidth"><Search></span>
2338 <dd class="valueopt">
2339 <p>An element of the element <span
2340 class="fixedwidth">JNDIDirectoryDataConnector</span>. This
2341 element defines the DN filter used to perform the LDAP search.
2342 The search string must return no more than one result.</p>
2345 <dd class="attributeopt">
2346 <span class="fixedwidth"><Controls></span>
2349 <dd class="valueopt">
2350 <p>An element of the element <span
2351 class="fixedwidth">Search</span>. This
2352 element grants some fine-grained control over the LDAP API
2356 <dd class="attributeopt">
2357 <span class="fixedwidth"><cacheTime "<seconds>"/></span>
2360 <dd class="valueopt">
2361 <p>An element of the element <span
2362 class="fixedwidth">JNDIDirectoryDataConnector</span>.
2363 Specifies an optional duration in <span
2364 class="fixedwidth">seconds</span> for which the attribute
2365 resolver may cache information retrieved from this
2370 <p>A representation of a properly constructed <span
2371 class="fixedwidth">JNDIDirectoryDataConnector</span> element would
2374 <blockquote><span class="fixedwidth">
2375 <JNDIDirectoryDataConnector id="directory"><br>
2376 <Search filter="cn=%PRINCIPAL%"><br>
2377 <Controls searchScope="SUBTREE_SCOPE" returningObjects="false" /><br>
2378 </Search><br>
2379 <Property name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory" /><br>
2380 <cacheTime="2400"/><br>
2381 </JNDIDirectoryDataConnector>
2382 </span></blockquote>
2384 <p><span class="fixedwidth">SimpleAttributeDefinition</span>:</p>
2387 <dd class="attribute">
2388 <span class="fixedwidth">id = <string></span>
2392 <p>Specifies a unique, textual name for the attribute which is
2393 used as the attribute's name when it is sent over the wire by
2394 Shibboleth. Contained within the <span
2395 class="fixedwidth">SimpleAttributeDefinition</span>
2399 <dd class="attributeopt">
2400 <span class="fixedwidth"><AttributeDependency / DataConnectorDependency requires="<id>"/></span>
2403 <dd class="valueopt">
2404 <p>An element of the element <span
2405 class="fixedwidth">SimpleAttributeDefinition</span>, which may
2406 contain 0 or more of either <span
2407 class="fixedwidth">AttributeDependency</span> or <span
2408 class="fixedwidth">DataConnectorDependency</span>. These
2409 specify attributes and data connectors that can be utilized by
2410 this attribute definition. Each of these elements must
2411 contain a <span class="fixedwidth">requires</span> statement
2412 which this attribute definition can then use to build its
2416 <dd class="attributeopt">
2417 <span class="fixedwidth">smartScope = "<domain>"</span>
2420 <dd class="valueopt">
2421 <p>Specifes a domain scope to be attached to the attribute. If
2422 the value of the attribute as retrieved from the data
2423 connector includes a pre-existing scope (<span
2424 class="fixedwidth">bob@foo.edu</span>), that scope is used
2425 instead. Contained within the <span
2426 class="fixedwidth">SimpleAttributeDefinition</span>
2430 <dd class="attributeopt">
2431 <span class="fixedwidth">sourceName = "<string>"</span>
2434 <dd class="valueopt">
2435 <p>Specifies a different source attribute name to be used in
2436 calls to the data connector, while the name on the wire will
2437 be the specified <span class="fixedwidth">id</span>. This
2438 would be useful to send a local UniversityID attribute as
2439 eduPersonPrincipalName. If not supplied, the connector
2440 tokenizes the <span class="fixedwidth">id</span> field and
2441 uses the section following the <span
2442 class="fixedwidth">#</span> to query data connectors.
2443 Contained within the <span
2444 class="fixedwidth">SimpleAttributeDefinition</span>
2448 <dd class="attributeopt">
2449 <span class="fixedwidth"><cacheTime "<seconds>"/></span>
2452 <dd class="valueopt">
2453 <p>An element of the element <span
2454 class="fixedwidth">SimpleAttributeDefinition</span>.
2455 Specifies an optional duration in <span
2456 class="fixedwidth">seconds</span> for which the attribute
2457 resolver may cache this attribute for use in additional
2461 <dd class="attributeopt">
2462 <span class="fixedwidth"><lifeTime "<seconds>"/></span>
2465 <dd class="valueopt">
2466 <p>An element of the element <span
2467 class="fixedwidth">SimpleAttributeDefinition</span>.
2468 Specifies in the attribute assertion how long the attribute
2469 should be cached and retained by the target upon receipt.
2470 Federations and trust agreements may have some bearing on the
2471 population and use of this field.</p>
2475 <p>A representation of a properly constructed <span
2476 class="fixedwidth">SimpleAttributeDefinition</span> element would
2479 <blockquote><span class="fixedwidth">
2480 <SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonPrincipalName" smartScope="shibdev.edu" sourceName="universityPerson"><br>
2481 <DataConnectorDependency requires="dataConnector"/><br>
2482 <AttributeDependency requires="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"/><br>
2483 <cacheTime="600"/><br><br>
2484 <lifeTime="3600"/><br><br>
2485 </SimpleAttributeDefinition>
2486 </span></blockquote>
2488 <p>A properly formed <span class="fixedwidth">resolver.xml</span>
2489 file to automatically generate a simple response for EPPN may take
2492 <blockquote><span class="fixedwidth">
2493 <AttributeResolver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mace:shibboleth:resolver:1.0" xsi:schemaLocation="urn:mace:shibboleth:resolver:1.0 shibboleth-resolver-1.0.xsd"><br>
2495 <SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonPrincipalName" smartScope="shibdev.edu"><br>
2496 <DataConnectorDependency requires="echo"/><br>
2497 </SimpleAttributeDefinition><br>
2499 <CustomDataConnector id="echo"
2500 class="edu.internet2.middleware.shibboleth.aa.attrresolv.provider.SampleConnector" /><br>
2501 </AttributeResolver>
2502 </span></blockquote>
2504 <p>There are additional examples of <span class="fixedwidth">resolver.xml</span> files provided in the <a href="http://marsalis.internet2.edu/cgi-bin/viewcvs.cgi/shibboleth/java/src/conf/">Shibboleth CVS</a>.</p>
2509 <h4><a name="5.d.i."></a>5.d.i <span class="fixedwidth">resolvertest</span></h4>
2513 <p>Shibboleth comes bundled with the command line utility <span class="fixedwidth">resolvertest</span> for testing Attribute Resolver configurations. This program takes as input <span class="fixedwidth">resolver.xml</span>, the name of a user, and optionally the name of a requesting SHAR. It outputs the resulting SAML <Attribute /> elements. This allows administrators to view the results of tweaking the resolver configuration without having to continually reload the origin web application. Initially, the following two steps must be performed:</p>
2516 <li>Set the shell variable <span class="fixedwidth">SHIB_HOME</span> to the directory path where the Shibboleth tarball was exploded (typically <span class="fixedwidth">/opt/shibboleth-origin-1.0/</span>).</li>
2517 <li>Move to $SHIB_HOME/bin</li>
2520 <p><span class="fixedwidth">resolvertest</span> may then be used by executing the shell script, passing the name of a user and a URL to the Attribute Resolver configuration file as parameters. For example:</p>
2522 <blockquote><span class="fixedwidth">$ ./resolvertest --user=wassa --file=file:///$SHIB_HOME/src/conf/resolver.xml</span></blockquote>
2524 <h5>NOTE: This program does not filter the resulting attributes through the applicable ARP's. Although it does show the attributes generated by the resolver for a particular user or URL, it does not necessarily reflect what will be released by the AA to a requesting SHAR.</h5>
2528 <h4><a name="5.e."></a>5.e. Local Error Page</h4>
2530 <p>Origin sites are encouraged to provide federations with the
2531 URL of a local Shibboleth error page. If a browser user from the
2532 origin site encounters a problem at a shibbolized target, the target
2533 is likely to display an error page that includes a link back to this
2534 origin provided page.</p>
2536 <p>The page should provide information on how to obtain local support
2537 for using Shibbolized resources. It might also include suggestions on
2538 what information should be recorded before beginning the problem
2539 resolution process.</p>
2548 <h3><a name="6."></a>6. Troubleshooting</h3>
2550 <p>This section provides basic information about testing,
2551 logging, and error handling for Shibboleth origins. This
2552 information is not intended to be comprehensive, but instead
2553 rudimentary guidelines for basic configuration tests and
2554 problems. For more detailed information or answers to specific
2555 problems not addressed in this section, please mail <a href=
2556 "mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>
2557 with a thorough description of errors and configurations
2560 <h4><a name="6.a."></a>6.a. Basic Testing</h4>
2563 <p>Internet2 provides a basic target that can be used to test
2564 origin setup functionality. After your origin is recognized
2565 by InQueue, simply use any browser to access <a href=
2566 "https://wayf.internet2.edu/InQueue/sample.jsp">https://wayf.internet2.edu/InQueue/sample.jsp</a>.
2567 Select your origin's name and follow the login process as a
2568 user would. Note that SSL must be used, and both the HS and
2569 AA must be fully configured.</p>
2571 <p>The test target will then display a simple page which
2572 includes the basic information sent to it by your origin and
2573 the authentication rules it is using.</p>
2575 <p><b>For information regarding specific error messages that
2576 may be generated if the origin does not work successfully,
2577 please refer to section <a href="#6.c.">6.c</a>.</b></p>
2580 <h4><a name="6.b."></a>6.b. Logging</h4>
2583 <p>Shibboleth's origin components log various operations
2584 which may prove useful for auditing, testing, and security
2585 purposes. This data is sent through <span class="fixedwidth">log4j</span>'s
2586 standard mechanism. The location of
2587 the log file, the level at which the log is output, the
2588 formatting of the logs, and many more options may be
2589 configured by editing
2590 <span class="fixedwidth">/WEB-INF/classes/conf/log4j.properties</span>. By default,
2591 it is setup to log to the console of the servlet container, with a
2592 level of <span class="fixedwidth">WARN</span>, but there is also a commented out
2593 example in the file to give a possible alternate configuration.</p>
2596 <h4><a name="6.c."></a>6.c. Common Problems</h4>
2599 <p>A knowledge base is being developed in the <a
2600 href="http://www.columbia.edu/~wassa/shib.faq/shibboleth-faq.html">
2601 Shibboleth Deployer's FAQ</a>. Please mail <a href=
2602 "mailto:mace-shib-users@internet2.edu">mace-shib-users@
2603 internet2.edu</a> with any additional questions or problems
2604 encountered that are not answered by this basic guide.</p>