1 <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 <meta http-equiv="Content-Language" content="en-us">
6 <title>Shibboleth Origin Deployment Guide</title>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
8 <style type="text/css">
12 background-color: #FFFFFF;
30 font-family: monospace;
33 text-decoration: none;
37 font-family: monospace;
40 text-decoration: none;
44 font-family: monospace;
47 text-decoration: none;
51 border-width:2px; background-color: #DDDDDD;
52 background-image: url('none');
59 background-color: #DDDDDD;
60 background-image: url('none');
66 background-color: #DDDDDD;
67 background-image: url('none');
76 background-color: #DDDDDD;
77 border: 1px inset black;
78 background-image: url('none');
86 background-color: #EEEEEE;
87 background-image: url('none');
89 padding-bottom: 0.5em;
92 border-bottom-width: none;
93 border-top-width: none;
94 border-left-width: 1px;
95 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
100 background-color: #FFCCFF;
107 background-color: #DDDDDD;
108 border: 1px inset black;
109 background-image: url('none');
115 background-color: #EEEEEE;
120 font-family: monospace;
131 <!-- ZoneLabs Privacy Insertion -->
132 <script language='javascript' src='http://127.0.0.1:1103/js.cgi?paw&r=7627'></script>
136 <body link="red" vlink="red" alink="black" bgcolor="white">
139 <h2>Shibboleth Origin Deployment Guide</h2>
141 <p>Shibboleth Origin Deployment Guide<br>
142 Shibboleth Version 1.2<br>
144 <h3>This version of the deploy guide is for Shibboleth v1.2. For documentation
145 related to prior versions of Shibboleth, please consult the appropriate branch
146 in the Shibboleth CVS.</h3>
147 <h3>The default configuration of Shibboleth is <b>not</b> secure and should not
148 be used for protection of production content. The example private key bundled
149 with the distribution is publically available, widely circulated, and well-known;
150 also, the default federation and trust metadata is for testing purposes only.
151 For information about securing a Shibboleth deployment, please refer to the
152 production guide. Shibboleth should only be used to protect sensitive content
153 when deployed carefully in conjunction with proper trust settings and policies.</h3>
155 <p>Before starting, please sign up for all applicable
156 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing
157 lists</a>. Announcements pertinent to Shibboleth deployments and developments
158 and resources for deployment assistance can be found here.</p>
159 <p>Please send any questions, concerns, or eventual confusion to
160 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>.
161 This should include, but not be limited to, questions about the documentation,
162 undocumented problems, installation or operational issues, and anything else
163 that arises. If you have not already obtained it, please
164 <a href="http://shibboleth.internet2.edu/release/shib-download.html">download</a> the Shibboleth origin tarball.</p>
171 <h3><a name="TOC"></a>Shibboleth Origin -- Table of Contents</h3>
176 <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
178 <li><a href="#1.a."><font color="black">Origin</font></a></li>
179 <li><a href="#1.b."><font color="black">Target</font></a></li>
180 <li><a href="#1.c."><font color="black">WAYF</font></a></li>
181 <li><a href="#1.d."><font color="black">Federations</font></a></li>
182 <li><a href="#1.e."><font color="black">Relying Parties</font></a></li>
183 <li><a href="#1.f."><font color="black">Applications</font></a></li>
184 <li><a href="#1.g."><font color="black">Sessions</font></a></li>
188 <h4><a href="#2."><font color="black">Planning</font></a></h4>
190 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
191 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
192 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
193 <li><a href="#2.d."><font color="black">Server Certs</font></a></li>
194 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
195 <li><a href="#2.f."><font color="black">Designate Contacts</font></a></li>
196 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
197 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
198 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
202 <h4><a href="#3."><font color="black">Installation</font></a></h4>
204 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
205 <li><a href="#3.b."><font color="black">Deploy HS and AA</font></a></li>
209 <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
211 <li><a href="#4.a."><font color="black">Basic Configuration</font></a>
213 <li><a href="#4.a.i"><font color="black">Modifying the default
214 Attribute Resolver configuration</font></a></li>
217 <li><a href="#4.b."><font color="black">Key Generation and Certificate
218 Installation</font></a> </li>
219 <li><a href="#4.c."><font color="black">Linking the Authentication
220 System to the HS</font></a>
222 <li><a href="#4.c.i."><font color="black">Enabling client
223 certificate authentication</font> <font color="#5555EE">(optional)</font></a></li>
226 <li><a href="#4.d."><font color="black">Establishing default ARP's for
227 the origin community</font></a></li>
228 <li><a href="#4.e."><font color="black"><span class="fixed">metadatatool</span></font></a></li>
232 <h4><a href="#5."><font color="black">Advanced Configuration</font></a></h4>
234 <li><a href="#5.a."><font color="black"><span class="fixed">
235 origin.xml</span></font></a></li>
236 <li><a href="#5.b."><font color="black">ARP Overview</font></a>
238 <li><a href="#5.b.i."><font color="black">ARP Processing</font></a></li>
239 <li><a href="#5.b.ii."><font color="black">ARP Syntax</font></a></li>
242 <li><a href="#5.c."><font color="black">Sharing certificate/key pairs
243 between Apache and Java keystores</font> <font color="#5555EE">
244 (optional)</font></a></li>
245 <li><a href="#5.d."><font color="black">The Attribute Resolver</font></a>
247 <li><a href="#5.d.i."><font color="black"><span class="fixed">
248 resolvertest</span></font></a></li>
251 <li><a href="#5.e."><font color="black">Local Error Page</font></a></li>
253 <li><a href="#5.f."><font color="black">Using a New Attribute</font></a></li>
258 <h4><a href="#6."><font color="black">Troubleshooting</font></a></h4>
260 <li><a href="#6.a."><font color="black">Basic Testing</font></a></li>
261 <li><a href="#6.b."><font color="black">Logging</font></a></li>
262 <li><a href="#6.c."><font color="black">Common Problems</font></a></li>
271 <h3><a name="1."></a>1. Shibboleth Overview</h3>
272 <p>Shibboleth is a system designed to exchange attributes across realms for the
273 primary purpose of authorization. It provides a secure framework for one
274 organization to transmit attributes about a web-browsing individual across
275 security domains to another institution. In the primary usage case, when a user
276 attempts to access a resource at a remote domain, the user's own home security
277 domain can send certain information about that user to the target site in a
278 trusted exchange. These attributes can then be used by the resource to help
279 determine whether to grant the user access to the resource. The user may have
280 the ability to decide whether to release specific attributes to certain sites by
281 specifying personal Attribute Release Policies (ARP's), effectively preserving
282 privacy while still granting access based on trusted information.</p>
283 <p>When a user first tries to access a resource protected by Shibboleth, they
284 are redirected to a service which asks the user to specify the organization from
285 which they want to authenticate. If the user has not yet locally authenticated
286 to a WebISO service, the user will then be redirected to their home
287 institution's authentication system. After the user authenticates, the
288 Shibboleth components at the local institution will generate a temporary
289 reference to the user, known as a handle, for the individual and send this to
290 the target site. The target site can then use the handle to ask for attributes
291 about this individual. Based on these attributes, the target can decide whether
292 or not to grant access to the resource. The user may then be allowed to access
293 the requested materials.</p>
294 <p>There are several controls on privacy in Shibboleth, and mechanisms are
295 provided to allow users to determine exactly which information about them is
296 released. A user's actual identity isn't necessary for many access control
297 decisions, so privacy often is needlessly compromised. Instead, the resource
298 often utilizes other attributes such as faculty member or member of a certain
299 class. While these are commonly determined using the identity of the user,
300 Shibboleth provides a way to mutually refer to the same principal without
301 revealing that principal's identity. Because the user is initially known to the
302 target site only by a randomly generated temporary handle, if sufficient, the
303 target site might know no more about the user than that the user is a member of
304 the origin organization. This handle should never be used to decide whether or
305 not to grant access, and is intended only as a temporary reference for
306 requesting attributes.</p>
307 <h4><a name="1.a."></a>1.a. Origin</h4>
309 <p>There are four primary components to the origin side in Shibboleth: the
310 Attribute Authority (AA), the Handle Service (HS), the directory service,
311 and the local sign-on system (SSO). The AA and HS are provided with
312 Shibboleth, and an open-source WebISO solution, Pubcookie, can be obtained
313 from www.pubcookie.org; the directory is provided by the origin site.
314 Shibboleth is able to interface with a directory exporting an LDAP interface
315 containing user attributes, and is designed such that programming interfaces
316 to other repositories should be readily implemented. Shibboleth relies on
317 standard web server mechanisms to trigger local authentication. A .htaccess
318 file can be easily used to trigger either the local WebISO system or the web
319 server's own Basic Auth mechanism, which will likely utilize an enterprise
320 authentication system, such as Kerberos.</p>
321 <p>From the origin site's point of view, the first contact will be the
322 redirection of a user to the handle service, which will then consult the SSO
323 system to determine whether the user has already been authenticated. If not,
324 then the browser user will be asked to authenticate, and then sent back to
325 the target URL with a handle bundled in an attribute assertion. Next, a
326 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
327 which will include the previously mentioned handle. The AA then consults the
328 ARP's for the directory entry corresponding to the handle, queries the
329 directory for these attributes, and releases to the SHAR all attributes the
330 SHAR is entitled to know about that user.</p>
332 <h4><a name="1.b."></a>1.b. Target</h4>
334 <p>There are three primary components to the target side in Shibboleth: the
335 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
336 Requester (SHAR), and the resource manager (RM). An implementation of each
337 of these is included in the standard Shibboleth distribution. These
338 components are intended to run on the same web server.</p>
339 <p>From the target's point of view, a browser will hit the RM with a request
340 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
341 in, which will use the WAYF to acquire the name of a handle service to ask
342 about the user. The handle service (HS) will then reply with a SAML
343 authentication assertion containing a handle, which the SHIRE then hands off
344 to the SHAR. The SHAR uses the handle and the supplied address of the
345 corresponding attribute authority (AA) to request all attributes it is
346 allowed to know about the handle. The SHAR performs some basic validation
347 and analysis based on attribute acceptance policies (AAP's). These
348 attributes are then handed off to the RM, which is responsible for using
349 these attributes to decide whether to grant access.</p>
351 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
353 <p>The WAYF service can be either outsourced and operated by a federation or
354 deployed as part of the SHIRE. It is responsible for allowing a user to
355 associate themself with an institution of their specification, then
356 redirecting the user to the known address for the handle service of that
359 <h4><a name="1.d."></a>1.d. Federations</h4>
361 <p>A Shibboleth federation provides part of the underlying trust required
362 for function of the Shibboleth architecture. A federation is a group of
363 organizations(universities, corporations, content providers, etc.) who agree
364 to exchange attributes using the SAML/Shibboleth protocols and abide by a
365 common set of policies and practices. In so doing, they must implicitly or
366 explicitly agree to a common set of guidelines. Joining a federation is not
367 explicitly necessary for operation of Shibboleth, but it dramatically
368 expands the number of targets and origins that can interact without defining
369 bilateral agreements between all these parties.</p>
370 <p>A federation can be created in a variety of formats and trust models, but
371 must provide a certain set of services to federation members. It needs to
372 supply a registry to process applications to the federation and distribute
373 membership information to the origin and target sites. This must include
374 distribution of the PKI components necessary for trust between origins and
375 targets. There also needs to be a set of agreements and best practices
376 defined by the federation governing the exchange, use, and population of
377 attributes before and after transit, and there should be a way to find
378 information on local authentication and authorization practices for
379 federation members.</p>
381 <h4><a name="1.e."></a>1.e. Relying Parties</h4>
383 <p>Some aspects of both origin and target configuration can vary and be
384 expressed in terms of the "relying party". To an origin, a target
385 is a relying party, while targets consider origins to be relying
386 parties (it's a matter of perspective). Certificates, policies, and
387 other aspects of an interaction are specified on the basis of the relying
388 party, and may or may not vary between relying parties depending on the
389 deployment's needs.</p>
390 <p>Each origin and target is assigned a URI, a unique identifier to enable
391 control over configuration down to the level of an individual partner (a single
392 relying party). By convention, this is termed a "providerId". More
393 frequently, an entire federation will be viewed by an origin or target as a
394 single relying party to simplify management. An individual origin or target
395 with which this deployment exchanges information may sometimes be part of
396 multiple relying parties if there are multiple trust agreements
397 under which these transactions are performed. Care should be taken to avoid
398 conflicting or inconsistent configuration in such cases.</p>
400 <h4><a name="1.f."></a>1.f. Applications</h4>
402 <p>Shibboleth "applications" are the primary unit of target
403 configuration. Applications as viewed by the target implementation
404 are not necessarily defined by the same metrics as in other contexts. An
405 individual application represents a set of web resources that operates
406 using the same attribute handling and trust configuration and shares a common
407 <a href="#1.g.">session</a> with the browser user. As a user navigates between
408 resources on a server that cross an application boundary, a new session is
409 established, though user interaction may not be required. As a consequence of
410 the relationship between applications and sessions (which are tracked with
411 a cookie), an application usually does not span more than one virtual host.
412 Apart from cookie-based constraints, web resources can be aggregated into
413 applications in arbitrary ways.</p>
414 <p>A single target deployment may support a large number of applications,
415 but it need not register or publish information about each one with the
416 origins it accepts information from. Instead it can communicate using a
417 more limited set of distinct "providerId" values (often just a
418 single one). This allows targets with a complex internal configuration
419 to be treated as a single entity by origins for the purposes of attribute
422 <h4><a name="1.g."></a>1.g. Sessions</h4>
424 <p>Much of the target implementation is concerned with establishing, and
425 subsequently maintaining, sessions with the browser user on behalf of the
426 <a href="#1.f.">applications</a> at the target. A session consists of a
427 cookie passed between the browser and web server, associated with a
428 security context. The context contains the user's authentication information,
429 and generally a set of attributes that make up the user's identity. Each
430 application maintains distinct sessions with the browser by means of separate
431 cookies. It is important to note that all such sessions are independent and
432 distinct: any session can exist with or without any other session, and the
433 expiration of any one session does not imply the expiration of any other
434 session. Shibboleth also does not support any logout functionality beyond the
435 termination of individual application sessions by deletion of respective
436 cookies; also, there is no way for the target to cause origin-side sessions,
437 such as a user's SSO login, to expire.</p>
438 <p>A browser user accessing a Shibboleth-protected resource may have two
439 outcomes: standard session establishment, and lazy session
440 establishment. The standard session establishment mechanism in which
441 Shibboleth protects the resource in all circumstances results in the
442 establishment of a cookie-based browser session and a set of attributes
443 cached for that application. Shibboleth 1.2 also supports so-called lazy
444 session establishment, in which the resource may be accessed without prior
445 authentication. This means the application must be intelligent enough to
446 determine whether authentication is necessary, and then construct the proper URL
447 to initiate a browser redirect to request authentication; if the
448 application determines none is necessary or uses other authorization
449 mechanisms, then the request for authentication may not need to be triggered.
450 This complex functionality is mostly useful to protect a single URL with
451 different access mechanisms, or to require authenticated access only in
452 instances where the application deems it necessary.</p>
453 <p>Independently of this, a web-based application protected by Shibboleth
454 may have a need to establish its own session with the user. This session
455 may persist well beyond the Shibboleth session, and logouts from this
456 session, if supported, will not terminate a Shibboleth session initiated to
457 access the resource. Application administrators should carefully evaluate
458 the expiration of all sessions to limit vulnerability to attacks or user
459 negligence. Logging out of the entire desktop session is usually the
460 only (relatively) foolproof logout mechanism on the web.</p>
463 <h3><a name="2."></a>2. Planning</h3>
464 <p>There are several essential elements that must be present in the environment
465 to ensure Shibboleth functions well, both political and technical. Shibboleth is
466 entirely written in Java on the origin side. These are the recommendations and
467 requirements for a successful implementation of a Shibboleth origin.</p>
468 <h4><a name="2.a."></a>2.a. Requirements</h4>
470 <li>A common institutional directory service should be operational;
471 Shibboleth comes with LDAP and SQL capabilities built in, and the Attribute
472 Authority has a Java API which will allow specification of interfaces with
473 legacy directories. This is discussed further in <a href="#4.d.">section 4.d</a>.</li>
474 <li>A method to authenticate browser users must be in place, preferably in
475 the form of an enterprise authentication service. Some form of an SSO or a
476 WebISO service is not explicitly necessary for Shibboleth; however, it is
477 highly recommended. Implementation details of this are discussed in
478 <a href="#4.c.">section 4.c</a>.</li>
479 <li>Shibboleth is known to work on Windows, Linux, and Solaris, but should
480 function on any platform that has a Tomcat implementation.</li>
481 <li>A Java servlet container; Shibboleth has been tested extensively with
483 <li>It is recommended that a web server such as Apache be deployed in front
484 of Tomcat to provide authentication services and to control the flow of
485 requests to Tomcat. There may be issues surrounding the number of maximum
486 connections to the web server and to the servlet container.</li>
488 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
490 <p>While it is not necessary for a target or origin to join a federation,
491 doing so greatly facilitates the implementation of multilateral trust
492 relationships. Each federation will have a different application process.
493 When an origin is accepted into a federation, its information is added to
494 the sites file used by the WAYF and target sites.</p>
495 <p>Attribute release and acceptance policies, the use and caching of
496 attributes, and definition of commonly traded attributes are examples of
497 specifications a federation may make. <b>The default configuration that
498 ships with Shibboleth is intended for use in testing against a <span
499 class="fixed">localhost</span> target. In order to interoperate with other
500 relying parties, such as a federation, consult the steps provided by the
501 guidelines of that relying party.</b></p>
503 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
505 <p>Shibboleth's protocols and software have been extensively engineered to
506 provide protection against many attacks. However, the most secure protocol
507 can be compromised if it is placed in an insecure environment. To ensure
508 Shibboleth is as secure as possible, there are several recommended security
509 precautions which should be in place at local sites.</p>
511 <li>SSL use is optional for origin sites. Federation guidelines should
512 be considered when determining whether to implement SSL, and, in
513 general, SSL should be used for interactions with client machines to
514 provide the necessary authentication and encryption to ensure protection
515 from man-in-the-middle attacks. It is strongly suggested that all
516 password traffic or similarly sensitive data should be SSL-protected.
517 Assessment of the risk tradeoff against possible performance degradation
518 should be performed for all applications.</li>
519 <li>Many other attacks can be made on the several redirection steps that
520 Shibboleth takes to complete attribute transfer. The best protection
521 against this is safeguarding the WAYF service and ensuring that rogue
522 targets and origins are not used, generally by development of the trust
523 model underneath Shibboleth. Shibboleth also leverages DNS for security,
524 which is not uncommon, but attacks concerning bad domain information
525 should be considered.</li>
526 <li>Information regarding origin users is generally provided by the
527 authoritative enterprise directory, and the acceptance of requests from
528 target applications can be carefully restricted to ensure that all
529 requests the SHAR performs are authorized and all information the origin
530 provides is accurate. Proper security measures should also be in place
531 on directory access and population(see
532 <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/#AccessControl">
533 Access Control</a> in the
534 <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/">LDAP
535 recipe</a> for more information). Use of plaintext passwords is strongly
536 advised against.</li>
537 <li>Server platforms should be properly secured, commensurate with the
538 level that would be expected for a campus' other security services, and
539 cookie stores on client machines should be well protected.</li>
542 <h4><a name="2.d."></a>2.d. Server Certs</h4>
544 <p>In the Shibboleth architecture, the origin and target must each have
545 various client and/or server certificates for use in signing assertions and
546 creating SSL channels. These should be issued by a commonly accepted CA,
547 which may be stipulated by some Federation rules. Different federations may
548 require the use of different CA's.</p>
550 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
552 <p>The Attribute Authority maintains a set of policies called Attribute
553 Release Policies (or ARP's) that govern the sharing of user attributes with
554 Shibboleth target sites. When a user attempts to access a
555 Shibboleth-protected resource, that resource's SHAR queries the user's AA
556 for all attributes to which it is entitled. The SHAR provides its own name
557 and the URI of the requesting application. The
558 AA finds the attributes associated with the browser user, determines an
559 "Effective ARP" for this user, and then sends to the SHAR only the
560 attribute-value pairs allowed in this policy.</p>
561 <p>An ARP may be thought of as a sort of filter for outbound attributes; it
562 cannot create attributes or data that aren't originally present, but it can
563 limit the attributes released and the values those attributes may have when
564 released. It does not change the information in the data sources in any way.</p>
565 <p>Each ARP is comprised of one or more rules that specify which attributes
566 and values may be released to a given application and that SHAR. The
567 assignment of rules to various targets is quite flexible and includes
568 mechanisms for specifying: that a rule should affect all targets (default
569 rule), exact SHAR names for which a rule is applicable, regular expressions
570 against which SHAR names should be matched to determine if a rule is
571 applicable, and individual applications that may span hosts and URL's as
573 <p>For each request, an Effective ARP is determined by locating all ARP's
574 applicable to the designated user and extracting each rule that matches the
575 querying SHAR and resource. Attributes and values that are specified for
576 release are included in the effective ARP, while those specified for denial
577 are blocked from release. See section <a href="#5.b.i.">5.b.i</a> for
578 details on how ARP's are processed.</p>
579 <p>Various ARP's may be combined in forming the Effective ARP. For instance,
580 the Site ARP is administratively maintained and applies to all users for
581 which the AA is answerable. User ARP's apply to a specific user only, and
582 can be maintained either administratively or by the users themselves. All
583 ARP's are specified using the same syntax and semantics.</p>
585 <h4><a name="2.f."></a>2.f. Designate Contacts</h4>
587 <p>Since Shibboleth deals both with daily technical and operational issues
588 and also with contractual issues, a set of contacts should be set up to
589 support the user base and to facilitate interactions with other Shibboleth
590 sites and federation members. It is recommended that at least technical and
591 administrative contacts be designated. These contacts are then supplied to
592 the federation and optionally to relying parties individually to facilitate
593 communications and troubleshooting.</p>
595 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
597 <p>A primary Shibboleth design consideration was to require very little or
598 no modification to client machines. The only requirement is that a browser
599 is used which supports cookies, redirection and SSL. Browser users will have
600 to perform an additional click to submit the authentication assertion if
601 JavaScript is not functional.</p>
603 <h4><a name="2.h."></a>2.h. Clocks</h4>
605 <p><a href="http://www.ntp.org/">NTP</a> should be run on all
606 web servers. Shibboleth employs a short handle issuance time to protect
607 against replay attacks. Because of this, any significant degree of clock
608 skew can hinder the ability of users to access sites successfully.</p>
610 <h4><a name="2.i."></a>2.i. Other Considerations</h4>
612 <p>Especially for higher education, there are a handful of laws enacted
613 which may have important ramifications on the disclosure of personal
614 information and attributes. Since Shibboleth does not necessarily need to
615 transmit identity, it is an ideal solution for many higher education
616 situations. Nevertheless, all parties within the United States of America
617 are strongly advised to consult the
618 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
619 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
620 legislation before deploying Shibboleth.</p>
628 <h3><a name="3."></a>3. Installation</h3>
629 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
630 <p><b>The following requirements are primarily recommendations based on the most
631 common ways to run Shibboleth. However, the origin should be able to run under
632 any servlet container supporting <span class="fixed">Servlet API v2.3</span>
633 and <span class="fixed">JSP specification 1.2</span>.</b></p>
636 <li><a href="http://http://www.apache.org/dist/httpd/">Apache 1.3.26+
638 <li><a href="http://jakarta.apache.org/tomcat/">Tomcat 4.1.18-24 LE Java
639 server and above or Tomcat 5</a></li>
640 <li><a href="http://java.sun.com/j2se/">Sun J2SE JDK v1.4.1_01 and above</a>
642 <p>Other versions of the JRE are not supported and are known to
643 cause errors when working with certificates.</p>
646 <li>mod_jk or mod_jk2
648 <p>You may need to build mod_jk against Apache, which will generally
649 require GCC or a platform-specific C compiler.</p>
652 <li>An enterprise authentication mechanism
654 <p>Ideally, this will be a WebISO or SSO system such as
655 <a href="http://pubcookie.org/">Pubcookie</a>. The minimal
656 requirement is for the web server to be able to authenticate browser
657 users and supply their identity to the Handle Server.</p>
660 <li>An enterprise attribute store
662 <p>Shibboleth currently supports retrieving user attribute
663 information from an <a href="http://www.openldap.org">LDAP</a>
664 directory or a SQL database. For testing purposes, Shibboleth also
665 supports a minimal echo responder which will always return
666 pre-defined attributes.</p>
671 <h4><a name="3.b."></a>3.b. Deploy HS and AA</h4>
674 <li>Ensure you have already obtained the proper
675 <a href="http://shibboleth.internet2.edu/release/shib-download.html">.tarball</a>.</li>
676 <li>The archive will expand into a <span class="fixed">
677 shibboleth-origin-1.2/</span> directory(<span class="fixed">/opt/</span>
679 <li>Run the following command to move the Java files into Tomcat's tree:<blockquote>
680 <p><span class="fixed">cp /opt/shibboleth-origin-1.2/dist/shibboleth.war
681 /usr/local/tomcat/webapps/</span> </p>
684 <li>Tomcat 4.1.x and Tomcat 5 require that several Java jarfiles used by Shibboleth
685 be located in a special "endorsed" folder to override obsolete classes
686 that Sun includes with their JVM. To deal with this problem use the
687 following command, adjusting paths as needed:<blockquote>
688 <p><span class="fixed">$ cp
689 /opt/shibboleth-origin-1.2/endorsed/*.jar /usr/local/tomcat/common/endorsed</span>
692 <p>Different versions of Tomcat or other Java servers may have other
693 locations in which to place these files or deal with this problem. Refer
694 to your application server's documentation to find out how to properly
695 endorse classes, if necessary.</li>
696 <li>Restart Tomcat, which will automatically detect that there has been
697 a new .war file added. This file will by default be expanded into
698 <span class="fixed">/usr/local/tomcat/webapps/shibboleth</span>.</li>
699 <li><p>Apache must be told to map the URL's for the Shibboleth HS
700 and AA to Tomcat. This is done differently depending on whether
701 Coyote/JK2 or AJP13/JK is used as the connector between Apache
702 and Tomcat. Generally, Tomcat 4.1.x should use AJP13/JK, and Tomcat 5 can use Coyote/JK2.</p>
704 <p><b><span class="fixed">mod_jk</span>:</b></p>
706 <p>The following configuration directs Apache to use mod_jk to redirect
707 queries for Shibboleth components to Tomcat. Two popular ways of doing
708 this are to include the following text directly in <span
709 class="fixed">httpd.conf</span>, or to make a separate file and <span
710 class="fixed">Include</span> it in <span
711 class="fixed">httpd.conf</span>.</p>
714 <span class="fixed">--------- begin ---------<br>
715 <IfModule !mod_jk.c><br>
716 LoadModule jk_module libexec/mod_jk.so<br>
717 </IfModule><br>
719 JkWorkersFile "/usr/local/tomcat/conf/jk/workers.properties"<br>
720 JkLogFile "/usr/local/apache/logs/mod_jk.log"<br>
724 JkMount /shibboleth/* ajp13<br>
726 --------- end ---------</span>
729 <p>Tomcat 4.1.x defaults to having the Coyote connector enabled in <span
730 class="fixed">/conf/server.xml</span>. This fails with <span
731 class="fixed">mod_jk</span> and must be commented out. Then, uncomment
732 and modify the traditional AJP 1.3 connector as follows:</p>
734 <li>Add <span class="fixed">address="127.0.0.1"</span> inside
735 the <span class="fixed"><Ajp13Connector></span> configuration
736 element to prevent off-host access.</li>
737 <li>Add <span class="fixed">tomcatAuthentication="false"</span>
738 to the <span class="fixed"><Ajp13Connector></span>
739 configuration element to ensure that the user's identity is passed
740 from Apache to the servlet environment.</li>
741 <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>
744 <p><b><span class="fixed">mod_jk2</span>:</b></p>
746 <p>The following lines must be added to or placed in a separate
747 configuration file pointed to by <span
748 class="fixed">httpd.conf</span>:</p>
750 <blockquote><span class="fixed">
751 --------- begin ---------<br>
752 <IfModule !mod_jk2.c><br>
753 LoadModule jk2_module libexec/mod_jk2.so<br>
755 --------- end ---------
758 <p>By default, the Coyote/JK2 connector will not permit the <span class="fixed">REMOTE_USER</span> value set by Apache to pass into Tomcat, and thus into Shibboleth. If user authentication will be handled in this fashion(as is true of most deployments), then the <span class="fixed">/conf/jk2.properties</span> file must include the following line:</p>
760 <blockquote><span class="fixed">request.tomcatAuthentication=false</span></blockquote>
762 <p><span class="fixed">mod_jk2</span> must also be told separately to map URL's to the servlets in Tomcat using <span class="fixed">/conf/workers2.properties</span> file in the Apache tree by adding these lines. It may also be necessary to modify the references in the file to the socket port and make sure it matches the port set in the Coyote connector.</p>
764 <blockquote><span class="fixed">
765 --------- begin ---------<br>
766 [uri:/shibboleth/*]<br>
768 --------- end ---------
771 <p><b>Both the mod_jk and mod_jk2 configurations as given will result in a HS URL of <span class="fixed">http://hostname/shibboleth/HS/</span> and an AA URL of <span class="fixed">http://hostname/shibboleth/AA/</span>.</b></p>
773 <li>It is <b>strongly</b> recommended that the AA be SSL-protected to
774 protect attributes in transit. To do so, add an appropriate location
775 block to <span class="fixed">httpd.conf</span>:<blockquote>
776 <p><span class="fixed"><Location /shibboleth/AA>
777 <br> SSLVerifyClient optional
778 <br> SSLOptions +StdEnvVars +ExportCertData
779 <br></Location> </span></p>
782 <li>The origin's default configuration is designed to be tested against
783 a target located on <span class="fixed">localhost</span>, eliminating
784 the need to join InQueue before being able to test an installation. It
785 is recommended that the origin be tested now by constructing accessing a
786 carefully formed URL using any web-browser and verifying that everything
787 is functioning properly.</li>
795 <h3><a name="4."></a>4. Getting Running</h3>
796 <h4><a name="4.a."></a>4.a. Basic Configuration</h4>
798 <p>This section of the deploy guide describes only the default <span
799 class="fixed">origin.xml</span> file and enumerates the essential
800 changes that need to be made to the configuration defaults for the origin to
801 function successfully in a federated environment. More complex configuration
802 will likely be required for many applications and federations; for a fully
803 defined example <span class="fixed">origin.xml</span> and definition of
804 every element and attribute that may be used, please refer to <a
805 href="#5.a.">section 5.a</a>.</p>
806 <p><b>The default configuration that ships with Shibboleth is intended for
807 use in testing against a <span class="fixed">localhost</span> target. In
808 order to interoperate with other relying parties, such as a federation,
809 consult the steps provided by the guidelines of that relying party.</b></p>
810 <p>The main configuration file for Shibboleth's origin side is located
812 class="fixed">/webapps/shibboleth/WEB-INF/classes/conf/origin.xml</span>.
813 The configuration must be consistent with values elsewhere in the
814 deployment, such as the <a href="#4.c.">HS' certificate</a> and with
815 directory access bindings, etc., or access errors may occur. All pathnames
816 are relative, and have an effective root path of <span
817 class="fixed">$TOMCAT_HOME/webapps/shibboleth/WEB-INF/classes/</span>. To
818 specify files outside of the webapp, specify a full URI, such as <span
819 class="fixed">file:///usr/local/shibboleth/</span>.</p>
820 <p>The following is a hyperlinked version of the basic configuration file,
821 followed by a list of elements and attributes that must be modified as a
822 first step to interoperation with production targets. Click on any
823 attribute or element for more information on its population and
826 <blockquote><span class="fixed">
827 <?xml version="1.0"encoding="UTF-8"?><br>
829 <a href="#confShibbolethOriginConfig" class="fixedlink"><ShibbolethOriginConfig <br>
830 xmlns="urn:mace:shibboleth:origin:1.0"<br>
831 xmlns:cred="urn:mace:shibboleth:credentials:1.0"<br>
832 xmlns:name="urn:mace:shibboleth:namemapper:1.0"<br>
833 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br>
834 xsi:schemaLocation="urn:mace:shibboleth:origin:1.0 origin.xsd"<br>
835 AAUrl="http://example.edu/shibboleth/AA"<br>
836 defaultRelyingParty="urn:mace:inqueue"<br>
837 providerId="urn:mace:inqueue:shibdev.edu"></a><br>
839 <a href="#confRelyingParty" class="fixedlink"> <RelyingParty name="urn:mace:inqueue" signingCredential="foo"><br></a>
840 <a href="#confHSNameFormat" class="fixedlink"> <HSNameFormat nameMapping="crypto"/></a><br>
841 <a href="#confRelyingParty" class="fixedlink"> </RelyingParty></a><br>
843 <a href="#confReleasePolicyEngine" class="fixedlink"> <ReleasePolicyEngine><br></a>
844 <a href="#confArpRepository" class="fixedlink"> <ArpRepository implementation="edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository"></a><br>
845 <a href="#confPath" class="fixedlink"> <Path>/conf/arps/</Path></a><br>
846 <a href="#confArpRepository" class="fixedlink"> </ArpRepository></a><br>
847 <a href="#confReleasePolicyEngine" class="fixedlink"> </ReleasePolicyEngine></a><br>
849 <!--<br>
850 <a href="#confLogging" class="fixedlink"> <Logging></a><br>
851 <a href="#confLog4JConfig" class="fixedlink"> <Log4JConfig location="file:///tmp/log4j.properties"/></a><br>
852 <a href="#confLogging" class="fixedlink"> </Logging></a><br>
853 <a href="#confLogging" class="fixedlink"> <Logging></a><br>
854 <a href="#confErrorLog" class="fixedlink"> <ErrorLog level="DEBUG" location="file:///tmp/shib-error.log"/></a><br>
855 <a href="#confTransactionLog" class="fixedlink"> <TransactionLog location="file:///tmp/shib-access.log"/></a><br>
856 <a href="#confLogging" class="fixedlink"> </Logging></a><br>
857 --><br>
859 <a href="#confNameMapping" class="fixedlink"> <NameMapping <br>
860 xmlns="urn:mace:shibboleth:namemapper:1.0"<br>
861 id="crypto"<br>
862 format="urn:mace:shibboleth:1.0:nameIdentifier"<br>
863 type="SharedMemoryShibHandle"<br>
864 handleTTL="1800"/></a><br>
866 <a href="#confCredentials" class="fixedlink"> <Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a><br>
867 <a href="#confFileResolver" class="fixedlink"> <FileResolver Id="foo"></a><br>
868 <a href="#confKey" class="fixedlink"> <Key format="DER"></a><br>
869 <a href="#confPath" class="fixedlink"> <Path>/conf/shib2.key</Path></a><br>
870 <a href="#confKey" class="fixedlink"> </Key></a><br>
871 <a href="#confCertificate" class="fixedlink"> <Certificate format="PEM"></a><br>
872 <a href="#confPath" class="fixedlink"> <Path>/conf/shib2.crt</Path></a><br>
873 <a href="#confCertificate" class="fixedlink"> </Certificate></a><br>
874 <a href="#confFileResolver" class="fixedlink"> </FileResolver></a><br>
875 <a href="#confCredentials" class="fixedlink"> </Credentials></a><br>
876 <a href="#confFederationProvider" class="fixedlink"> <FederationProvider type="edu.internet2.middleware.shibboleth.metadata.provider.XMLMetadataLoadWrapper" uri="/conf/sites.xml"/></a><br>
878 <a href="#confShibbolethOriginConfig" class="fixedlink"></ShibbolethOriginConfig></a>
881 <p>The following changes must be made to the default configuration before the
882 origin will interoperate in a federation.</p>
885 <p>Attributes within the <a href="#confShibbolethOriginConfig"><span
886 class="fixed">ShibbolethOriginConfig</span></a> element:</p>
888 <li><a href="#confShibbolethOriginConfig"><span class="fixed">AAUrl=<i>URL</i></span></a>
890 <p>This will be the URL assigned the AA servlet in step
891 <a href="#3.b.">3.b</a>. Note that this <b>must</b> be an
892 <span class="fixed">https://</span> URL in order for the AA to
893 authenticate the requesting SHAR.</p>
896 <li><a href="#confShibbolethOriginConfig"><span class="fixed">providerID=<i>URI</i></span></a>
898 <p>This will be the URI assigned to this origin by the
902 <li><a href="#confShibbolethOriginConfig"><span class="fixed">defaultRelyingParty=<i>URI</i></span></a>
904 <p>This is the URI of the primary federation that the origin
911 <p>Although not explicitly necessary, it's highly recommended for
912 initial installation and testing that logging be activated at the <span
913 class="fixed">DEBUG</span> level by uncommenting the second <a
914 href="#confLogging"><span class="fixed">Logging</span></a> element and
915 ensuring that the pathnames for <a href="#confTransactionLog"><span
916 class="fixed">TransactionLog</span></a> and <a
917 href="#confErrorLog"><span class="fixed">ErrorLog</span></a> are
918 appropriate. However, in production, this will slow the operation of
919 the origin considerably.</p>
922 <p>The default configuration file informs Shibboleth to load its key and
923 certificate from flat files. The <a href="#confKey"><span
924 class="fixed">Key</span></a> element specifies a key in <span
925 class="fixed">DER</span> format located at <span
926 class="fixed">/conf/shib2.key</span>, while the <a
927 href="#confCertificate"><span class="fixed">Certificate</span></a>
928 element specifies the corresponding certificate in <span
929 class="fixed">PEM</span> format located at <span
930 class="fixed">/conf/shib2.crt</span>. If any of these values is
931 inconsistent with your deployment, change it accordingly. Note that
932 keys are supported in a variety of formats: DER, PEM, encrypted PEM,
933 PKCS8, and encrypted PKCS8. If a keystore must be used instead, consult
934 <a href="#5.a.">section 5.a</a> for appropriate structure and details on
936 <p>To create proper keys and certificates for production use, please
937 refer to <a href="#4.b.">section 4.b</a>.</p>
943 <h4><a name="4.a.i"></a>4.a.i Modifying the default Attribute Resolver
946 <p>The resolver.xml file controls the retrieval of attributes from
947 enterprise repositories, and the process of mapping them to Shibboleth/SAML
948 attributes. For more precise information regarding how attributes are
949 processed or syntactically formed, please refer to section <a href="#5.d.">
951 <p>In order to make the Shibboleth software operational, however, minor
952 edits must be made to the example version of the resolver.xml file. The file
953 can be found at <span class="fixed">/webapps/shibboleth/WEB-INF/classes/conf/resolver.xml.</span>
954 Two changes are necessary:</p>
955 <p>1. The value of the smartScope attribute should be changed to the Domain
956 Name value submitted to the Federation. It appears on two
957 SimpleAttributeDefinition elements: eduPersonScopedAffiliation and
958 eduPersonPrincipalName.</p>
959 <p>2. The comment indicators should be removed from around the definitions
960 of those two elements ( <!-- and --> ).</p>
961 <p>The default configuration of the attribute resolver utilizes the sample
962 echo responder, which always responds with fixed, dummy values. The AA must
963 be configured to use LDAP or SQL, depending on your primary attribute
966 <h4><a name="4.b."></a>4.b. Key Generation and Certificate Installation</h4>
968 <p>The SAML messages generated by the HS must be digitally signed, which
969 requires the HS be issued a private key and corresponding certificate. In
970 most instances, the web server will be configured to use SSL, which will
971 also require a cert/key pair. In many cases, these certs/keys can be shared
972 between Apache/IIS and the HS; for information on sharing certificate/key
973 pairs between Apache and Java keystores see section <a
974 href="#5.c.">5.c.</a>. Sharing credentials is simplest when using flat-file
975 unencrypted PEM-format certs/keys as expected by Apache.</p>
977 <p>The 1.2 origin accommodates keys and certificates in a very wide variety
978 of formats and storage mechanisms. Java keystores may be specified in a <a
979 href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a>
980 element or flat-file keys and certificates may be specified using a <a
981 href="#confFileResolver"><span class="fixed">FileResolver</span></a> in <a
982 href="#5.a."><span class="fixed">origin.xml</span></a>. The information in
983 that file must be consistent with the values that are established in this
986 <p>The following text suggests a way to generate a key and certificate in
987 flat-file PEM format, which will be simplest for most deployments. Once the
988 key pair is generated, the public key must be sent to a certificate
989 authority recognized by relying parties with which this origin will interact
990 to be signed into a certificate. OpenSSL must be installed to perform this
993 <p>The certificate and key file location should be based on whether they
994 will also be used for Apache. If they will be used as a server certificate
995 as well, they should probably be in the Apache tree in the usual <span
996 class="fixed">mod_ssl</span>-defined locations inside the Apache
997 configuration folder. If the certificate and key will only be used by
998 Shibboleth, they can be put in the same folder with the <span
999 class="fixed">origin.xml</span> file and protected appropriately.</p>
1001 <p>OpenSSL commands to generate a new keypair and a certificate request are
1002 shown here, assuming 2048 bit RSA keys are to be used:</p>
1004 <blockquote><span class="fixed"> $ openssl genrsa -des3 -out ssl.key
1005 2048<br> $ openssl req -new -key ssl.key -out ssl.csr </span></blockquote>
1007 <p>The signed certificate file returned by the CA should be usable directly,
1008 or can be converted to PEM format using the <span class="fixed">openssl
1009 x509</span> command.</p>
1011 <h4><a name="4.c."></a>4.c. Linking the Authentication System to the HS</h4>
1013 <p>The interaction between the HS and the local authentication system is
1014 implemented by supplying the HS with the identity of the browser user. Most
1015 often, this will mean protecting the HS servlet with some form of local
1016 authentication that populates <span class="fixed">REMOTE_USER</span>.
1017 Location blocks can be added to <span class="fixed">httpd.conf</span>,
1018 associating the appropriate authentication mechanism with the URL of the HS
1019 servlet. The following example demonstrates association of a very basic
1020 authentication method with the HS:</p>
1022 <p><span class="fixed"><Location /shibboleth/HS><br>
1024 AuthName "Internet2 Handle Service"<br>
1025 AuthUserFile /usr/local/apache/conf/user.db<br>
1026 require valid-user<br>
1027 </Location><br>
1030 <p>Note that .htaccess files cannot be used for this purpose because URL's
1031 are "virtualized" by Tomcat.</p>
1032 <p>It is recommended that the origin be tested at the end of this process
1033 using the process described in section <a href="#6.a.">6.a</a>.</p>
1035 <h4><a name="4.c.i."></a>4.c.i. Enabling client certificate authentication
1036 <font color="#5555EE">(optional)</font></h4>
1039 <p>Shibboleth supports client certificate authentication by utilization
1040 of a filter that relies on the web server to do all processing to ensure
1041 that the certificate is both valid and appropriate for the application.
1042 An example deployment descriptor is included with the Shibboleth
1043 distribution at <span class="fixed">$SHIB_HOME/webAppConfig/origin-client-cert.xml</span>.
1044 To enable the filter, add the following to the deployment descriptor (<span class="fixed">web.xml</span>):</p>
1046 <p><span class="fixed"> <filter><br>
1047 <filter-name><br>
1048 Client Cert AuthN Filter<br>
1049 </filter-name><br>
1050 <filter-class><br>
1051 edu.internet2.middleware.shibboleth.utils.ClientCertTrustFilter<br>
1052 </filter-class><br>
1053 </filter><br>
1056 <filter-mapping><br>
1057 <filter-name><br>
1058 Client Cert AuthN Filter<br>
1059 </filter-name><br>
1060 <url-pattern><br>
1061 /HS<br>
1062 </url-pattern><br>
1063 </filter-mapping><br>
1066 <p>By default, the filter pulls the principal name out of the
1067 <span class="fixed">CN</span> of the cert's
1068 <span class="fixed">Subject</span> by using regular expression
1069 grouping. This may be done using patterns such as:</p>
1071 <p><span class="fixed">regex: '.*CN=([^,/]+).*' match group: 1</span>
1074 <p>The servlet filter will accept two initialization parameters,
1075 <span class="fixed">regex</span> and <span class="fixed">
1076 matchGroup</span> that can be used to extract the principal name
1080 <h4><a name="4.d."></a>4.d. Establishing default ARP's for the origin community</h4>
1081 <p><b>For a more basic introduction to ARP's, please refer to section
1082 <a href="#2.e.">2.e</a>.</b></p>
1084 <p>An ARP determines which attributes are released to a SHAR when a user
1085 tries to access a resource. It acts as a sort of filter on user information
1086 contained in the authoritative directory, deciding what can be released to
1087 whom, but not modifying or creating information itself. ARP's are generally
1088 administered by the site, but Shibboleth will provide for users to broker
1089 control of their own information and privacy by allowing them to create
1090 ARP's pertaining to themselves.</p>
1091 <p>It is recommended that a set of policies be established between an origin
1092 and frequently accessed targets to specify default releases of expected
1093 attributes. Federation guidelines may provide more information on population
1095 <p>Currently, there is no direct mechanism for users to create their own
1096 ARP's besides direct XML writing. In future versions, a GUI will be provided
1097 for simpler management of ARP's. Care should be given to balancing giving
1098 sufficient control over information to users and avoiding access problems.
1099 For example, users may decide to restrict the release of their personal
1100 information to such a degree that access to a site for a class may become
1101 impossible because Shibboleth cannot release enough information to grant
1103 <p>The Shibboleth distribution contains an example site arp that releases
1104 the eduPersonScopedAffiliation attribute to all targets. For more precise
1105 information regarding how ARP's are processed or syntactically formed,
1106 please refer to section <a href="#5.b.i.">5.b.i</a>.</p>
1108 <h4><a name="4.e."></a>4.e. <span class="fixed">metadatatool</span></h4>
1110 <p>The Shibboleth origin leverages metadata distributed by relying parties and federations to validate the identity of requesters and the resource providers on whose behalf the request is being made. This metadata is cached locally in the form of <span class="fixed">sites.xml</span> files. Shibboleth includes a simple utility called <span class="fixed">metadatatool</span> which can be used to refresh a <span class="fixed">sites.xml</span> file. These files are then pointed to by <a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a> elements in <a href="#5.a."><span class="fixed">shibboleth.xml</span></a>.</p>
1111 <p>The following command is appropriate for most deployments and is run from the $SHIB_HOME directory. This should be frequently run by adding it to a <span class="fixed">crontab</span> to ensure that the data is fresh.</p>
1113 <blockquote><span class="fixed">bin/metadatatool -i https://wayf.internet2.edu/InQueue/sites.xml -k conf/internet2.jks -p shib123 -a sitesigner -o /your_path_here/sites.xml</span></blockquote>
1115 <p>This is a list of all the command-line parameters that may be specified:</p>
1117 <blockquote><span class="fixed">when signing: -i <uri> -s -k <keystore> -a <alias> -p <pass> [-o
1118 <outfile>]<br>
1119 when updating: -i <uri> [-k <keystore> -a <alias> OR -N ] [-o <outfile>]<br>
1121 <table border="0" cellpadding="0" cellspacing="0">
1122 <tr><td width="150">-i,--in</td><td>input file or url</td></tr>
1123 <tr><td width="150">-k,--keystore</td><td>pathname of Java keystore file</td></tr>
1124 <tr><td width="150">-a,--alias</td><td>alias of signing or verification key</td></tr>
1125 <tr><td width="150">-p,--password</td><td>keystore/key password</td></tr>
1126 <tr><td width="150">-o,--outfile</td><td>write signed copy to this file instead of stdout</td></tr>
1127 <tr><td width="150">-s,--sign</td><td>sign the input file and write out a signed version</td></tr>
1128 <tr><td width="150">-N,--noverify</td><td>allows update of file without signature check</td></tr>
1129 <tr><td width="150">-h,--help</td><td>print a list of configuration options</td></tr>
1130 <tr><td width="150">-x,--ns</td><td>XML namespace of root element</td></tr>
1131 <tr><td width="150">-n,--name</td><td>name of root element</td></tr>
1133 </span></blockquote>
1134 <p>Shibboleth 1.2 still utilizes <span class="fixed">mod_ssl</span> for verification of certificates presented by SHAR's when processing attribute requests. This requires an updated <span class="fixed">ca-bundle.crt</span> to ensure that all appropriate certificate authorities used by relying parties are recognized.</p>
1141 <h3><a name="5."></a>5. Advanced Configuration</h3>
1142 <h4><a name="5.a."></a>5.a. <span class="fixed">origin.xml</span></h4>
1144 <p>Shibboleth 1.2 origins are configured using the <span
1145 class="fixed">origin.xml</span> file located in <span
1146 class="fixed">/webapps/shibboleth/WEB-INF/classes/conf/origin.xml</span>.
1147 The XML consists of a set of individual elements that describe how the
1148 origin should operate, which may each have their own attributes or appear
1149 within other elements. This structure is represented through
1150 cross-references in the definitions and the examples presented in <a
1151 href="#4.a.">section 4.a</a>, below, and through the <a
1152 href="http://marsalis.internet2.edu/cgi-bin/viewcvs.cgi/shibboleth/java/data/">examples
1154 <p>The <a href="#confShibbolethOriginConfig"><span class="fixed">AAUrl,
1155 defaultRelyingParty, and providerId attributes</span></a> of the <a
1156 href="#confShibbolethOriginConfig"><span
1157 class="fixed">ShibbolethOriginConfig</a> element provide default values that
1158 will be used either when interacting with a target version 1.1 or lower or
1159 when not overridden by attributes on a <a href="#confRelyingParty"><span
1160 class="fixed">RelyingParty element</span></a> matching this request.</p>
1161 <p>The following is an example <span
1162 class="fixed">origin.xml</span> file which contains all possible
1163 configuration parameters and values. The configuration must be consistent
1164 with values elsewhere in the deployment or access errors may occur. For a
1165 more basic example, consult <a href="#4.a.">section 4.a</a>. This is useful
1166 to demonstrate the structure that other types of configurations have. Few
1167 deployments will need configuration files this complex.</p>
1169 <blockquote><span class="fixed">
1170 <?xml version="1.0" encoding="UTF-8"?><br>
1172 <a href="#confShibbolethOriginConfig" class="fixedlink"><ShibbolethOriginConfig<br>
1173 xmlns="urn:mace:shibboleth:origin:1.0"<br>
1174 xmlns:cred="urn:mace:shibboleth:credentials:1.0"<br>
1175 xmlns:name="urn:mace:shibboleth:namemapper:1.0"<br>
1176 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"<br>
1177 xsi:schemaLocation="urn:mace:shibboleth:origin:1.0 origin.xsd"<br>
1178 AAUrl="http://example.edu/shibboleth/AA"<br>
1179 defaultRelyingParty="urn:mace:inqueue"<br>
1180 providerId="urn:mace:inqueue:shibdev.edu"></a><br>
1182 <!-- Default relying party --><br>
1183 <a href="#confRelyingParty" class="fixedlink"><RelyingParty name="urn:mace:inqueue" signingCredential="foo"></a><br>
1184 <a href="#confHSNameFormat" class="fixedlink"><HSNameFormat nameMapping="crypto"/></a><br>
1185 <a href="#confRelyingParty" class="fixedlink"></RelyingParty></a><br>
1187 <!-- This site is in InQueue, but we want to send explicit errors to them --><br>
1188 <a href="#confRelyingParty" class="fixedlink"><RelyingParty name="urn:mace:inqueue:example.edu" signingCredential="foo" passThruErrors="true"></a><br>
1189 <a href="#confHSNameFormat" class="fixedlink"><HSNameFormat nameMapping="crypto"/></a><br>
1190 <a href="#confRelyingParty" class="fixedlink"></RelyingParty></a><br>
1192 <!-- This references domain local service providers --><br>
1193 <a href="#confRelyingParty" class="fixedlink"><RelyingParty name="urn-x:localFed" signingCredential="bar" passThruErrors="true" providerId="urn-x:localSite"></a><br>
1194 <a href="#confHSNameFormat" class="fixedlink"><HSNameFormat nameMapping="clear"/></a><br>
1195 <a href="#confRelyingParty" class="fixedlink"></RelyingParty></a><br>
1197 <a href="#confReleasePolicyEngine" class="fixedlink"><ReleasePolicyEngine></a><br>
1198 <a href="#confArpRepository" class="fixedlink"><ArpRepository implementation="edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository"></a><br>
1199 <a href="#confPath" class="fixedlink"><Path>/conf/arps/</Path></a><br>
1200 <a href="#confArpRepository" class="fixedlink"></ArpRepository></a><br>
1201 <a href="#confReleasePolicyEngine" class="fixedlink"></ReleasePolicyEngine></a><br>
1203 <a href="#confLogging" class="fixedlink"><Logging></a><br>
1204 <a href="#confErrorLog" class="fixedlink"><ErrorLog level="DEBUG" location="file:///var/log/shib-error.log" /></a><br>
1205 <a href="#confTransactionLog" class="fixedlink"><TransactionLog location="file:///var//log/shib-access.log" /></a><br>
1206 <a href="#confLogging" class="fixedlink"></Logging></a><br>
1208 <a href="#confNameMapping" class="fixedlink"><NameMapping<br>
1209 xmlns="urn:mace:shibboleth:namemapper:1.0"<br>
1210 id="crypto"<br>
1211 format="urn:mace:shibboleth:1.0:nameIdentifier"<br>
1212 type="SharedMemoryShibHandle"<br>
1213 handleTTL="1800"/></a><br>
1215 <a href="#confNameMapping" class="fixedlink"><NameMapping<br>
1216 xmlns="urn:mace:shibboleth:namemapper:1.0"<br>
1217 id="clear"<br>
1218 format="urn-x:test:NameIdFormat1"<br>
1219 type="Principal"/></a><br>
1221 <a href="#confCredentials" class="fixedlink"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a><br>
1222 <a href="#confFileResolver" class="fixedlink"><FileResolver Id="foo"></a><br>
1223 <a href="#confKey" class="fixedlink"><Key format="DER"></a><br>
1224 <a href="#confPath" class="fixedlink"><Path>/conf/shib2.key</Path></a><br>
1225 <a href="#confKey" class="fixedlink"></Key></a><br>
1226 <a href="#confCertificate" class="fixedlink"><Certificate format="PEM"></a><br>
1227 <a href="#confPath" class="fixedlink"><Path>/conf/shib2.crt</Path></a><br>
1228 <a href="#confCertificate" class="fixedlink"></Certificate></a><br>
1229 <a href="#confFileResolver" class="fixedlink"></FileResolver></a><br>
1231 <a href="#confKeyStoreResolver" class="fixedlink"><KeyStoreResolver Id="bar" storeType="JKS"></a><br>
1232 <a href="#confPath" class="fixedlink"><Path>/conf/keystore.jks</Path></a><br>
1233 <a href="#confKeyAlias" class="fixedlink"><KeyAlias>shibhs</KeyAlias></a><br>
1234 <a href="#confCertAlias" class="fixedlink"><CertAlias>shibhs</CertAlias></a><br>
1235 <a href="#confStorePassword" class="fixedlink"><StorePassword>shibhs</StorePassword></a><br>
1236 <a href="#confKeyPassword" class="fixedlink"><KeyPassword>shibhs</KeyPassword></a><br>
1237 <a href="#confKeyStoreResolver" class="fixedlink"></KeyStoreResolver></a><br>
1238 <a href="#confCredentials" class="fixedlink"></Credentials></a><br>
1240 <a href="#confFederationProvider" class="fixedlink"><FederationProvider type="edu.internet2.middleware.shibboleth.metadata.provider.XMLMetadataLoadWrapper"<br>
1241 uri="/conf/sites.xml"/></a><br>
1242 <a href="#confFederationProvider" class="fixedlink"><FederationProvider type="edu.internet2.middleware.shibboleth.metadata.provider.XMLMetadataLoadWrapper"<br>
1243 uri="/conf/local-sites.xml"/></a><br>
1245 <a href="#confShibbolethOriginConfig" class="fixedlink"></ShibbolethOriginConfig></a>
1246 </span></blockquote>
1248 <p>The following is a complete, alphabetical list of all configuration
1249 elements and their valid attributes and population. Each element also has a
1250 description of the elements it may contain and the elements that may contain
1253 <p>All pathnames are relative, and have an effective root path of <span
1254 class="fixed">$TOMCAT_HOME/webapps/shibboleth/WEB-INF/classes/</span>. To
1255 specify files outside of the webapp, specify a full URI, such as <span
1256 class="fixed">file:///usr/local/shibboleth/</span>.</p>
1257 <p>All elements are optional unless otherwise specified. All attributes of
1258 an element are optional unless designated <span
1259 class="mandatory">mandatory</span> by a purple background.</p>
1262 <dd class="attribute"><a name="confArpRepository"><span class="fixed"><ArpRepository implementation ="edu.internet2.middleware.shibboleth.aa.arp.provider.FileSystemArpRepository"></span></a></dd>
1263 <dd class="value"><p>This element specifies an individual implementation
1264 of a release policy engine, with the given value specifying Shibboleth's
1265 file-based ARP repository implementation, which is currently the only
1266 available. This must contain a <a href="#confPath"><span
1267 class="fixed">Path</span></a> element pointing to the directory
1268 containing ARP's to be used by this engine. For more information
1269 regarding ARP's, consult section <a href="#4.d.">4.d</a> for basic
1270 information and <a href="#5.b.">5.b</a> for advanced configuration and
1271 syntax.</p><p>Note that the set of principals that an ARP applies to is
1272 not expressed by the ARP itself, but rather the implementation of the
1273 ARP repository. For example, if the ARP repository were implemented in
1274 LDAP, the ARP's that apply to a user would be attributes of that
1275 user's personal LDAP entry, and the site ARP would be an attribute
1276 of an entry representing the site. While not performed by the built-in
1277 ARP repository, a repository implementation might also implement group
1278 ARP's; for example, in an LDAP directory, the user entry might have
1279 some group membership attributes that refer to group entries, and those
1280 group entries would have ARP attributes, and all those ARP's would
1281 be applicable.</p></dd>
1283 <dd class="attribute"><a name="confCAPath"><span class="fixed"><CAPath><i>pathname</i></CAPath></span></a></dd>
1284 <dd class="value">Paired with a <a href="#confPath"><span
1285 class="fixed">Path</span></a> element and contained by a <a
1286 href="#confFileResolver"><span class="fixed">FileResolver</span></a>
1287 element, this element allows for the specification of additional
1288 certificates in the chain up to the trust anchor. As many <span
1289 class="fixed">CAPath</span> elements as necessary to complete the chain
1290 may be specified. The expectations of the target and the federation may
1291 determine the necessity for the use of this field.</dd>
1293 <dd class="attribute"><a name="confCertAlias"><span class="fixed"><CertAlias><i>string</i></CertAlias></span></a></dd>
1294 <dd class="value">Specifies the alias for the certificate corresponding
1295 to the private key used by the HS. If no alias is specified, defaults
1296 to the private key's alias. Contained by the <a
1297 href="#confKeyStoreResolver"><span
1298 class="fixed">KeyStoreResolver</span></a> element.</dd>
1300 <dd class="attribute"><a name="confCertificate"><span class="fixed"><Certificate format="<i>type</i>"></span></a></dd>
1301 <dd class="value">This specifies the certificate corresponding to this
1302 set of credentials. The certificate itself must be referred to using a
1303 <a href="#confPath"><span class="fixed">Path</span></a> element
1304 contained by this element. If this certificate isn't self-signed or
1305 signed by a root familiar to the target, the files of certificates in
1306 the path to the root may be specified using one or more <a
1307 href="#confPath"><span class="fixed">CAPath</span></a> elements. Valid
1308 encodings are <span class="fixed">PEM</span> and <span
1309 class="fixed">DER</span>. It resides within the <a
1310 href="#confFileResolver"><span class="fixed">FileResolver</span></a> element
1311 and must be paired with the corresponding private key using the <a
1312 href="#confKey"><span class="fixed">Key</span></a> element.</dd>
1314 <dd class="attribute"><a name="confCredentials"><span class="fixed"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></span></a></dd>
1315 <dd class="value">This element is the container for credentials used by
1316 the credential mechanism specified by the <a
1317 href="#confShibbolethOriginConfig"><span
1318 class="fixed">ShibbolethOriginConfig</span></a> element. It must
1319 contain one <a href="#confFileResolver"><span
1320 class="fixed">FileResolver</span></a> element for flat key and
1321 certificate files or one <a href="#confKeyStoreResolver"><span
1322 class="fixed">KeyStoreResolver</span></a> element for compound
1325 <dd class="attribute"><a name="confErrorLog"><span class="fixed"><ErrorLog level="<i>level</i>" location="<i>URL</i>"></span></a></dd>
1326 <dd class="value">Paired with a <a href="#confTransactionLog"><span
1327 class="fixed">TransactionLog</span></a> element, this will log any
1328 errors encountered by the origin above a certain logging threshold to a
1329 flat file at the referenced <span class="fixed">URL</span>. Valid
1330 levels in order of decreasing sensitivity are <span
1331 class="fixed">DEBUG</span>, <span class="fixed">INFO</span>, <span
1332 class="fixed">WARN</span>, <span class="fixed">ERROR</span>, and <span
1333 class="fixed">FATAL</span>. If no logging is desired, specify <span
1334 class="fixed">OFF</span>; defaults to <span class="fixed">WARN</span>.
1335 Must be contained by a <a href="#confLogging"><span
1336 class="fixed">Logging</span></a> element.</dd>
1338 <dd class="attribute"><a name="confFederationProvider"><span class="fixed"><FederationProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.metadata.provider.XMLMetadataLoadWrapper"</span> uri="<i>pathname</i>"/></span></a></dd>
1339 <dd class="value">Individual sets of targets in the form of an
1340 XML file that this origin will trust to make
1341 requests may be specified by adding <span
1342 class="fixed">FederationProvider</span> elements to the main <a
1343 href="#confShibbolethOriginConfig"><span
1344 class="fixed">ShibbolethOriginConfig</span></a> element for each. The
1345 <span class="fixed">uri</span> attribute points to an
1346 XML file, generally signed and distributed by federations.
1347 This file should be regularly refreshed using
1348 <a href="#4.e."><span class="fixedwidth">metadatatool</span></a>.</dd>
1350 <dd class="attribute"><a name="confFileResolver"><span class="fixed"><FileResolver Id="<i>string</i>"></span></a></dd>
1351 <dd class="value">This element defines a pair of files used to store a
1352 private key and certificate associated with a given identifier and is
1353 contained by the <a href="#confCredentials"><span
1354 class="fixed">Credentials</span></a> element. <a
1355 href="#confRelyingParty"><span class="fixed">RelyingParty</span></a>
1356 elements will refer to these identifiers allowing multiple resolver
1357 elements to be used to specify different credential storage for
1358 different federations or target sites. It must contain one <a
1359 href="#confKey"><span class="fixed">Key</span></a> element and should
1360 contain one <a href="#confCertificate"><span
1361 class="fixed">Certificate</span></a> element.</dd>
1363 <dd class="attribute"><a name="confHSNameFormat"><span class="fixed"><HSNameFormat <span class="mandatory">nameMapping="<i>id</i>"</span>/></span></a></dd>
1364 <dd class="value">Individual <a href="#confRelyingParty"><span
1365 class="fixed">RelyingParty</span></a> elements may contain this element
1366 to specify the <a href="#confNameMapping"><span
1367 class="fixed">NameMapping</span></a> element referenced by <span
1368 class="fixed">id</span> to be used in generating subject names for this
1369 relying party. If this element is not present, default Shibboleth
1370 handles will be used.</dd>
1372 <dd class="attribute"><a name="confKey"><span class="fixed"><Key format="<i>type</i>"></span></a></dd>
1373 <dd class="value">This specifies the file containing a private key to be
1374 used by a set of credentials. Valid encodings are <span
1375 class="fixed">PEM</span> and <span class="fixed">DER</span>. Keys are
1376 supported in a variety of formats: DER, PEM, encrypted PEM, PKCS8, and
1377 encrypted PKCS8. It resides within the <a
1378 href="#confFileResolver"><span class="fixed">FileResolver</span></a>
1379 element, should be paired with a <a href="#confCertificate"><span
1380 class="fixed">Certificate</span></a> element, and contain a <a
1381 href="#confPath"><span class="fixed">Path</span></a> element.</dd>
1383 <dd class="attribute"><a name="confKeyAlias"><span class="fixed"><KeyAlias><i>string</i></KeyAlias></span></a></dd>
1384 <dd class="value">Specifies the alias used for accessing the private
1385 key. Contained by the <a href="#confKeyStoreResolver"><span
1386 class="fixed">KeyStoreResolver</span></a> element.</dd>
1388 <dd class="attribute"><a name="confKeyPassword"><span class="fixed"><KeyPassword><i>string</i></KeyPassword></span></a></dd>
1389 <dd class="value">Specifies the password used to retrieve the private
1390 key. Contained by the <a href="#confKeyStoreResolver"><span
1391 class="fixed">KeyStoreResolver</span></a> element.</dd>
1393 <dd class="attribute"><a name="confKeyStoreKeyAlias"><span class="fixed"><KeyStoreKeyAlias><i>string</i></KeyStoreKeyAlias></span></a></dd>
1394 <dd class="value">Specifies the alias used for accessing the private
1395 key. Contained by the <a href="#confNameMapping"><span
1396 class="fixed">NameMapping</span></a> element when a <span
1397 class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1399 <dd class="attribute"><a name="confKeyStoreKeyPassword"><span class="fixed"><KeyStoreKeyPassword><i>string</i></KeyStoreKeyPassword></span></a></dd>
1400 <dd class="value">Specifies the password used to retrieve the private
1401 key. Contained by the <a href="#confNameMapping"><span
1402 class="fixed">NameMapping</span></a> element when a <span
1403 class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1405 <dd class="attribute"><a name="confKeyStorePassword"><span class="fixed"><KeyStorePassword><i>string</i></KeyStorePassword></span></a></dd>
1406 <dd class="value">Specifies the password to access the keystore
1407 containing the private key to be used for symmetric encryption.
1408 Contained by the <a href="#confNameMapping"><span
1409 class="fixed">NameMapping</span></a> element when a <span
1410 class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1412 <dd class="attribute"><a name="confKeyStorePath"><span class="fixed"><KeyStorePath><i>string</i></KeyStorePath></span></a></dd>
1413 <dd class="value">Specifies the location of the keystore containing the
1414 private key to be used for symmetric encryption to pass handles between
1415 the HS and AA. Contained by the <a href="#confNameMapping"><span
1416 class="fixed">NameMapping</span></a> element when a <span
1417 class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1419 <dd class="attribute"><a name="confKeyStoreResolver"><span class="fixed"><KeyStoreResolver Id="<i>string</i>" storeType="<i>type</i>"></span></a></dd>
1420 <dd class="value">This element is contained by the <a
1421 href="#confCredentials"><span class="fixed">Credentials</span></a>
1422 element to specify a keystore that contains both the certificate and
1423 private key for a given set of credentials. Typically, this will be a
1424 Java keystore, with a corresponding type of <span
1425 class="fixed">JKS</span>. <a href="#confRelyingParty"><span
1426 class="fixed">RelyingParty</span></a> elements will refer to the <span
1427 class="fixed">Id</span> allowing multiple resolver elements to be used
1428 to specify different credential storage for different federations or
1429 target sites. It must contain one <a href="#confPath"><span
1430 class="fixed">Path</span></a> element, one <a href="#confKeyAlias"><span
1431 class="fixed">KeyAlias</span></a> element, and one <a
1432 href="#confStorePassword"><span class="fixed">StorePassword</span></a>
1433 element; it may optionally contain a <a href="#confKeyPassword"><span
1434 class="fixed">KeyPassword</span></a> element or a <a
1435 href="#confCertAlias"><span class="fixed">CertAlias</span></a>
1438 <dd class="attribute"><a name="confLog4JConfig"><span class="fixed"><Log4JConfig location="<i>pathname</i>"/></span></a></dd>
1439 <dd class="value">This element informs Shibboleth to utilize Log4J as a
1440 logging system and points to the relevant configuration file using the
1441 <span class="fixed">location</span> attribute. A basic configuration is
1442 included with the distribution at <span
1443 class="fixed">/WEB-INF/classes/conf/log4j.properties</span>. This is
1444 set up to log to the console of the servlet container with a level of
1445 WARN, but there is also a commented-out example in the file to give a
1446 possible alternate configuration. This element must be contained by a
1447 <a href="#confLogging"><span class="fixed">Logging</span></a> element
1448 and may not be paired with a <a href="#confTransactionLog"><span
1449 class="fixed">TransactionLog</span></a> or <a href="#confErrorLog"><span
1450 class="fixed">ErrorLog</span></a> element.</dd>
1452 <dd class="attribute"><a name="confLogging"><span class="fixed"><Logging></span></a></dd>
1453 <dd class="value">This container element identifies a logging method for
1454 both the HS and AA to use and may not occur more than once. Three
1455 different logging methods may be specified depending on what is placed
1456 inside this element. If nothing is specified, then all logs go to the
1457 container console. If <a href="#confErrorLog"><span
1458 class="fixed">ErrorLog</span></a> and <a
1459 href="#confTransactionLog"><span class="fixed">TransactionLog</span></a>
1460 elements are present, more traditional logging flatfiles will be
1461 generated at the locations specified. A <a
1462 href="#confLog4JConfig"><span class="fixed">Log4JConfig</span></a>
1463 element instructs the origin to use Log4J logging.</dd>
1465 <dd class="attribute"><a name="confNameMapping"><span class="fixed"><NameMapping xmlns="urn:mace:shibboleth:namemapper:1.0"<br>
1466 format="<i>URN</i>"<br>
1467 handleTTL="<i>seconds</i>"<br>
1468 id="<i>string</i>"<br>
1469 type="<i>type</i>"/></span></a></dd>
1470 <dd class="value">This element defines a name mapping system to create
1471 SAML assertion subject names for users; in standard Shibboleth, this
1472 will be the creation of a handle to be given to the SHAR and shared with
1475 <li><span class="fixed">format</span> should be populated with the URN <span
1476 class="fixed">urn:mace:shibboleth:1.0:nameIdentifier</span> if traditional
1477 Shibboleth handles are used.</li>
1478 <li><span class="fixed">handleTTL</span> specifies in seconds how long a given
1479 handle will be considered valid; an expired handle will require the user to
1480 obtain a new handle and possibly re-authenticate. This field is only valid if
1481 Shibboleth handles are being used, e.g. <span class="fixed">format</span> is
1482 <span class="fixed">urn:mace:shibboleth:1.0:nameIdentifier</span>. Consult your
1483 federation guidelines for guidance on the population of this field.</li>
1484 <li><span class="fixed">id</span> is used by <a href="#confHSNameFormat"><span
1485 class="fixed">HSNameFormat</span></a> elements to refer to this element and must
1487 <li><span class="fixed">type</span> dictates how subject names such as handles are passed internally from the HS to the AA.
1488 The valid types are:<ul type="circle">
1489 <li><span class="fixed">CryptoHandleGenerator</span>: Shibboleth handles will be
1490 passed using symmetric encryption. If this is specified, keystore information
1491 must be specified using one <a href="#confKeyStorePath"><span
1492 class="fixed">KeyStorePath</span></a> element, one <a
1493 href="#confKeyStoreKeyAlias"><span class="fixed">KeyStoreKeyAlias</span></a>
1494 element, one <a href="#confKeyStorePassword"><span
1495 class="fixed">KeyStorePassword</span></a> element, and optionally a <a
1496 href="#confKeyStoreKeyPassword"><span
1497 class="fixed">KeyStoreKeyPassword</span></a> element.</li>
1498 <li><span class="fixed">Principal</span>: Shibboleth will use the primary unique
1499 identifier for the individual and not generate a handle.</li>
1500 <li><span class="fixed">SharedMemoryShibHandle</span>: Shibboleth will use a
1501 shared in-memory repository.</li>
1505 <dd class="attribute"><a name="confPath"><span class="fixed"><Path><i>pathname</i></Path></span></a></dd>
1506 <dd class="value">This mandatory element specifies the path to a file or
1507 directory utilized by other elements of the configuration. It may be
1508 contained by various elements to point to different types of files
1509 required by the origin.</dd>
1511 <dd class="attribute"><a name="confReleasePolicyEngine"><span class="fixed"><ReleasePolicyEngine></span></a></dd>
1512 <dd class="value">The <span class="fixed">ReleasePolicyEngine</span>
1513 element is used to specify a class of release policy processing. This
1514 should contain one <a href="#confArpRepository"><span
1515 class="fixed">ArpRepository</span></a> element.</dd>
1517 <dd class="attribute"><a name="confRelyingParty"><span class="fixed"><RelyingParty <span class="mandatory">name="<i>URI</i>"</span><br>
1518 AAsigningCredential="<i>string</i>"<br>
1519 AAUrl="<i>URL</i>"<br>
1520 defaultAuthMethod="<i>URN</i>"<br>
1521 passThruErrors="<i>true/false</i>"<br>
1522 providerId="<i>string</i>"<br>
1523 signAttrAssertions="<i>true/false</i>"<br>
1524 signAttrResponses="<i>true/false</i>"<br>
1525 signAuthAssertions="<i>true/false</i>"<br>
1526 signAuthResponses="<i>true/false</i>"<br>
1527 signingCredential="<i>string</i>"></span></a></dd>
1528 <dd class="value"><p>The <span class="fixed">RelyingParty</span> element
1529 is used to specify one or more relying parties that this origin must
1530 recognize. This includes any federations the origin is a member of, any
1531 targets that have established bilateral agreements with the origin, or
1532 any other trust structure that origin must be aware of. In addition to
1533 its attributes, this element may contain a <a
1534 href="#confHSNameFormat"><span class="fixed">HSNameFormat</span></a>
1535 element to specify a naming mechanism for assertions sent to this
1536 relying party. The HS and AA both perform validation against federation
1537 metadata to ensure that targets cannot construct requests that would be
1538 used to impersonate another target or other malicious behavior.</p>
1539 <p>The proper <span class="fixed">RelyingParty</span> element to handle
1540 a given attribute request is selected by the following algorithm. If at
1541 any point a match is found, processing is complete; only one relying
1542 party will be used for any given request.</p>
1544 <li>If the requesting provider is unauthenticated -- due to a lack of
1545 SSL client authentication because the AA is not protected by an <span
1546 class="fixed">https://</span> URL -- the default relying party is
1548 <li>If the requesting provider is Shibboleth 1.1 or less, the default
1549 relying party is used.</li>
1550 <li>If a <span class="fixed">RelyingParty</span> element's <span
1551 class="fixed">providerId</span> attribute matches the name sent by the
1552 target, then that element is used.</li>
1553 <li>A metadata lookup is performed using the <span
1554 class="fixed">sites.xml</span> files supplied by all <a
1555 href="#confFederationProvider"><span
1556 class="fixed">FederationProvider</span></a> elements to determine
1557 whether the target is a member of a common federation. If there is a
1558 <span class="fixed">RelyingParty</span> element that has the same
1559 <span class="fixed">name</span> as the URI of the the federation, it
1560 is used. If not, the default relying party handles the request.</li>
1563 <li class="mandatory"><span class="fixed">name</span>: Each <span
1564 class="fixed">RelyingParty</span> element is differentiated by a URI
1565 specified in the <span class="fixed">name</span> attribute. A target
1566 will send a value for this attribute with the attribute request; if
1567 the URI sent matches the <span class="fixed">name</span>, this element
1568 will be used in the transaction. If there is no direct match, the
1569 origin uses metadata to try to find a federation that the service
1570 provider is a member of.</li>
1571 <li><span class="fixed">AAsigningCredential</span>: This attribute
1572 must equal the identifier of one of the <a
1573 href="#confFileResolver"><span class="fixed">FileResolver</span></a>
1574 Id's. A separate set of credentials may be specified for the AA's
1575 signing of assertions/SSL session identification using this attribute,
1576 as opposed to the HS' signing of assertions. If this is not specified
1577 for this <span class="fixed">RelyingParty</span> element, but a <span
1578 class="fixed">signingCredential</span> attribute is, that set of
1579 credentials will be used instead. Ensure that the appropriate signing
1580 key is selected for each; an incorrect signing key will lead to trust
1582 <li><span class="fixed">AAUrl</span>: This specifies the URL for the
1583 AA to be used in conjunction with attribute requests from this relying
1584 party. It over-rides, is populated, and operates in the same manner
1585 as the <span class="fixed">AAUrl</span> attribute of the <a
1586 href="#confShibbolethOriginConfig"><span
1587 class="fixed">ShibbolethOriginConfig</span></a> element.</li>
1588 <li><span class="fixed">defaultAuthMethod</span>: The value of this
1589 attribute represents the mechanism by which the user's authentication
1590 was performed. It is used to populate <span
1591 class="fixed">authenticationMethod</span> in SAML assertions passed to
1592 this relying party if no other authentication method is passed to the
1593 HS. For a brief list of authentication methods, consult the same
1594 attribute as part of the <a href="#confShibbolethOriginConfig"><span
1595 class="fixed">ShibbolethOriginConfig</span></a> element.</li>
1596 <li><span class="fixed">passThruErrors</span>: If true, the origin
1597 will relay all Java exception messages that occur during a failed
1598 transaction without any sort of filtering. While this is valuable for
1599 debugging interaction and providing additional information in case of
1600 failure, there is a risk of revealing sensitive information to the
1601 target if true.</li>
1602 <li><span class="fixed">providerId</span>: If the origin must assert
1603 under a different name to this relying party, specify a <span
1604 class="fixed">providerId</span> attribute which will over-ride the one
1605 specified in <a href="#confShibbolethOriginConfig"><span
1606 class="fixed">ShibbolethOriginConfig</span></a>.</li>
1607 <li><span class="fixed">signAttrAssertions</span>: If this boolean
1608 attribute has a value of <span class="fixed">true</span>, the
1609 attribute assertion within the SAML response will be signed. This is
1610 mostly useful for using the attribute assertion in contexts outside of
1611 the response and defaults to <span class="fixed">false</span>.</li>
1612 <li><span class="fixed">signAttrResponses</span>: If this boolean
1613 attribute has a value of <span class="fixed">true</span>, the
1614 attribute response itself will be signed in addition to the security
1615 and authentication provided by the SSL session. SAML responses
1616 contain one or more assertions. Defaults to <span
1617 class="fixed">false</span>.</li>
1618 <li><span class="fixed">signAuthAssertions</span>: If this boolean
1619 attribute has a value of <span class="fixed">true</span>, the
1620 authentication assertion within the SAML response will be signed.
1621 This is mostly useful for using the authentication assertion in
1622 contexts outside of the response and defaults to <span
1623 class="fixed">false</span>.</li>
1624 <li><span class="fixed">signAuthResponses</span>: If this boolean
1625 attribute has a value of <span class="fixed">false</span>, the
1626 authentication response will not be signed. SAML responses contain
1627 one or more assertions. Defaults to <span
1628 class="fixed">true</span>.</li>
1629 <li><span class="fixed">signingCredential</span>: This attribute must
1630 equal the identifier of one of the <a href="#confFileResolver"><span
1631 class="fixed">FileResolver</span></a> Id's. This allows the origin to
1632 use different signing keys and certificates for exchanges with
1633 different federations or targets. Ensure that the appropriate signing
1634 key is selected for each; an incorrect signing key will lead to trust
1639 <dd class="attribute"><a name="confShibbolethOriginConfig"><span class="fixed"><ShibbolethOriginConfig<br>
1640 xmlns="urn:mace:shibboleth:origin:1.0"<br>
1641 xmlns:cred="urn:mace:shibboleth:credentials:1.0"<br>
1642 xmlns:name="urn:mace:shibboleth:namemapper:1.0"<br>
1643 <span class="mandatory">defaultRelyingParty="<i>URI</i>"<br>
1644 providerID="<i>URI</i>"</span><br>
1645 AAUrl="<i>URL</i>"<br>
1646 authHeaderName="<i>string</i>"<br>
1647 defaultAuthMethod="<i>URN</i>"<br>
1648 maxHSThreads="<i>integer</i>"<br>
1649 passThruErrors="<i>true/false</i>"<br>
1650 resolverConfig="<i>pathname</i>"></span></a></dd>
1651 <dd class="value"><p>This is the primary element that defines an <span
1652 class="fixed">origin.xml</span> file and is the container for every
1653 other element and must appear once and only once. For most deployments,
1654 all the <span class="fixed">xmlns</span> attributes, which specify the
1655 handlers for different aspects of origin operation, should remain
1656 unchanged. The mandatory attributes must be changed before operating
1659 <li class="mandatory"><span class="fixed">defaultRelyingParty</span>: This
1660 specifies the relying party to use for a request when no <a
1661 href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> element's
1662 <span class="fixed">name</span> attribute matches the policy URI of an incoming
1663 request. Typically, this will be populated with the URI of a federation.</li>
1664 <li class="mandatory"><span class="fixed">providerID</span>: The origin uses
1665 this unique name to identify assertions it issues. This will usually be
1666 assigned by a federation.</li>
1667 <li><span class="fixed">AAUrl</span> specifies the URL where the default AA to be utilized by this origin unless a relying party is matched resides, which must be consistent with how it is defined in Tomcat. Note that this <b>must</b> be an <span class="fixed">https://</span> URL in order for the AA to know which SHAR is requesting attributes for ARP purposes.</li>
1668 <li><span class="fixed">authHeaderName</span>: If authentication methods are passed to the HS using an HTTP header variable other than the default, <span class="fixed">SAMLAuthenticationMethod</span>, the name of the variable may be specified here.</li>
1669 <li><span class="fixed">defaultAuthMethod</span>: This specifies the authentication method that will be assumed if none is passed through and there is no overriding <span class="fixed">defaultAuthMethod</span> specified for this target using a <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> element. If neither this element nor the matching <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> element contains this attribute, a value of <span class="fixed">urn:oasis:names:tc:SAML:1.0:am:unspecified</span> will be used for <span class="fixed">authenticationMethod</span>. Some common
1670 authentication methods and corresponding URI's are listed below; for a
1671 complete list, please consult section 7.1 of the SAML 1.1 core
1672 specifications or your federation's guidelines.
1673 <table border="2" cellpadding="0" cellspacing="0">
1675 <td><span class="fixed">
1676 urn:oasis:names:tc:SAML:1.0:am:password</span></td>
1677 <td>The authentication was performed using a password.</td>
1680 <td><span class="fixed">urn:ietf:rfc:1510</span></td>
1681 <td>The authentication was performed using Kerberos.</td>
1684 <td><span class="fixed">
1685 urn:oasis:names:tc:SAML:1.0:am:X509-PKI</span></td>
1686 <td>The authentication was performed using a certificate and key
1687 issued to the end user. More specific forms of PKI
1688 authentication such as SPKI and XKMS are also assigned URN's in
1689 the SAML specs.</td>
1692 <li><span class="fixed">maxHSThreads</span>: This attribute places a limit on the number of threads the handle service will spawn and may be useful for limiting the load of signing and other operations and improving performance. Most deployments should leave this as defaulted.</li>
1693 <li><span class="fixed">passThruErrors</span>: This boolean attribute determines whether the origin will relay errors in flows to the target for use in displaying these errors to the browser in the case of an unsuccessful transaction. Within the default, this should be <span class="fixed">false</span> unless debugging is necessary.</li>
1694 <li><span class="fixed">resolverConfig</span> specifies the location of the configuration file for the resolver the AA uses to build attributes and if unspecified defaults to <span class="fixed">/conf/resolver.xml</span>. For information on how to configure and use the attribute resolver, consult section <a href="4.e.">4.e</a>.</li>
1698 <dd class="attribute"><a name="confStorePassword"><span class="fixed"><StorePassword><i>string</i></StorePassword></span></a></dd>
1699 <dd class="value">Specifies the password for the keystore. Contained by the <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element.</dd>
1701 <dd class="attribute"><a name="confTransactionLog"><span class="fixed"><TransactionLog location="<i>URL</i>"></span></a></dd>
1702 <dd class="value">Paired with an <a href="#confErrorLog"><span class="fixed">ErrorLog</span></a> element, this will log all transactions that the origin is involved in. The information in this file is sensitive and may be useful for auditing and security purposes. Must be contained by a <a href="#confLogging"><span class="fixed">Logging</span></a> element.</dd>
1708 <h4><a name="5.b."></a>5.b. ARP Overview</h4>
1710 <h5>This section applies primarily to the syntactic and technical details of
1711 ARP's as defined by the standard, file-based repository implementation.
1712 For basic information on and explanation of what an ARP is and how it should
1713 be managed, please refer to sections <a href="#2.e.">2.e</a> and <a
1714 href="#4.d.">4.d</a>.</h5>
1715 <p>Every ARP file contains one ARP. ARP's may be specified either as the
1716 site ARP or user ARP's. The site ARP pertains to every principal for whom
1717 the AA retrieves information; a user ARP applies only to the individual user
1718 for whom it is defined. The set of principals to whom the ARP applies is
1719 defined by the name of the ARP file: the site ARP is stored in
1720 <span class="fixed">arp.site.xml</span> and user ARP's are stored as
1721 <span class="fixed">arp.user.$PRINCIPALNAME.xml</span>. Up to two ARP's
1722 will apply to a principal: the site ARP, and the user ARP for that
1724 <p>Each ARP acts as a container that holds a set of ARP rules that are
1725 applicable to the principals that ARP is effective for. Each ARP rule
1726 specifies a single release policy pertaining to a particular target
1727 application. For 1.2 targets, this is a single URI matching a <span
1728 class="fixed">providerId</span>. Prior to 1.2, URI's for targets were not
1729 registered; this means that the SHAR name must be used in release policies
1730 for 1.1 targets accessed by users from this origin. Each ARP rule may
1731 contain specifications regarding the release of any number of attribute
1732 values to requests matching that ARP rule for that user. ARP rules may be
1733 flagged as default, implying that they are always applied to any user
1734 matched by the ARP container. Note that ARP's may also be used to
1735 restrict specific attribute/value pairs in addition to restricting or
1736 releasing individual attributes.</p>
1737 <p>When a query is received, the AA generates an effective ARP, which is the
1738 fully evaluated set of ARP rules regarding that relying party based on all ARP
1739 containers applicable to the principal. This effective ARP is then applied
1740 to attribute values retrieved from the directory and the appropriate
1741 assertion is constructed. Default rules are always included in construction
1742 of the effective ARP.</p>
1744 <h4><a name="5.b.i."></a>5.b.i. ARP Processing</h4>
1747 <p>When a request arrives from a particular application, the applicable set of
1748 ARP rules are parsed into an effective ARP. This parsing is done as
1751 <li>Identify all ARP's that should be applied to a particular
1752 principal. This is done by isolating the files in the folder
1753 specified by the <a href="#confArpRepository"><span class="fixed">ArpRepository</span></a> element
1754 that have the name either arp.site.xml or
1755 arp.user.$PRINCIPALNAME.xml.</li>
1756 <li>Find all ARP rules relevant to the query:
1758 <li>Any ARP rules within the identified ARP's designated as
1759 defaults are automatically included in the effective ARP without
1760 performing any matching functions.</li>
1761 <li>For each non-default rule in each identified ARP, the
1762 matching functions specified in the rule's target definition are
1763 performed. A separate matching function is performed for the
1764 requesting SHAR and the providerId on behalf of which the SHAR is
1765 making the request.</li>
1766 <li>Each matching function evaluates to <span class="fixed">
1767 TRUE</span> if the match is successful or
1768 <span class="fixed">FALSE</span> if it is unsuccessful. If
1769 both functions evaluate to <span class="fixed">TRUE</span>,
1770 the rule is included in the Effective ARP.</li>
1773 <li>Construct the Attribute Filter:
1775 <li>For each attribute, compile a temporary list of associated
1776 rules that includes all values with a release qualifier of
1777 <span class="fixed">permit</span>.</li>
1778 <li>Subtract from this list all attribute values with rules
1779 specifying a release qualifier of <span class="fixed">deny</span>.
1780 The resulting list represents the allowable release values for
1781 the attribute and is used as a mask for the values which are
1782 returned from the Attribute Resolver.</li>
1783 <li>If a statement specifies that all values should be
1784 permitted, then specific <span class="fixed">deny</span>
1785 qualifiers for specific values should still be enforced. If a
1786 statement specifies that all values should be denied, then
1787 <span class="fixed">permit</span> qualifiers for specific
1788 values will be ignored.</li>
1791 <li>Using the mask and attributes returned from the Attribute
1792 Resolver, an assertion is constructed.</li>
1796 <h4><a name="5.b.ii."></a>5.b.ii. ARP Syntax</h4>
1799 <p>Each ARP is described by an XML file based on a standard
1800 <span class="fixed">.xsd</span> schema. It consists of a standard
1801 <span class="fixed">AttributeReleasePolicy</span> element
1802 referencing the appropriate <span class="fixed">xsi:schemaLocation</span>
1803 and a self-explanatory <span class="fixed">Description</span>
1804 element followed by any number of <span class="fixed">Rule</span>
1805 elements. Each <span class="fixed">Rule</span> element must consist
1806 of a <span class="fixed">Target</span> element and one or more
1807 <span class="fixed">Attribute</span> elements. The
1808 <span class="fixed">Target</span> element specifies the rules by
1809 which the target definition is formed. The <span class="fixed">
1810 Attribute</span> elements specifies the name and values of the
1811 attributes that may be released.</p>
1812 <p>The simplest possible ARP is as follows, which releases
1813 <span class="fixed">eduPersonScopedAffiliation</span> to any target
1814 for the users the ARP applies to:</p>
1816 <p><span class="fixed"><?xml version="1.0"?><br>
1817 <AttributeReleasePolicy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1818 xmlns="urn:mace:shibboleth:arp:1.0" xsi:schemaLocation="urn:mace:shibboleth:arp:1.0
1819 shibboleth-arp-1.0.xsd"><br>
1820 <Description>Simplest possible
1821 ARP.</Description><br>
1822 <Rule><br>
1823
1825
1826 <AnyTarget/><br>
1827
1829
1830 <Attribute name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"><br>
1831
1832 <AnyValue release= "permit"/><br>
1833
1834 </Attribute ><br>
1835 </Rule ><br>
1836 </AttributeReleasePolicy><br>
1840 <p>All ARP's must take the same basic form. A detailed description of how
1841 each element of the <span class="fixed">Rule</span> element may be
1842 sub-populated follows:</p>
1843 <p>The <span class="fixed">Target</span> element:</p>
1845 <p><span class="fixed">Target</span> may contain either the
1846 <span class="fixed">AnyTarget</span> element, which will cause the
1847 <span class="fixed">Target</span> to always return
1848 <span class="fixed">TRUE</span>, or both the
1849 <span class="fixed">Requester</span> element, which provides for
1850 matches to be performed against the SHAR name for 1.1 targets or the <span class="fixed">providerId</span> for 1.2 targets, and the
1851 <span class="fixed">Resource</span> element, which provides for
1852 matches to be performed against the requested URL.</p>
1853 <p>When going against 1.1 targets, the <span
1854 class="fixed">Resource</span> element will refer to individual URL trees
1855 protected by a given SHAR. However, due to the nature of application
1856 identifiers, the <span class="fixed">Resource</span> element has no
1857 meaning when releasing to 1.2 targets. These will always function as
1858 though <span class="fixed"><AnyResource/></span> is specified,
1859 making the entire <span class="fixed">Resource</span> element necessary
1860 only if this origin will be applying this ARP to 1.1 targets.</p>
1861 <p>There are three matches that may be performed by the AA in evaluating
1862 ARP's by using the <span class="fixed">matchFunction</span>
1863 component of the <span class="fixed">Requester</span> and
1864 <span class="fixed">Resource</span> elements. The following match
1865 patterns may be specified directly following the
1866 <span class="fixed">Requester</span> or <span class="fixed">
1867 Resource</span> elements, such as <span class="fixed"><Requester
1868 matchFunction="urn:mace:shibboleth:arp:matchFunction:regexMatch"></span>:</p>
1870 <li><span class="fixed">
1871 urn:mace:shibboleth:arp:matchFunction:exactShar </span>
1873 <p>May be used with the <span class="fixed">Requester</span>
1875 <p>Evaluates to <span class="fixed">TRUE</span> when the
1876 string content of the <span class="fixed">Requester</span>
1877 element matches exactly the providerId of the requesting application of 1.2 targets or the SHAR name of 1.1 targets.
1878 Otherwise evaluates to <span class="fixed">FALSE</span>.
1879 Serves as the default value associated with
1880 <span class="fixed">Requester</span> if none is specified.</p>
1883 <li><span class="fixed">
1884 urn:mace:shibboleth:arp:matchFunction:resourceTree </span>
1886 <p>May be used with the <span class="fixed">Resource</span>
1887 element. However, this has no meaning when releasing to 1.2 targets.</p>
1888 <p>Evaluates to <span class="fixed">TRUE</span> when the
1889 location of the resource either matches exactly or begins with
1890 the string content of the <span class="fixed">Resource</span>
1891 element. Otherwise evaluates to <span class="fixed">FALSE</span>.</p>
1894 <li><span class="fixed">
1895 urn:mace:shibboleth:arp:matchFunction:regexMatch </span>
1897 <p>May be used with both the <span class="fixed">Requester</span>
1898 and <span class="fixed">Resource</span> elements.</p>
1899 <p>Evaluates to <span class="fixed">TRUE</span> when the providerId of a request for 1.2 targets or the
1900 name of the requesting SHAR for or the requested URL tree for 1.1 targets is a valid
1901 match of the regular expression represented as the content of
1902 the containing element. Otherwise evaluates to
1903 <span class="fixed">FALSE</span>. Regular expressions are
1904 evaluated in accordance with the the
1905 <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/package-summary.html">
1906 Java 1.4 Pattern API</a>.</p>
1911 <p>The <span class="fixed">Attribute</span> element:</p>
1913 <p>The <span class="fixed">Attribute</span> element must always
1914 specify the URN of the attribute whose release parameters it specifies.
1915 Additionally, it must contain either the <span class="fixed">
1916 AnyValue</span> element or one or more <span class="fixed">Value</span>
1917 elements. These elements, in turn, must specify either
1918 <span class="fixed">release</span> = <span class="fixed">
1919 permit</span> or <span class="fixed">deny</span>. The
1920 <span class="fixed">Value</span> element must then contain one
1921 value for which the rule applies. Examples:</p>
1923 <p><span class="fixed"><Attribute name="urn:mace:dir:attribute-def:eduPersonPrincipalName"><br>
1924 <AnyValue release="Permit"><br>
1925 </Attribute><br>
1928 <p>Permits the release of <span class="fixed">
1929 eduPersonPrincipalName</span> with any value.</p>
1932 <p><span class="fixed"><Attribute name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"><br>
1933 <Value release="deny">member@example.edu</Value><br>
1934 </Attribute><br>
1937 <p>Denies the release of <span class="fixed">
1938 eduPersonScopedAffiliation</span> value <span class="fixed">
1939 member@example.edu</span>. Other values of the attribute may still
1940 be released if so specified by a <span class="fixed">permit</span>
1945 <h4><a name="5.c."></a>5.c. Sharing certificate/key pairs between Apache and
1946 Java keystores <font color="#5555EE">(optional)</font></h4>
1948 <p>Credentials stored in PEM and DER files, as is standard for Apache, are
1949 supported by Shibboleth 1.2 and later. In most deployments, it will be easiest
1950 to simply reference those using a <a href="#confFileResolver"><span
1951 class="fixed">FileResolver</span></a> element. The information in this chapter
1952 is still relevant if there is a need to share keys between PEM/DER flatfiles and
1953 a Java keystore.</p>
1955 <p>The JDK includes the command line program <span class="fixed">
1956 keytool</span> for managing Java keystores. This utility cannot import
1957 or export private key information, making it difficult to use the same
1958 private key and certificate for Apache and Java-based applications. The
1959 Shibboleth distribution includes <span class="fixed">extkeytool</span>,
1960 a program that can be used in conjunction with <span class="fixed">
1961 keytool</span> to perform these tasks. Select the appropriate
1962 step-by-step procedure for your situation from the following guides.</p>
1963 <p>Before running <span class="fixed">extkeytool</span>, the
1964 variable SHIB_HOME must be set to the path to the directory where the
1965 Shibboleth tarball was exploded(typically /opt/shibboleth-origin-1.2/).</p>
1966 <p><b>If you have a pre-exiting RSA key/certificate combination in a
1967 keystore and you would like to use it with Apache:</b></p>
1969 <li>Determine the alias of the keystore keyEntry containing the key
1970 you would like to use in your Apache setup. Assuming that your
1971 keystore is named <span class="fixed">yourstore</span>, the
1972 following command should present a list of the entries in the
1973 keystore.<blockquote>
1974 <p><span class="fixed">$ keytool -list -v -keystore
1975 yourstore</span></p>
1978 <li>Assuming that you identified the appropriate alias as
1979 <span class="fixed">youralias</span> and the password for the
1980 keystore is <span class="fixed">yourpass</span>, enter the
1981 following command to export the key in Base64-encoded pkcs8 format.<blockquote>
1982 <p><span class="fixed">$ extkeytool -exportkey -keystore
1983 yourstore -alias youralias -storepass yourpass -rfc -file
1984 yourkey.pkcs8</span></p>
1987 <li>In order to use this key with Apache, you must convert it to PEM-encoded
1988 RSA native format. You have the option of storing the key
1989 unencrypted or encrypted:<ol type="A">
1990 <li>To use the unencrypted format, enter the following command
1991 for the conversion:<blockquote>
1992 <p><span class="fixed">$ openssl pkcs8 -in
1993 yourkey.pkcs8 -nocrypt|openssl rsa -out yourkey.key</span></p>
1996 <li>To use the encrypted format, enter the following command for
1997 the conversion:<blockquote>
1998 <p><span class="fixed">$ openssl pkcs8 -in
1999 yourkey.pkcs8 -nocrypt|openssl rsa -des3 -out yourkey.enckey</span></p>
2004 <li>The following command will export the corresponding certificate.<blockquote>
2005 <p><span class="fixed">$ keytool -export -keystore
2006 yourstore -alias youralias -rfc -file yourcert</span></p>
2009 <li>Set the <span class="fixed">mod_ssl</span>
2010 <span class="fixed">SSLCertificateKeyFile</span> and
2011 <span class="fixed">SSLCertificateFile</span> directives to
2012 point to the two files you have just created. Take care to remove
2013 any temporary files you created (i.e. <span class="fixed">
2014 yourkey.pkcs8</span>) and set appropriate file permissions,
2015 especially if you chose to store the key in an unencrypted format.</li>
2017 <p><b>If you have a pre-existing RSA key/certificate combination that
2018 you use with Apache and would like to import it into a java keystore:</b></p>
2020 <li>Convert the private key to unencrypted DER-encoded pkcs8 format.
2021 Assuming your PEM-encoded key is stored in a file named
2022 <span class="fixed">yourkey.enckey</span>, enter the following
2023 command.<blockquote>
2024 <p><span class="fixed">$ openssl pkcs8 -in yourkey.enckey
2025 -topk8 -nocrypt -outform DER -out yourkey.der.pkcs8</span></p>
2028 <li>Create a certificate bundle file. This file should include a
2029 series of PEM-encoded X509 certificates representing a complete
2030 trust chain, from the root CA certificate to the certificate that
2031 matches your private key. If your certificate is stored in a file
2032 named <span class="fixed">mycert</span> and the CA signer
2033 certificate is stored in a file named <span class="fixed">
2034 ca.cert</span>, you might enter the following command to create the
2036 <p><span class="fixed">$ cat mycert ca.cert > cert.bundle</span></p>
2038 <p><b>Note: <span class="fixed">mod_ssl</span>-enabled Apache
2039 installations include a number of commonly recognized CA
2040 certificates in the <span class="fixed">ca-bundle.crt</span>
2041 file under the <span class="fixed">$ServerRoot/conf/ssl.crt/</span>
2042 directory.</b> </li>
2043 <li>Import the key and certificate into the keystore. Assuming you
2044 have already created a keystore named <span class="fixed">
2045 yourstore</span> with a password of of <span class="fixed">
2046 yourpass</span>, enter the following command to store the data under
2047 the alias <span class="fixed">youralias</span>.<blockquote>
2048 <p><span class="fixed">$ ./extkeytool -importkey -keystore
2049 yourstore -alias youralias -storepass yourpass -keyfile
2050 yourkey.der.pkcs8 -certfile cert.bundle -provider
2051 org.bouncycastle.jce.provider.BouncyCastleProvider</span></p>
2054 <li>You can verify that the import was successful by listing entry.
2055 Use the command below.<blockquote>
2056 <p><span class="fixed">$ keytool -list -v -keystore
2057 yourstore -alias youralias</span></p>
2060 <li>Remember to delete <span class="fixed">yourkey.der.pkcs8</span>,
2061 as it contains your unencrypted private key.</li>
2063 <p><b>If you are starting from scratch and do not yet have a
2064 certificate/key pair:</b></p>
2066 <li>Generate an RSA private key. Use the command below, substituting
2067 <span class="fixed">yourkey</span> with an appropriate name to
2068 use to refer to the key.<blockquote>
2069 <p><span class="fixed">$ openssl genrsa -des3 -out
2070 yourkey.enckey 1024</span></p>
2073 <li>The following command generates a Certificate Signing Request,
2074 which should be communicated to a Certificate Authority.<blockquote>
2075 <p><span class="fixed">$ openssl req -new -key
2076 yourkey.enckey</span></p>
2079 <li>The Certificate Authority should respond with a PEM-encoded X509
2080 certificate. Set the <span class="fixed">mod_ssl</span>
2081 <span class="fixed">SSLCertificateKeyFile</span> directive to
2082 point to the key file you just created and the
2083 <span class="fixed">SSLCertificateFile</span> directive to
2084 point to file containing the certificate issued by the Certificate
2085 Authority. Previous sections explaion how to share the
2086 key/certificate pair with a Java keystore.</li>
2092 <h4><a name="5.d."></a>5.d. The Attribute Resolver</h4>
2094 <p>Shibboleth provides a powerful attribute resolver that allows origins to
2095 quickly configure the retrieval of simple attributes from standard types of
2096 attribute stores. The resolver is configured using an xml file which should
2097 be pointed to with the <span class="fixed">
2098 edu.internet2.middleware.shibboleth.aa.
2099 attrresolv.AttributeResolver.ResolverConfig</span> property in
2100 <span class="fixed">origin.xml</span> as described in section
2101 <a href="#4.a.">4.a</a>. For more complex attributes or those that require
2102 processing before release, customized Java classes will need to be written.
2103 For more information, consult the programmer's guide.</p>
2104 <p>The resolver is essentially a directed graph from attribute definitions
2105 to data connectors. The data connectors pull data, in the form of
2106 attributes, from external data sources. The attribute definitions then
2107 process this data into a form suitable for use by Shibboleth. This procedure
2108 can be as simple as taking an unmodified string value from a data connector
2109 and tagging it with a name or can include arbitrarily complex business
2111 <p>The <span class="fixed">resolver.xml</span> file that is pointed to
2112 by <span class="fixed">origin.xml</span> consists of zero or
2113 more attribute definitions followed by zero or more data connectors. Each
2114 attribute definition consists of an identifier corresponding to the URN of
2115 the attribute, and optional references to data connectors on which it
2116 depends. Each data connector consists of a string identifier which is used
2117 by attribute definitions that refer to it, and one or more elements specific
2118 to the configuration of that data connector.</p>
2119 <p>Version 1.2 of Shibboleth comes with two attribute definitions:
2120 the <span class="fixed">SimpleAttributeDefinition</span>, which acts as
2121 a basic proxy for attributes supplied by data connectors with some name
2122 conversion and attribute scoping added, and a <span class="fixed">
2123 CustomAttributeDefinition</span>, which can be used to configure
2124 user-created attribute definition plugins. Similarly, Shibboleth 1.2 comes
2125 with two data connectors: the <span class="fixed">
2126 JNDIDirectoryDataConnector</span>, which pulls data from any source for
2127 which there is a JNDI Directory Context implementation, including LDAP, NDS,
2128 etc., and the <span class="fixed">CustomDataConnector</span>, which is
2129 used to configure user-created data connector plugins.</p>
2130 <p>A detailed explanation of each configuration option for the provided
2131 connectors follows:</p>
2132 <p><span class="fixed">JNDIDirectoryDataConnector</span>:</p>
2134 <dd class="attribute"><span class="fixed">id = <string></span> </dd>
2135 <dd class="value">Specifies a unique, textual name for the connector
2136 used by attribute definitions to refer to and use it to build
2137 attributes. Contained within the <span class="fixed">
2138 JNDIDirectoryDataConnector</span> element.</dd>
2139 <dd class="attribute"><span class="fixed"><Property name="<name>"
2140 value="<value>"/></span> </dd>
2141 <dd class="value">An element of the element <span class="fixed">
2142 JNDIDirectoryDataConnector</span>. Specifies a set of name/value pairs
2143 that are used to configure the JNDI Directory Context. This list of
2144 name/value pairs is defined by the context itself, but is specified
2145 within <span class="fixed">resolver.xml</span>. Refer to the
2146 <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">
2147 Shibboleth CVS</a> for an example of names and values used to connect to
2148 an LDAP directory.</dd>
2149 <dd class="attributeopt"><span class="fixed"><Search></span> </dd>
2150 <dd class="valueopt">An element of the element <span class="fixed">
2151 JNDIDirectoryDataConnector</span>. This element defines the search filter
2152 used to perform the LDAP query. The search string must return no more
2153 than one result.</dd>
2154 <dd class="attributeopt"><span class="fixed"><Controls></span> </dd>
2155 <dd class="valueopt">An element of the element <span class="fixed">
2156 Search</span>. This element grants some fine-grained control over the
2157 LDAP API calls.</dd>
2158 <dd class="attributeopt"><span class="fixed"><cacheTime
2159 "<seconds>"/></span> </dd>
2160 <dd class="valueopt">An element of the element <span class="fixed">
2161 JNDIDirectoryDataConnector</span>. Specifies an optional duration in
2162 <span class="fixed">seconds</span> for which the attribute resolver
2163 may cache information retrieved from this connector. The default is zero seconds (no caching)</dd>
2165 <p>A representation of a properly constructed <span class="fixed">
2166 JNDIDirectoryDataConnector</span> element would look like:</p>
2168 <p><span class="fixed"><JNDIDirectoryDataConnector id="directory"><br>
2169 <Search filter="cn=%PRINCIPAL%"><br>
2170 <Controls searchScope="SUBTREE_SCOPE" returningObjects="false" /><br>
2171 </Search><br>
2172 <Property name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"
2173 <Property name="java.naming.provider.url" value="ldap://directory.cis-qas.brown.edu:636/dc=brown,dc=edu" />
2174 <Property name="java.naming.security.principal" value="cn=stc_query,ou=Special Users,dc=brown,dc=edu" />
2175 <Property name="java.naming.security.credentials" value="password" />
2177 <cacheTime="2400"/><br>
2178 </JNDIDirectoryDataConnector> </span></p>
2180 <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="fixed">JNDIDirectoryDataConnector</span> element:</p>
2181 <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>
2182 <p>2. Add this Property element:</p>
2184 <p><span class="fixed"><Property name="java.naming.security.protocol" value="ssl" "></span></p>
2186 <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="fixed">java.naming.provider.url</span> Property.</p>
2187 <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>
2188 <p><span class="fixed">SimpleAttributeDefinition</span>:</p>
2190 <dd class="attribute"><span class="fixed">id = <string></span> </dd>
2191 <dd class="value">Specifies a unique, textual name for the attribute
2192 which is used as the attribute's name when it is sent over the wire by
2193 Shibboleth. Contained within the <span class="fixed">
2194 SimpleAttributeDefinition</span> element.</dd>
2195 <dd class="attributeopt"><span class="fixed"><AttributeDependency /
2196 DataConnectorDependency requires="<id>"/></span> </dd>
2197 <dd class="valueopt">An element of the element <span class="fixed">
2198 SimpleAttributeDefinition</span>, which may contain 0 or more of either
2199 <span class="fixed">AttributeDependency</span> or
2200 <span class="fixed">DataConnectorDependency</span>. These specify
2201 attributes and data connectors that can be utilized by this attribute
2202 definition. Each of these elements must contain a
2203 <span class="fixed">requires</span> statement which this attribute
2204 definition can then use to build its value.</dd>
2205 <dd class="attributeopt"><span class="fixed">smartScope =
2206 "<domain>"</span> </dd>
2207 <dd class="valueopt">Specifes a domain scope to be attached to the
2208 attribute. If the value of the attribute as retrieved from the data
2209 connector includes a pre-existing scope (<span class="fixed">bob@foo.edu</span>),
2210 that scope is used instead. Contained within the
2211 <span class="fixed">SimpleAttributeDefinition</span> element.</dd>
2212 <dd class="attributeopt"><span class="fixed"><lifeTime
2213 "<seconds>"/></span> </dd>
2214 <dd class="valueopt">Specifies in the attribute assertion
2215 how long the attribute should be cached and retained by the target upon
2216 receipt. Federations and trust agreements may have some bearing on the
2217 population and use of this field. Contained within the
2218 <span class="fixed">SimpleAttributeDefinition</span> element.</dd>
2219 <dd class="attributeopt"><span class="fixed">sourceName =
2220 "<string>"</span> </dd>
2221 <dd class="valueopt">Specifies a different source attribute name to be
2222 used in calls to the data connector, while the name on the wire will be
2223 the specified <span class="fixed">id</span>. This would be useful
2224 to send a local UniversityID attribute as eduPersonPrincipalName. If not
2225 supplied, the connector tokenizes the <span class="fixed">id</span>
2226 field and uses the section following the <span class="fixed">#</span>
2227 to query data connectors. Contained within the <span class="fixed">
2228 SimpleAttributeDefinition</span> element.</dd>
2229 <dd class="attributeopt"><span class="fixed"><cacheTime
2230 "<seconds>"/></span> </dd>
2231 <dd class="valueopt">Specifies an optional duration in
2232 <span class="fixed">seconds</span> for which the attribute resolver
2233 may cache this attribute for use in additional assertions. Contained within
2234 the <span class="fixed">SimpleAttributeDefinition</span> element.</dd>
2236 <p>A representation of a properly constructed <span class="fixed">
2237 SimpleAttributeDefinition</span> element would look like:</p>
2239 <p><span class="fixed"><SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonPrincipalName"<br>
2240 smartScope="shibdev.edu" cacheTime="600" lifeTime="3600" sourceName="universityPerson"><br>
2241 <DataConnectorDependency requires="dataConnector"/><br>
2242 <AttributeDependency requires="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"/><br>
2243 </SimpleAttributeDefinition> </span></p>
2245 <p>A properly formed <span class="fixed">resolver.xml</span> file to
2246 automatically generate a simple response for EPPN may take the form:</p>
2248 <p><span class="fixed"><AttributeResolver xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2249 xmlns="urn:mace:shibboleth:resolver:1.0" xsi:schemaLocation="urn:mace:shibboleth:resolver:1.0
2250 shibboleth-resolver-1.0.xsd"><br>
2252 <SimpleAttributeDefinition id="urn:mace:dir:attribute-def:eduPersonPrincipalName"
2253 smartScope="shibdev.edu"><br>
2254 <DataConnectorDependency requires="echo"/><br>
2255 </SimpleAttributeDefinition><br>
2257 <CustomDataConnector id="echo"
2258 class="edu.internet2.middleware.shibboleth.aa.attrresolv.provider.SampleConnector"
2260 </AttributeResolver> </span></p>
2262 <p>There are additional examples of <span class="fixed">resolver.xml</span>
2263 files provided in the
2264 <a href="http://marsalis.internet2.edu/cgi-bin/viewcvs.cgi/shibboleth/java/src/conf/">
2265 Shibboleth CVS</a>.</p>
2269 <h4><a name="5.d.i."></a>5.d.i <span class="fixed">resolvertest</span></h4>
2271 <p>Shibboleth comes bundled with the command line utility
2272 <span class="fixed">resolvertest</span> for testing Attribute Resolver
2273 configurations. This program takes as input <span class="fixed">
2274 resolver.xml</span>, the name of a user, and optionally the name of a
2275 requesting SHAR. It outputs the resulting SAML <Attribute /> elements. This
2276 allows administrators to view the results of tweaking the resolver
2277 configuration without having to continually reload the origin web
2278 application. <span class="fixed">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>
2280 <li>Set the shell variable <span class="fixed">SHIB_HOME</span> to
2281 the directory path where the Shibboleth tarball was exploded (typically
2282 <span class="fixed">/opt/shibboleth-origin-1.2/</span>).</li>
2283 <li>Move to $SHIB_HOME/bin</li>
2285 <p><span class="fixed">resolvertest</span> may then be used by
2286 executing the shell script, passing the name of a user and a URL to the
2287 Attribute Resolver configuration file as parameters. For example:</p>
2289 <p><span class="fixed">$ ./resolvertest --user=wassa
2290 --file=file:///$SHIB_HOME/src/conf/resolver.xml</span></p>
2292 <h5>NOTE: This program does not filter the resulting attributes through the
2293 applicable ARP's. Although it does show the attributes generated by the
2294 resolver for a particular user or URL, it does not necessarily reflect what
2295 will be released by the AA to a requesting SHAR.</h5>
2299 <h4><a name="5.e."></a>5.e. Local Error Page</h4>
2301 <p>Origin sites are encouraged to provide federations with the URL of a
2302 local Shibboleth error page. If a browser user from the origin site
2303 encounters a problem at a shibbolized target, the target is likely to
2304 display an error page that includes a link back to this origin provided
2306 <p>The page should provide information on how to obtain local support for
2307 using Shibbolized resources. It might also include suggestions on what
2308 information should be recorded before beginning the problem resolution
2314 <h4><a name="5.f."></a>5.f. Using a New Attribute</h4>
2315 <p>In order for an attribute to be sent to a target, two steps are required:</p>
2316 <p>1. The attribute has to be defined in resolver.xml. See section <a href="#5.d.">5.d</a>.</p>
2317 <p>2. The effective ARP for that target has to release this attribute value. See section <a href="#5.b.">5.b.</a>.</p>
2318 <p>Note: resolvertest is a useful tool for verifying the correctness of the definitions.</p>
2319 <p>Note: the AAP at the target must also define this attribute. See the Shibboleth Target Deploy Guide.</p>
2327 <h3><a name="6."></a>6. Troubleshooting</h3>
2328 <p>This section provides basic information about testing, logging, and error
2329 handling for Shibboleth origins. This information is not intended to be
2330 comprehensive, but instead rudimentary guidelines for basic configuration tests
2331 and problems. For more detailed information or answers to specific problems not
2332 addressed in this section, please mail
2333 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
2334 with a thorough description of errors and configurations used.</p>
2335 <h4><a name="6.a."></a>6.a. Basic Testing</h4>
2337 <p>Internet2 provides a basic target that can be used to test origin setup
2338 functionality. After your origin is recognized by InQueue, simply use any
2339 browser to access <a href="https://wayf.internet2.edu/InQueue/sample.jsp">
2340 https://wayf.internet2.edu/InQueue/sample.jsp</a>. Select your origin's name
2341 and follow the login process as a user would. Note that SSL must be used,
2342 and both the HS and AA must be fully configured.</p>
2343 <p>The test target will then display a simple page which includes the basic
2344 information sent to it by your origin and the authentication rules it is
2346 <p><b>For information regarding specific error messages that may be
2347 generated if the origin does not work successfully, please refer to section
2348 <a href="#6.c.">6.c</a>.</b></p>
2350 <h4><a name="6.b."></a>6.b. Logging</h4>
2352 <p>Shibboleth's origin components log various operations which may prove
2353 useful for auditing, testing, and security purposes. This data is sent
2354 through <span class="fixed">log4j</span>'s standard mechanism. The
2355 location of the log file, the level at which the log is output, the
2356 formatting of the logs, and many more options may be configured by editing
2357 <span class="fixed">/WEB-INF/classes/conf/log4j.properties</span>. By
2358 default, it is setup to log to the console of the servlet container, with a
2359 level of <span class="fixed">WARN</span>, but there is also a commented
2360 out example in the file to give a possible alternate configuration.</p>
2362 <h4><a name="6.c."></a>6.c. Common Problems</h4>
2364 <p>A knowledge base is being developed in the
2365 <a href="https://umdrive.memphis.edu/wassa/public/shib.faq/shibboleth-faq.html">
2366 Shibboleth Deployer's FAQ</a>. Please mail
2367 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@nternet2.edu</a>
2368 with any additional questions or problems encountered that
2369 are not answered by this basic guide.</p>
2376 <!-- ZoneLabs Popup Blocking Insertion -->
2377 <script language='javascript'>postamble();</script>