1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 <title>Shibboleth Target Deployment Guide</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <style type="text/css">
11 background-color: #FFFFFF;
29 font-family: monospace;
32 text-decoration: none;
36 font-family: monospace;
39 text-decoration: none;
43 font-family: monospace;
46 text-decoration: none;
50 border-width:2px; background-color: #DDDDDD;
51 background-image: url('none');
58 background-color: #DDDDDD;
59 background-image: url('none');
65 background-color: #DDDDDD;
66 background-image: url('none');
75 background-color: #DDDDDD;
76 border: 1px inset black;
77 background-image: url('none');
86 background-color: #EEEEEE;
87 border: 1px inset black;
88 background-image: url('none');
96 background-color: #EEEEEE;
97 background-image: url('none');
99 padding-bottom: 0.5em;
102 border-bottom-width: none;
103 border-top-width: none;
104 border-left-width: 1px;
105 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
110 background-color: #FFCCFF;
114 background-color: #EEEEEE;
119 font-family: monospace;
131 <body link="red" vlink="red" alink="black" bgcolor="white">
134 <h2>Shibboleth Target Deployment Guide</h2>
136 <p>Shibboleth Target Deployment Guide<br>
137 Shibboleth Version 1.2<br />
139 <h3>This version of the deploy guide is for Shibboleth v1.2. For documentation
140 related to prior versions of Shibboleth, please consult the appropriate branch
141 in the Shibboleth CVS.</h3>
142 <h3>The default configuration of Shibboleth is <b>not</b> secure and should not be
143 used for protection of production content. The example private key bundled with the
144 distribution is publically available, widely circulated, and well-known; also, the
145 default federation and trust metadata is for testing purposes only. For information
146 about securing a Shibboleth deployment, please refer to the production guide.
147 Shibboleth should only be used to protect sensitive content when deployed carefully
148 in conjunction with proper trust settings and policies.</h3>
150 <p>The Shibboleth target implementation has been substantially redesigned for this release. Most of the
151 configuration process has changed to accomodate more complex deployments but many of the defaults work
152 fine for testing and simpler applications. For a list of new features, please refer to the NEWS.txt
153 file in the doc/ folder of the distribution.</p>
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
170 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
173 <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
175 <li><a href="#1.a."><font color="black">Origin</font></a></li>
176 <li><a href="#1.b."><font color="black">Target</font></a></li>
177 <li><a href="#1.c."><font color="black">WAYF</font></a></li>
178 <li><a href="#1.d."><font color="black">Federations</font></a></li>
179 <li><a href="#1.e."><font color="black">Relying Parties</font></a></li>
180 <li><a href="#1.f."><font color="black">Applications</font></a></li>
181 <li><a href="#1.g."><font color="black">Sessions</font></a></li>
185 <h4><a href="#2."><font color="black">Planning</font></a></h4>
187 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
188 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
189 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
190 <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
191 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
192 <li><a href="#2.f."><font color="black">Attribute Acceptance Policies</font></a></li>
193 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
194 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
195 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
199 <h4><a href="#3."><font color="black">Installation</font></a></h4>
201 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
202 <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
203 <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
204 <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
205 <li><a href="#3.e."><font color="black">Running the SHAR on Windows</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">Configuring <span class="fixed">
212 shibboleth.xml</span></font></a></li>
213 <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
214 <li><a href="#4.c."><font color="black">Key Generation and Certificate
215 Installation</font></a></li>
216 <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
217 <li><a href="#4.e."><font color="black">Defining Attributes and
218 Acceptance Policies</font></a></li>
219 <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
220 <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
221 <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
225 <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
227 <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
228 <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
237 <h3><a name="1."></a>1. Shibboleth Overview</h3>
238 <p>Shibboleth is a system designed to exchange attributes across realms for the
239 primary purpose of authorization. It provides a secure framework for one
240 organization to transmit attributes about a web-browsing individual across
241 security domains to another institution. In the primary usage case, when a user
242 attempts to access a resource at a remote domain, the user's own home security
243 domain can send certain information about that user to the target site in a
244 trusted exchange. These attributes can then be used by the resource to help
245 determine whether to grant the user access to the resource. The user may have
246 the ability to decide whether to release specific attributes to certain sites by
247 specifying personal Attribute Release Policies (ARP's), effectively preserving
248 privacy while still granting access based on trusted information.</p>
249 <p>When a user first tries to access a resource protected by Shibboleth, they
250 are redirected to a service which asks the user to specify the organization from
251 which they want to authenticate. If the user has not yet locally authenticated
252 to a WebISO service, the user will then be redirected to their home
253 institution's authentication system. After the user authenticates, the
254 Shibboleth components at the local institution will generate a temporary
255 reference to the user, known as a handle, for the individual and send this to
256 the target site. The target site can then use the handle to ask for attributes
257 about this individual. Based on these attributes, the target can decide whether
258 or not to grant access to the resource. The user may then be allowed to access
259 the requested materials.</p>
260 <p>There are several controls on privacy in Shibboleth, and mechanisms are
261 provided to allow users to determine exactly which information about them is
262 released. A user's actual identity isn't necessary for many access control
263 decisions, so privacy often is needlessly compromised. Instead, the resource
264 often utilizes other attributes such as faculty member or member of a certain
265 class. While these are commonly determined using the identity of the user,
266 Shibboleth provides a way to mutually refer to the same principal without
267 revealing that principal's identity. Because the user is initially known to the
268 target site only by a randomly generated temporary handle, if sufficient, the
269 target site might know no more about the user than that the user is a member of
270 the origin organization. This handle should never be used to decide whether or
271 not to grant access, and is intended only as a temporary reference for
272 requesting attributes.</p>
273 <h4><a name="1.a."></a>1.a. Origin</h4>
275 <p>There are four primary components to the origin side in Shibboleth: the
276 Attribute Authority (AA), the Handle Service (HS), the directory service,
277 and the local sign-on system (SSO). The AA and HS are provided with
278 Shibboleth, and an open-source WebISO solution Pubcookie is also supplied;
279 the directory is provided by the origin site. Shibboleth is able to
280 interface with a directory exporting an LDAP interface or a SQL database
281 containing user attributes, and is designed such that programming interfaces
282 to other repositories should be readily implemented. Shibboleth relies on
283 standard web server mechanisms to trigger local authentication. A .htaccess
284 file can be easily used to trigger either the local WebISO system or the web
285 server's own Basic Auth mechanism, which will likely utilize an enterprise
286 authentication system, such as Kerberos.</p>
287 <p>From the origin site's point of view, the first contact will be the
288 redirection of a user to the handle service, which will then consult the SSO
289 system to determine whether the user has already been authenticated. If not,
290 then the browser user will be asked to authenticate, and then sent back to
291 the target URL with a handle bundled in an attribute assertion. Next, a
292 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
293 which will include the previously mentioned handle. The AA then consults the
294 ARP's for the directory entry corresponding to the handle, queries the
295 directory for these attributes, and releases to the SHAR all attributes the
296 SHAR is entitled to know about that user.</p>
298 <h4><a name="1.b."></a>1.b. Target</h4>
300 <p>There are three primary components to the target side in Shibboleth: the
301 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
302 Requester (SHAR), and the resource manager (RM). An implementation of each
303 of these is included in the standard Shibboleth distribution. These
304 components are intended to run on the same web server.</p>
305 <p>From the target's point of view, a browser will hit the RM with a request
306 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
307 in, which will use the WAYF to acquire the name of a handle service to ask
308 about the user. The handle service (HS) will then reply with a SAML
309 authentication assertion containing a handle, which the SHIRE then hands off
310 to the SHAR. The SHAR uses the handle and the supplied address of the
311 corresponding attribute authority (AA) to request all attributes it is
312 allowed to know about the handle. The SHAR performs some basic validation
313 and analysis based on attribute acceptance policies (AAP's). These
314 attributes are then handed off to the RM, which is responsible for using
315 these attributes to decide whether to grant access.</p>
317 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
319 <p>The WAYF service can be either outsourced and operated by a federation or
320 deployed as part of the SHIRE. It is responsible for allowing a user to
321 associate themself with an institution of their specification, then
322 redirecting the user to the known address for the handle service of that
325 <h4><a name="1.d."></a>1.d. Federations</h4>
327 <p>A federation is one way to provide part of the underlying trust required
328 for function of the Shibboleth architecture. A federation in the context of
329 Shibboleth is a group of organizations(universities, corporations, content
330 providers, etc.) who agree to exchange attributes using the SAML/Shibboleth
331 protocols and abide by a common set of policies and practices. In so doing,
332 they must implicitly or explicitly agree to a common set of guidelines.
333 Joining a federation is not explicitly necessary for operation of
334 Shibboleth, but it dramatically expands the number of targets and origins
335 that can interact without defining bilateral agreements between all these
337 <p>A federation can be created in a variety of formats and trust models, but
338 to support Shibboleth, it must provide a certain set of services to
339 federation members. It needs to supply a registry to process applications to
340 the federation and distribute membership information to the origin and
341 target sites. This must include distribution of the PKI components necessary
342 for trust between origins and targets. There also needs to be a set of
343 agreements and best practices defined by the federation governing the
344 exchange, use, and population of attributes before and after transit, and
345 there should be a way to find information on local authentication and
346 authorization practices for federation members.</p>
348 <h4><a name="1.e."></a>1.e. Relying Parties</h4>
350 <p>Some aspects of both origin and target configuration can vary and be
351 expressed in terms of the "relying party". To an origin, a target
352 is a relying party, while targets consider origins to be relying
353 parties (it's a matter of perspective). Certificates, policies, and
354 other aspects of an interaction are specified on the basis of the relying
355 party, and may or may not vary between relying parties depending on the
356 deployment's needs.</p>
357 <p>Each origin and target is assigned a URI, a unique identifier to enable
358 control over configuration down to the level of an individual partner (a single
359 relying party). By convention, this is termed a "providerId". More
360 frequently, an entire federation will be viewed by an origin or target as a
361 single relying party to simplify management. An individual origin or target
362 with which this deployment exchanges information may sometimes be part of
363 multiple relying parties if there are multiple trust agreements
364 under which these transactions are performed. Care should be taken to avoid
365 conflicting or inconsistent configuration in such cases.</p>
367 <h4><a name="1.f."></a>1.f. Applications</h4>
369 <p>Shibboleth "applications" are the primary unit of target
370 configuration. Applications as viewed by the target implementation
371 are not necessarily defined by the same metrics as in other contexts. An
372 individual application represents a set of web resources that operates
373 using the same attribute handling and trust configuration and shares a common
374 <a href="#1.g.">session</a> with the browser user. As a user navigates between
375 resources on a server that cross an application boundary, a new session is
376 established, though user interaction may not be required. As a consequence of
377 the relationship between applications and sessions (which are tracked with
378 a cookie), an application usually does not span more than one virtual host.
379 Apart from cookie-based constraints, web resources can be aggregated into
380 applications in arbitrary ways.</p>
381 <p>A single target deployment may support a large number of applications,
382 but it need not register or publish information about each one with the
383 origins it accepts information from. Instead it can communicate using a
384 more limited set of distinct "providerId" values (often just a
385 single one). This allows targets with a complex internal configuration
386 to be treated as a single entity by origins for the purposes of attribute
389 <h4><a name="1.g."></a>1.g. Sessions</h4>
391 <p>Much of the target implementation is concerned with establishing, and
392 subsequently maintaining, sessions with the browser user on behalf of the
393 <a href="#1.f.">applications</a> at the target. A session consists of a
394 cookie passed between the browser and web server, associated with a
395 security context. The context contains the user's authentication information,
396 and generally a set of attributes that make up the user's identity. Each
397 application maintains distinct sessions with the browser by means of separate
398 cookies. It is important to note that all such sessions are independent and
399 distinct: any session can exist with or without any other session, and the
400 expiration of any one session does not imply the expiration of any other
401 session. Shibboleth also does not support any logout functionality beyond the
402 termination of individual application sessions by deletion of respective
403 cookies; also, there is no way for the target to cause origin-side sessions,
404 such as a user's SSO login, to expire.</p>
405 <p>A browser user accessing a Shibboleth-protected resource may have two
406 outcomes: standard session establishment, and lazy session
407 establishment. The standard session establishment mechanism in which
408 Shibboleth protects the resource in all circumstances results in the
409 establishment of a cookie-based browser session and a set of attributes
410 cached for that application. Shibboleth 1.2 also supports so-called lazy
411 session establishment, in which the resource may be accessed without prior
412 authentication. This means the application must be intelligent enough to
413 determine whether authentication is necessary, and then construct the proper URL
414 to initiate a browser redirect to request authentication; if the
415 application determines none is necessary or uses other authorization
416 mechanisms, then the request for authentication may not need to be triggered.
417 This complex functionality is mostly useful to protect a single URL with
418 different access mechanisms, or to require authenticated access only in
419 instances where the application deems it necessary.</p>
420 <p>Independently of this, a web-based application protected by Shibboleth
421 may have a need to establish its own session with the user. This session
422 may persist well beyond the Shibboleth session, and logouts from this
423 session, if supported, will not terminate a Shibboleth session initiated to
424 access the resource. Application administrators should carefully evaluate
425 the expiration of all sessions to limit vulnerability to attacks or user
426 negligence. Logging out of the entire desktop session is usually the
427 only (relatively) foolproof logout mechanism on the web.</p>
430 <h3><a name="2."></a>2. Planning</h3>
431 <p>There are several essential elements that must be present in the environment
432 to ensure Shibboleth functions well, both political and technical. Shibboleth
433 currently runs on a specific range of platforms and web server environments. The
434 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations
435 and requirements for a successful implementation of a Shibboleth target.</p>
436 <h4><a name="2.a."></a>2.a. Requirements</h4>
438 <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and
439 Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a
440 separate SHAR process. The plugins use the Sun/ONC RPC mechanism to communicate
441 with the SHAR over Unix domain or TCP sockets. The target's web servers must
442 be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a>
443 1.3+, 2.0+, or Microsoft IIS 4.0+ More precise technical
444 details are discussed in <a href="#3.a.">3.a</a>.</p>
446 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
448 <p>While it is not necessary for a target or origin to join a federation,
449 doing so greatly facilitates the implementation of multilateral trust
450 relationships. Each federation will have a different application process.</p>
451 <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or
452 the Shibboleth v1.0 architectural document.</p>
453 <p>For testing in a private environment, Shibboleth comes with a default
454 configuration that demonstrates how to implement a local peered agreement
455 and supports testing both origin and target on the same box using localhost
456 URLs. The sample key and certificate is for ease of testing only, and should
457 always be replaced for real world use.</p>
459 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
461 <p>Shibboleth's protocols and software have been extensively engineered to
462 provide protection against many attacks. However, the most secure protocol
463 can be compromised if it is placed in an insecure environment. To ensure
464 Shibboleth is as secure as possible, there are several recommended security
465 precautions which should be in place at local sites.</p>
467 <li>SSL use is optional for target sites, but should be used if at all
468 possible, at least in the processing of incoming sessions (called the
469 SHIRE URL or assertion consumer service). Federation guidelines should
470 be considered when determining whether to implement SSL, and, in
471 general, SSL should be used for interactions with client machines to
472 provide the necessary authentication and encryption to ensure protection
473 from man-in-the-middle attacks. It is strongly suggested that all
474 password traffic or similarly sensitive data should be SSL-protected.
475 Assessment of the risk tradeoff against possible performance degradation
476 should be performed for all applications.</li>
477 <li>Many other attacks can be made on the several redirection steps that
478 Shibboleth takes to complete attribute transfer. The best protection
479 against this is safeguarding the WAYF service and ensuring that rogue
480 targets and origins are not used, generally by development of the trust
481 model underneath Shibboleth. Shibboleth also leverages DNS for security,
482 which is not uncommon, but attacks concerning domain name lookups
483 should be considered.</li>
484 <li>Information regarding origin users is generally provided by the
485 authoritative enterprise directory, and the acceptance of requests from
486 target applications can be carefully restricted to ensure that all
487 requests the SHAR performs are authorized and all information the origin
488 provides is accurate. Proper security measures should also be in place
489 on directory access and population(see
490 <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/#AccessControl">
491 Access Control</a> in the
492 <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/">LDAP
493 recipe</a> for more information). Use of plaintext passwords is strongly
494 advised against.</li>
495 <li>Server platforms should be properly secured, commensurate with the
496 level that would be expected for an organization's other security
497 services, and cookie stores on client machines should be well protected.</li>
500 <h4><a name="2.d."></a>2.d. Server Certs</h4>
502 <p>In the Shibboleth architecture, the origin and target software must all have
503 various client and/or server certificates for use in signing assertions and
504 creating SSL connections These should be issued by a commonly accepted CA,
505 which may be stipulated by your federation. After understanding the CA's
506 acceptible to your federations, consult chapter <a href="#4.c.">4.c</a> for
507 information on certificate and key generation.</p>
509 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
511 <p>The Attribute Authority maintains a set of policies called Attribute
512 Release Policies (or ARP's) that govern the sharing of user attributes with
513 Shibboleth target sites. When a user attempts to access a
514 Shibboleth-protected resource, that resource's SHAR queries the user's AA
515 for all attributes to which it is entitled. The SHAR provides its own name
516 and the URI of the requesting application. The
517 AA finds the attributes associated with the browser user, determines an
518 "Effective ARP" for this user, and then sends to the SHAR only the
519 attribute-value pairs allowed in this policy.</p>
520 <p>An ARP may be thought of as a sort of filter for outbound attributes; it
521 cannot create attributes or data that aren't originally present, but it can
522 limit the attributes released and the values those attributes may have when
523 released. It does not change the information in the data sources in any way.</p>
524 <p>Each ARP is comprised of one or more rules that specify which attributes
525 and values may be released to a given application and that SHAR. The
526 assignment of rules to various targets is quite flexible and includes
527 mechanisms for specifying: that a rule should affect all targets (default
528 rule), exact SHAR names for which a rule is applicable, regular expressions
529 against which SHAR names should be matched to determine if a rule is
530 applicable, and individual applications that may span hosts and URL's as
532 <p>For each request, an Effective ARP is determined by locating all ARP's
533 applicable to the designated user and extracting each rule that matches the
534 querying SHAR and resource. Attributes and values that are specified for
535 release are included in the effective ARP, while those specified for denial
536 are blocked from release. See section <a href="#5.b.i.">5.b.i</a> for
537 details on how ARP's are processed.</p>
538 <p>Various ARP's may be combined in forming the Effective ARP. For instance,
539 the Site ARP is administratively maintained and applies to all users for
540 which the AA is answerable. User ARP's apply to a specific user only, and
541 can be maintained either administratively or by the users themselves. All
542 ARP's are specified using the same syntax and semantics.</p>
544 <h4><a name="2.f."></a>2.f. Attribute Acceptance Policies</h4>
546 <p>When a target receives a set of attributes, it must evaluate them in the
547 context of the Attribute Authority that is providing them, to assess their
548 "reasonableness". For example, if the value of an attribute is expected to
549 be from a small set of enumerated choices, the value should be compared
550 against that list. If a particular attribute or value is only trusted when
551 asserted by specific origins, that too should be checked.</p>
552 <p>Targets are configured to accept specific attributes that they understand
553 and care about, and are also configured with the rules to apply before
554 accepting the attributes for use by the RM or an application. Attributes and
555 values that don't meet the target's requirements are filtered out. The set
556 of configuration rules to make these decisions is called an Attribute
557 Acceptance Policy (AAP).</p>
559 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
561 <p>A primary Shibboleth design consideration was to require very little or
562 no modification to client machines. The only requirement is that a browser
563 is used which supports cookies, redirection and SSL. Browser users will have
564 to perform an additional click to submit the authentication assertion if
565 JavaScript is not functional.</p>
567 <h4><a name="2.h."></a>2.h. Clocks</h4>
569 <p><a href="http://www.ntp.org/">NTP</a> should be run on all
570 web servers. Shibboleth employs a short assertion acceptance window to protect
571 against replay attacks. Because of this, any significant degree of clock
572 skew can hinder the ability of users to access sites successfully.</p>
574 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
576 <p>Especially for higher education, there are a handful of laws enacted
577 which may have important ramifications on the disclosure of personal
578 information and attributes. Since Shibboleth does not necessarily need to
579 transmit identity, it is an ideal solution for many higher education
580 situations. Nevertheless, all parties within the United States of America
581 are strongly advised to consult the
582 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
583 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
584 legislation before deploying Shibboleth.</p>
587 <h3><a name="3."></a>3. Installation</h3>
588 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
589 <p>The Shibboleth project makes binary packages available only for Windows,
590 that are precompiled against recent releases of various required libraries such
591 as OpenSSL. Binaries for other platforms may be available on a limited or ad hoc
592 basis. It is highly advisable to build from source when using Shibboleth in
593 a production environment in order to permit patching or updating of packages as
594 security holes and bugs are fixed. Building from source is necessary to give you
595 complete control over your deployment platform. The binary packages represent a
596 snapshot in time only. To build from source, see the <span class="fixed">
597 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source
599 <p>The software requirements listed correspond to the binary distribution. In
600 general, source builds should work against all recent versions of the operating
601 systems and software dependencies listed below. For specific questions, inquire
602 to the support mailing list, or give it a try. Note that OpenSSL releases
603 frequent security updates; the version listed may not be the most current, but
604 most minor "letter" updates should be usable.</p>
606 <p><b>General Requirements and Notes:</b></p>
608 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.x</a>
610 <p>Apache 1.3.x must be compiled with mod_so for DSO module support, and
611 should include SSL support (preferably using <span class="fixed">mod_ssl</span>),
612 and EAPI support (which <span class="fixed">mod_ssl</span> requires and provides).</p>
613 <p><b>Portions of the <span class="fixed">libphp4</span> Apache
614 module are written in C++, as is Shibboleth. There is a known conflict on Unix
615 platforms between the PHP extensions <span class="fixed">libpspell.so</span>
616 and <span class="fixed">libsablot.so</span> which will manifest
617 itself as segmentation faults when starting Apache. If a site wants
618 to use <span class="fixed">libphp4.so</span> and Shibboleth at the same time,
619 then one of the following may be done:</b>
621 <li>Remove the options <span class="fixed">--with-pspell</span>
622 and <span class="fixed">--with-xslt-sablot</span> from PHP's
624 <li>Rebuild these two modules using the same version of GCC that
625 was used to compile Shibboleth.</li>
629 <li><a href="http://www.apache.org/dist/httpd/">Apache 2.0.x</a>
631 <p>Apache 2.0.x must be compiled with mod_so for DSO module support, and
632 should include SSL support which is available but not included by default.
633 See also the note about PHP above.</p>
638 <p>When installing under Windows 2003, if the server is not in a
639 domain before installing IIS 6, there may be issues surrounding
640 permissions on directories because of new restrictions on IIS
641 extensions accessing files.</p>
644 <li><a href="http://www.openssl.org">OpenSSL</a>
646 <p>Verions 0.9.6 and 0.9.7 are both supported, but 0.9.7 should be used
647 if possible, as support for 0.9.6 may be dropped in a future release.
648 Support for threads and shared libraries <b>must</b> be included during
649 configuration using the <i>threads</i> and <i>shared</i> options.</p>
652 <p>Most other required libraries are either easy to update or not found
653 on typical systems. See the <span class="fixed">INSTALL.txt</span> files
654 in the OpenSAML and Shibboleth source distributions for specific requirements
655 of a given release. The important requirements are for pthreads support and
656 shared libraries on Unix platforms. Without both, building will be hard and
657 stability unlikely.</p>
659 <p><b>Operating System Specific Notes:</b></p>
661 <li>Windows NT/2000/XP/2003
664 <p>Any Apache modules used, and Apache itself, must be compiled
665 with the Microsoft DLL-based runtime, selected by compiling with
666 the /MD switch. The binary distribution was built against Apache
667 versions 1.3.29 (with EAPI patches from mod_ssl 2.8.16) and 2.0.48.
668 Forward compatibility is likely, but errors will result if an
669 Apache implementation such as IBM's IHS product or any other
670 non-EAPI version of 1.3 is used. In such cases, you must build
671 the Shibboleth Apache modules from source.</p>
674 <p>The installer will prompt for an install path, change default
675 configuration files as appropriate for Windows, and set various
676 environment variables for you. A default SHAR service can also
677 be installed, or you can install it manually using the
678 instructions in this guide.</p>
679 <p>Note that debug/symbol versions of the libraries and software
680 are included, and may be used by appending "debug" to the
681 Shibboleth library path and using the corresponding modules and
682 binaries. If you do so, be aware that Apache and other modules
683 must also be compiled with Microsoft's debug runtime (via the /MDd
684 compiler option). In most cases, you can safely ignore or even
685 delete the debug versions.</p>
689 <li>RedHat Linux 7.2,7.3:
692 <p>The most recent Red Hat RPM for Apache (1.3.27-2 as of this writing) is sufficient for
693 use with Shibboleth. You can use the older version of OpenSSL included with the OS, for this
694 release, but be advised this may change in the future.</p>
697 <p>The version of GCC that comes with this system is too old to build Shibboleth.
698 Special update RPMs are available for GCC 3.04 that will work provided you
699 configure packages with CC and CXX set to gcc3 and g++3 respectively. Newer
700 GCC versions also work but may require a glibc upgrade and necessitate a lot
701 of unrelated package updates.</p>
705 <li>RedHat Linux 9 / Fedora
708 <p>Apache 2.0 is included as the default Apache version in this release.</p>
712 <li>RedHat Enterprise Linux
715 <p>Apache 2.0 is included as the default Apache version in this release.</p>
722 <p>Shibboleth requires that Apache and Apache-SSL be built with
723 <span class="fixed">libpthread</span>, or loading the
724 <span class="fixed">mod_shib_13</span> or <span class="fixed">mod_shib_20</span>
725 modules will cause Apache to fail. While RedHat's Apache is compatible,
726 Debian's Apache must be rebuilt with <span class="fixed">libpthread</span>:</p>
728 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
729 $ apt-build --rebuild --reinstall install \<br>
730 apache-common apache apache-ssl</span></p>
738 <p>The shared library version of OpenSSL is required by
739 Shibboleth. The static libraries may be installed as well if
740 necessary for other applications, but cannot be linked into
741 mod_ssl or any other Apache modules. If mod_ssl's libssl.so
742 module is linked against the static version, bus errors will
744 <p>To check how mod_ssl was built, run the <span class="fixed">
745 ldd</span> command against <span class="fixed">libssl.so</span>
746 in the Apache <span class="fixed">libexec/</span> folder and
747 check the output for references to <span class="fixed">
748 libssl.so.0.9.7</span>. If you see an earlier version
749 mentioned, or no mention of it at all, then OpenSSL 0.9.7 must be
750 built with shared libraries from source, and the Apache module rebuilt with it.</p>
751 <p>openssl-0.9.7d, the latest security fix release, has been tested,
752 but any 0.9.7 version should work.</p>
755 <p>Solaris does not come with GCC 3, but various versions can be obtained
756 from <a href="http://www.sunfreeware.com">http://www.sunfreeware.com</a>.
757 If building your own, GCC must be configured to use Sun's linker. Note that
758 you should use a consistent version of GCC across any other C++ libraries
759 in use within Apache, but other C++ code on your server can freely use a
760 different version as long as the necessary <span class="fixed">libstdc++.so</span>
761 for a given version is available</p>
764 <p>Use of GCC is recommended, but new releases of Sun's Forte compiler have
765 been used successfully with some tinkering with configuration scripts.</p>
771 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
773 <p>For the sake of clarity, this deployment guide assumes that standard
774 directories are used for all installations. These directories may be changed
775 for local implementations, but must be done so consistently.</p>
776 <p>On Unix, the build documentation suggests building into
777 <span class="fixed">/opt/shibboleth</span>. If you use a different layout or
778 location, most of the essential configuration files will be tweaked for you,
779 but watch for any exceptions.</p>
780 <p>On Windows, use of the installer is recommended. Visual Studio 6.0
781 project files are included with the OpenSAML and Shibboleth source
782 distributions for source builds if maximum flexibility to deal with
783 security issues or Apache variants is desired.</p>
785 <h4><a name="3.c."></a>3.c. Configure Apache</h4>
788 <li>Shibboleth includes configuration directives in the files
789 <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span>
790 and <span class="fixed">/opt/shibboleth/etc/shibboleth/apache2.config</span>
791 which must be added to the <span class="fixed">httpd.conf</span> file used
792 locally. It is recommended that these directives simply be added to the end of the
793 existing <span class="fixed">httpd.conf</span> file rather than trying
794 to merge it in-line; <a href="#3.c.2.">step 2</a> describes the
795 necessary modifications to the Apache startup script. The default
796 configuration will often work, but if customization is necessary, these
797 options may be modified:<dl>
798 <dd class="attribute"><span class="fixed">LoadModule <module> <pathname></span></dd>
799 <dd class="value">Specifies the name and location of the module,
800 installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shib_13.so</span>
801 or <span class="fixed">/opt/shibboleth/libexec/mod_shib_20.so</span></dd>
803 <dd class="attribute"><span class="fixed">ShibConfig <pathname></span></dd>
804 <dd class="value">Specifies the <span class="fixed">pathname</span>
805 of the Shibboleth configuration file. Defaults to <span class="fixed">
806 /opt/shibboleth/etc/shibboleth/shibboleth.xml</span>.</dd>
808 <dd class="attribute"><span class="fixed">ShibSchemaDir <path></span></dd>
809 <dd class="value">Specifies the <span class="fixed">path</span>
810 of the Shibboleth schema folder. Defaults to <span class="fixed">
811 /opt/shibboleth/etc/shibboleth</span>.</dd>
813 <dd class="attribute"><span class="fixed"><Location <i>url</i>><br>
814 SetHandler <method><br>
815 </Location></span></dd>
816 <dd class="value"><p>(Apache 1.3 only) Specifies the relative <span class="fixed">path</span>
817 and the <span class="fixed">handler</span> the target uses to process
818 incoming sessions and lazy session startup for Shibboleth-protected
819 resources. This works in concert with the <span class="fixed">shireURL</span>
820 settings in the XML configuration file. Any virtual locations that are to be
821 used for this purpose should be defined to Apache here.</p>
822 <p>Another option for some sites is to configure Shibboleth globally in
823 "lazy" session mode for all content. This allows the module to
824 detect session requests and pass them to the handler without the need to
825 configure the handler itself.</p>
829 <li>If the OpenSSL libraries are not in the system's search path, they
830 should be added to the <span class="fixed">LD_LIBRARY_PATH</span> used by
831 Apache. You will also usually need to add <span class="fixed">/opt/shibboleth/lib</span>
832 to <span class="fixed">LD_LIBRARY_PATH</span> as well.</li>
833 <li>The SHAR must be started along with Apache. Among other methods on
834 Unix, this can be done either by creating a separate SHAR startup script
835 or by modifying Apache's RC script to start/stop the <span class="fixed">
836 SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is
837 suggested that Apache's script be modified by adding:<blockquote>
838 <p><span class="fixed">/opt/shibboleth/bin/shar -f &</span> </p>
840 <p>In most cases, the build process insures that the SHAR can locate
841 the configuration file and schemas, but the SHIBCONFIG and SHIBSCHEMAS
842 environment variables may be used as well. Command line options can also
843 be used to specify them.</p>
844 <p>On Windows, the SHAR is a service and is managed separately.</li>
845 <li>By default, the Shibboleth modules are configured to log information
846 on behalf of Apache to the file <span class="fixed">
847 /opt/shibboleth/var/log/shibboleth/shire.log</span>, though this can be
848 changed by modifying the <span class="fixed">.logger</span> files
849 pointed to by <a href="#4.a.">configuration elements</a>. For this log
850 to be created, Apache must have permission to write to this file, which
851 may require that the file be manually created and permissions assigned
852 to whatever user Apache is configured to run under. If the file does not
853 appear when Apache runs with the modules loaded, check for permission
855 <li>The options in <span class="fixed">shibboleth.xml</span> must be
856 configured as documented in <a href="#4.a.">4.a</a>. Apache content may
857 then need to be modified for Shibboleth authentication. This is
858 discussed in <a href="#4.d.">4.d</a>. It is recommended that the target
859 then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
862 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
865 <li>The package includes an ISAPI filter and bundled extension for
866 session startup in a single library, <span class="fixed">libexec\isapi_shib.dll</span>.
867 This filter is configured using commands in <span class="fixed">
868 C:\opt\shibboleth\etc\shibboleth\shibboleth.xml</span> (or wherever you've
869 installed the software). Make sure you or the installer has added the lib
870 directory to the path as directed in <a href="#3.b.">section 3.b.</a>
871 You will generally need to restart the system after installation.
872 <p>Installing the extension into IIS is a two step process:
874 <li type="a">First, add the filter using the Internet Services
875 Manager MMC console. Right click on the machine icon on the left,
876 and edit the WWW Service master properties. On the "ISAPI Filters"
877 tab, add a new filter called Shibboleth and specify the DLL named
878 above. The priority should be High, and once the filter is loaded,
879 make sure it appears in the list <b>below</b> the "sspifilt" entry.
880 Restart IIS and make sure the filter shows up with a green arrow.
881 Check the Windows event log if it fails to load.</li>
882 <li type="a">Secondly, map a special, distinct file extension, such as
883 <span class="fixed">.shire</span>, to the ISAPI library so that
884 virtual URLs can be specified to invoke the extension handler for each
885 web site. Right click on the machine icon on the left, and edit the
886 WWW Service master properties. On the "Home Directory" tab, add a
887 script mapping using the "Configuration" button. The "Executable"
888 box should point to <span class="fixed">isapi_shib.dll</span>, and the
889 "Extension" can be set to anything unlikely to conflict, but
890 <span class="fixed">.shire</span> is assumed (and the dot must be
891 included). You should NOT select the option to limit verbs, and
892 you MUST uncheck the "Check that file exists" box. On newer
893 versions of IIS, checking the "Script Engine" box is suggested,
894 as it will permit the extension to handle requests in directories with only
895 script permissions assigned.</li>
896 <li type="a"><font color=#444499>(IIS 6 Only)</font> A new Web
897 Service Extension must be defined for Shibboleth; without this, the
898 mapping from <span class="fixed">*.shire</span> to <span
899 class="fixed">isapi_shib.dll</span> won't occur and a file error
900 will appear Add this extension with an arbitrary name and associate
901 it with <span class="fixed">isapi_shib.dll</span>.</li>
904 <li>All other aspects of configuration are handled via the
905 <span class="fixed">shibboleth.xml</span> file and associated XML
906 files described in subsequent sections. Particular use is made of
907 the <span class="fixed">/SHIRE/Implementation/ISAPI</span> element that allows
908 IIS sites to be mapped to scheme, hostname, and port for proper request
909 mapping and generation of redirects.</li>
910 <li>Instance IDs are used in the IIS metabase to identify web sites. In older versions,
911 they are applied starting with 1(one) and number the web sites in order in the
912 Internet Services Manager from top to bottom. Newer versions appear to assign
913 some IID values with strange ASCII formulas applied to the site name. A simple
914 ASP or CGI script can be run within a site to dump the INSTANCE_ID header.</li>
915 <li>See the following section for information on running the SHAR
916 service on Windows.</li>
917 <li>The options in <span class="fixed">shibboleth.xml</span> must be
918 configured as documented in <a href="#4.a.">4.a</a>. It is recommended
919 that the target then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
922 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
924 <p>The SHAR is a console application that is primarily designed to be
925 installed as a Windows service. To run the process in console mode for
926 testing or to diagnose major problems, the <span class="fixed">-console</span>
927 parameter is used. Otherwise, parameters are used to install (or remove) the SHAR from the
928 service database and subsequent control is via the Service Control Manager
929 applet. The following command line parameters can be used:</p>
931 <dd class="attribute"><span class="fixed">-console</span></dd>
932 <dd class="value">Allows the process to be started from a command
933 prompt. Since the console will exit if the desktop user logs out, this
934 is not suitable for production use, but may be useful for testing.</dd>
935 <dd class="attribute"><span class="fixed">-check</span></dd>
936 <dd class="value">Validates the general correctness of the configuration.
937 Not all problems can be detected this way, but the chance of successful startup
938 is high if the checking process does not log any errors.</dd>
939 <dd class="attribute"><span class="fixed">-config <pathname></span> </dd>
940 <dd class="value">Specifies the pathname of the SHAR's configuration
941 file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>
942 or the value of the <span class="fixed">SHIBCONFIG</span> environment
943 variable, if it is set.</dd>
944 <dd class="attribute"><span class="fixed">-schemadir <path></span> </dd>
945 <dd class="value">Specifies the path to the XML schema files. Defaults to
946 <span class="fixed">\opt\shibboleth\etc\shibboleth</span> or the value of the
947 <span class="fixed">SHIBSCHEMAS</span> environment variable, if it is set.</dd>
948 <dd class="attribute"><span class="fixed">-install <servicename></span></dd>
949 <dd class="value">Installs the SHAR as a named service in the Windows
950 service database. A name should be provided if multiple instances of the
951 SHAR need to be run on different ports, and thus installed separately.
952 The <span class="fixed">-config</span> option can be provided to include
953 a specific configuration file on the service's command line.</dd>
954 <dd class="attribute"><span class="fixed">-remove <servicename></span></dd>
955 <dd class="value">Removes the named service instance of the SHAR from
956 the Windows service database.</dd>
962 <h3><a name="4."></a>4. Getting Running</h3>
963 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.xml</span></h4>
965 <p>The configuration for the target is mostly contained within <span class="fixed">shibboleth.xml</span>,
966 located by default at <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>.
967 The target comes pre-configured with certificates and settings that will work against a test origin
968 running on the same server; however, there are several values that must later be changed to interoperate
969 with other sites securely and effectively.</p>
970 <p>The following is a hyperlinked version of a basic configuration file, followed by a list of elements
971 and attributes that must be modified. The actual example shipped with Shibboleth includes many more options
972 that are commented out and other elements necessary to support test functionality.
973 Click on any attribute or element for more information on its population and definition.</p>
976 <a class="fixedlink" href="#confShibbolethTargetConfig"><ShibbolethTargetConfig xmlns="urn:mace:shibboleth:target:config:1.0"
977 logger="/opt/shibboleth/etc/shibboleth/shibboleth.logger" clockSkew="180"></a>
979 <a class="fixedlink" href="#confExtensions"><Extensions></a>
980 <a class="fixedlink" href="#confLibrary"><Library path="/opt/shibboleth/libexec/xmlproviders.so" fatal="true"/></a>
981 <a class="fixedlink" href="#confExtensions"></Extensions></a>
983 <a class="fixedlink" href="#confSHAR"><SHAR logger="/opt/shibboleth/etc/shibboleth/shar.logger"></a>
985 <a class="fixedlink" href="#confExtensions"><Extensions></a>
986 <a class="fixedlink" href="#confLibrary"><Library path="/opt/shibboleth/libexec/shib-mysql-ccache.so" fatal="false"/></a>
987 <a class="fixedlink" href="#confExtensions"></Extensions></a>
989 <a class="fixedlink" href="#confUnixListener"><UnixListener address="/tmp/shar-socket"/></a>
991 <!-- Primarily for Windows Deployments:
992 <a class="fixedlink" href="#confTCPListener"><TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/></a>
996 <a class="fixedlink" href="#confMemorySessionCache"><MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
997 defaultLifetime="1800" retryInterval="300" strictValidity="true" propagateErrors="true"/></a>
1000 <a class="fixedlink" href="#confMySQLSessionCache"><MySQLSessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
1001 defaultLifetime="1800" retryInterval="300" strictValidity="true" propagateErrors="true"
1002 mysqlTimeout="14400"></a>
1003 <a class="fixedlink" href="#confArgument"><Argument>--language=/opt/shibboleth/share/english</Argument></a>
1004 <a class="fixedlink" href="#confArgument"><Argument>datadir=/opt/shibboleth/data</Argument></a>
1005 </MySQLSessionCache>
1007 <a class="fixedlink" href="#confSHAR"></SHAR></a>
1009 <a class="fixedlink" href="#confSHIRE"><SHIRE logger="/opt/shibboleth/etc/shibboleth/shire.logger"></a>
1011 <a class="fixedlink" href="#confRequestMapProvider"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></a>
1012 <a class="fixedlink" href="#confRequestMap"><RequestMap applicationId="default"></a>
1013 <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="https"></a>
1014 <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true">
1015 <!-- Example shows a subfolder on the SSL port assigned to a separate <Application> -->
1016 <Path name="admin" applicationId="foo-admin"/>
1018 <a class="fixedlink" href="#confHost"></Host></a>
1019 <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="http"></a>
1020 <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
1021 <a class="fixedlink" href="#confHost"></Host></a>
1022 <a class="fixedlink" href="#confRequestMap"></RequestMap></a>
1023 <a class="fixedlink" href="#confRequestMapProvider"></RequestMapProvider></a>
1026 <a class="fixedlink" href="#confImplementation"><Implementation></a>
1027 <a class="fixedlink" href="#confISAPI"><ISAPI normalizeRequest="true"></a>
1028 <a class="fixedlink" href="#confSite"><Site id="1" scheme="https" host="localhost" port="443"/></a>
1029 <a class="fixedlink" href="#confISAPI"></ISAPI></a>
1030 <a class="fixedlink" href="#confImplementation"></Implementation></a>
1032 <a class="fixedlink" href="#confSHIRE"></SHIRE></a>
1034 <a class="fixedlink" href="#confApplications"><Applications xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
1035 applicationId="default" providerId="https://example.org/shibboleth/target"
1036 signRequest="false" signedResponse="false" signedAssertions="false"></a>
1038 <a class="fixedlink" href="#confSessions"><Sessions lifetime="7200" timeout="3600" checkAddress="true"
1039 shireURL="/Shibboleth.shire" shireSSL="false" cookieName="_shibsession_default" cookieProps="; path=/"
1040 wayfURL="https://wayf.internet2.edu/InQueue/WAYF"></a>
1042 <a class="fixedlink" href="#confErrors"><Errors shire="/opt/shibboleth/etc/shibboleth/shireError.html"
1043 rm="/opt/shibboleth/etc/shibboleth/rmError.html"
1044 access="/opt/shibboleth/etc/shibboleth/accessError.html"
1045 supportContact="root@localhost"
1046 logoLocation="/shibtarget/logo.jpg"
1047 styleSheet="/shibtarget/main.css"/></a>
1049 <a class="fixedlink" href="#confCredentialUse"><CredentialUse TLS="defcreds" Signing="defcreds"></a>
1050 <a class="fixedlink" href="#confRelyingParty"><RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/></a>
1051 <a class="fixedlink" href="#confCredentialUse"></CredentialUse></a>
1054 <a class="fixedlink" href="#confAttributeDesignator"><AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"
1055 AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/></a>
1058 <a class="fixedlink" href="#confAAPProvider"><AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP"
1059 uri="/opt/shibboleth/etc/shibboleth/AAP.xml"/></a>
1061 <a class="fixedlink" href="#confFederationProvider"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"
1062 uri="/opt/shibboleth/etc/shibboleth/sites.xml"/></a>
1064 <a class="fixedlink" href="#confTrustProvider"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"
1065 uri="/opt/shibboleth/etc/shibboleth/trust.xml"/></a>
1068 <a class="fixedlink" href="#confRevocationProvider"><RevocationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLRevocation"
1069 uri="/opt/shibboleth/etc/shibboleth/trust.xml"/></a>
1072 <a class="fixedlink" href="confAudience"><saml:Audience>urn:mace:inqueue</saml:Audience></a>
1074 <!-- Override settings for this application.
1075 <a class="fixedlink" href="confApplication"><Application id="foo-admin"></a>
1076 <a class="fixedlink" href="#confSessions"><Sessions lifetime="7200" timeout="3600" checkAddress="true"
1077 shireURL="/secure/admin/Shibboleth.shire" shireSSL="true" cookieProps="; path=/secure/admin; secure"
1078 wayfURL="https://wayf.internet2.edu/InQueue/WAYF"/></a>
1079 <a class="fixedlink" href="#confAttributeDesignator"><saml:AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonPrincipalName"
1080 AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/></a>
1081 <a class="fixedlink" href="confApplication"></Application></a>
1084 <a class="fixedlink" href="#confApplications"></Applications></a>
1086 <a class="fixedlink" href="#confCredentialsProvider"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></a>
1087 <a class="fixedlink" href="#confCredentials"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a>
1088 <a class="fixedlink" href="#confFileResolver"><FileResolver Id="defcreds"></a>
1089 <a class="fixedlink" href="#confKey"><Key format="PEM" password="secret"></a>
1090 <a class="fixedlink" href="#confCredPath"><Path>/opt/shibboleth/etc/shibboleth/shar.key</Path></a>
1091 <a class="fixedlink" href="#confKey"></Key></a>
1092 <a class="fixedlink" href="#confCertificate"><Certificate format="PEM"></a>
1093 <a class="fixedlink" href="#confCredPath"><Path>/opt/shibboleth/etc/shibboleth/shar.crt</Path></a>
1094 <a class="fixedlink" href="#confCAPath"><CAPath>/opt/shibboleth/etc/shibboleth/ca.crt</CAPath></a>
1095 <a class="fixedlink" href="#confCertificate"></Certificate></a>
1096 <a class="fixedlink" href="#confFileResolver"></FileResolver></a>
1097 <a class="fixedlink" href="#confCredentials"></Credentials></a>
1098 <a class="fixedlink" href="#confCredentialsProvider"></CredentialsProvider></a>
1100 <a class="fixedlink" href="#confShibbolethTargetConfig"></ShibbolethTargetConfig></a>
1103 <p>The following changes must be made to the default configuration before the target will interoperate in a federation.</p>
1106 <p>The main <a href="#confApplications"><span class="fixed">Applications</span></a> element's
1107 <span class="fixed">providerId</span> attribute must be changed to reflect the URI this target will
1108 use to identify itself to origins by default. This will often be approved or supplied by a federation.</p>
1111 <p>The <span class="fixed">supportContact</span> and error templates for the target found in the
1112 <a href="#confErrors"><span class="fixed">Errors</span></a> element should be changed to ensure that
1113 users have a proper support mechanism.</p>
1116 <p>Proper credentials for this target signed by an authority that the federation recognizes must be
1117 referenced by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element.
1118 The default configuration points at files containing widely-available, insecure keys and certificates.
1119 Note that keys are supported in a variety of formats: DER, PEM, encrypted PEM, PKCS8, and encrypted PKCS8.</p>
1122 <p><a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a> and
1123 <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a> elements must be added or
1124 changed as needed to reflect the arrangements required. This information is often provided by
1125 federations to their members.</p>
1129 <p>For Apache (but not IIS), there is also information that must be
1130 configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span>
1131 (or equivalent); for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1132 <p>Information in the logging configuration files referenced by
1133 <span class="fixed">shibboleth.xml</span> may require additional changes to
1134 meet local needs. The logging level can be raised to <span class="fixed">
1135 DEBUG</span> if extremely detailed information is needed for testing.
1136 It is recommended that after initial installation is
1137 completed, the log level in both files be left at either <span class="fixed">
1138 INFO</span> or <span class="fixed">WARN</span>.</p>
1139 <p>All elements are optional unless otherwise specified. All attributes of an element are optional unless
1140 designated <span class="mandatory">mandatory</span> by a purple background.</p>
1142 <dd class="attribute"><a name="confAAPProvider"><span class="fixed"><AAPProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP"</span> uri="<i>pathname</i>"/></span></dd>
1144 <p>This element is used to specify individual attribute acceptance policies that will apply to an application
1145 and may appear zero or more times within the <a href="#confApplications"><span class="fixed">Applications</span></a>
1146 or <a href="#confApplication"><span class="fixed">Application</span></a> element. For information about these
1147 policies and their format, refer to <a href="#4.e.">section 4.e</a>.</p>
1148 <p>The default set of AAP providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1149 element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1152 <dd class="attribute"><a name="confApplication"><span class="fixed"><Application <span class="mandatory">id="<i>identifier</i>"</span> providerId="<i>identifier</i>" signRequest="<i>true/false</i>" signedResponse="<i>true/false</i>" signedAssertions="<i>true/false</i>"></span></dd>
1154 <p>Individual applications that require different attributes, session settings, metadata, etc. can be differentiated
1155 from the default configuration as specified in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1156 element. It must contain a <a href="#confSessions"><span class="fixed">Sessions</span></a> element, but overriding other
1157 elements is optional.</p>
1159 <li class="mandatory"><span class="fixed">id</span>: This attribute defines an internal identifier allowing
1160 individual <span class="fixed">applicationId</span> attributes as part of
1161 <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a>
1162 elements to point to this <span class="fixed">Application</span> to handle requests.</li>
1163 <li><span class="fixed">providerId</span>: Distinct from the internal identifier, this is the unique identifier
1164 that will be used when communicating with origin sites to request authentication or attributes.
1165 This value is referenced by origins when creating rules for the release of attributes to targets and will
1166 often be provided to federations to facilitate origin configuration. If none is specified, the default
1167 <a href="#confApplications><span class="fixed">Applications</span></a> element's
1168 <span class="fixed">providerId</span> applies.</li>
1169 <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute
1170 requests that it sends to origins on behalf of this application. This is usually unnecessary, as the
1171 TLS/SSL transport can provide authentication more efficiently.</li>
1172 <li><span class="fixed">signedResponse</span>: If <span class="fixed">true</span>, the target will require that
1173 all SAML attribute responses it receives for this application be signed.</li>
1174 <li><span class="fixed">signedAssertions</span>: If <span class="fixed">true</span>, the target will require that
1175 individual SAML assertions it receives for this application be signed. This may be particularly useful if the
1176 application is forwarding the assertion, but requires a liberal (or no) AAP to avoid corrupting the signature.</li>
1180 <dd class="attribute"><a name="confApplications"><span class="fixed"><Applications <span class="mandatory">id="<i>default</i>" providerId="<i>identifier</i>"</span> signRequest="<i>true/false</i>" signedResponse="<i>true/false</i>" signedAssertions="<i>true/false</i>"></span></dd>
1182 <p>The <span class="fixed">Applications</span> element must appear once and contains default settings for requests
1183 handled by the target. It must contain at least one each of the <a href="#confSessions"><span class="fixed">Sessions</span></a>,
1184 and <a href="#confErrors"><span class="fixed">Errors</span></a> elements, and may contain
1185 <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a>,
1186 <a href="#confAttributeDesignator"><span class="fixed">saml:AttributeDesignator</span></a>,
1187 <a href="#confAudience"><span class="fixed">saml:Audience</span></a>,
1188 <a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a>,
1189 <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a>,
1190 <a href="#confRevocationProvider"><span class="fixed">RevocationProvider</span></a>,
1191 and <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1193 <li class="mandatory"><span class="fixed">id</span>: This attribute has a fixed value of "default" and should not be changed.</li>
1194 <li class="mandatory"><span class="fixed">providerId</span>: Distinct from the internal identifier, the
1195 <span class="fixed">providerId</span> is the unique identifier that will be used when communicating
1196 with origin sites to request authentication or attributes. This value is referenced by origins when
1197 creating rules for the release of attributes to targets and will often be provided to federations to
1198 facilitate origin configuration.</li>
1199 <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute
1200 requests that it sends to origins by default. This is usually unnecessary, as the TLS/SSL transport can provide
1201 authentication more efficiently.</li>
1202 <li><span class="fixed">signedResponse</span>: If <span class="fixed">true</span>, the target will require that
1203 all SAML attribute responses it receives are signed by default.</li>
1204 <li><span class="fixed">signedAssertions</span>: If <span class="fixed">true</span>, the target will require that
1205 individual SAML assertions it receives are signed by default. This may be particularly useful if the
1206 application is forwarding the assertion, but requires a liberal (or no) AAP to avoid corrupting the signature.</li>
1208 <p>Default settings can be overridden by using the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> to
1209 assign a non-default <span class="fixed">applicationId</span> to particular content in
1210 <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a>
1211 elements. An <a href="#confApplication"><span class="fixed">Application</span></a> element is then inserted containing
1212 a matching <span class="fixed">id</span> attribute, and finally specific elements that override the defaults are
1213 placed within it. A fully specified <a href="#confSessions"><span class="fixed">Sessions</span></a> element is
1214 always required for any new application created, because each application needs a distinct
1215 <span class="fixed">shireURL</span> so that new sessions can be unambiguously mapped to a particular application.</p>
1218 <dd class="attribute"><a name="confArgument"><span class="fixed"><Argument><i>value</i></Argument></span></dd>
1220 <p>The <span class="fixed">Argument</span> element is used in the
1221 <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to specify one or more
1222 arguments to pass to the MySQL database engine.</p>
1225 <dd class="attribute"><a name="confAttributeDesignator"><span class="fixed"><saml:AttributeDesignator <span class="mandatory">AttributeName="<i>name</i>" AttributeNamespace="<i>namespace</i>"</span>></span></dd>
1227 <p>The <span class="fixed">AttributeDesignator</span> element is used in the
1228 <a href="#confApplications"><span class="fixed">Applications</span></a> and
1229 <a href="#confApplication"><span class="fixed">Application</span></a> elements to name an attribute to specifically
1230 request from origins on behalf of an application. If none are specified, the application will be given anything
1231 the origin allows it to receive.</p>
1233 <li class="mandatory"><span class="fixed">AttributeName</span>: Specifies the name of a SAML attribute, generally a URI.</li>
1234 <li class="mandatory"><span class="fixed">AttributeNamespace</span>: Specifies the attribute's SAML namespace,
1235 which Shibboleth by convention sets to "urn:mace:shibboleth:1.0:attributeNamespace:uri".</li>
1237 <p>The default set of designators can be overridden within individual
1238 <a href="#confApplication"><span class="fixed">Application</span></a> elements, but if default elements are specified,
1239 it isn't possible to "remove" them and revert to none within a particular application.</p>
1242 <dd class="attribute"><a name="confAudience"><span class="fixed"><saml:Audience><i>value</i></saml:Audience></span></dd>
1244 <p>The <span class="fixed">Audience</span> element is used in the
1245 <a href="#confApplications"><span class="fixed">Applications</span></a> and
1246 <a href="#confApplication"><span class="fixed">Application</span></a> elements element to specify one or more
1247 SAML audience URIs to designate while processing assertions. Audience values are used by origins to constrain the
1248 parties they issue assertions for. A target application always includes its own <span class="fixed">providerId</span>
1249 as an audience value.</p>
1250 <p>Within an <a href="#confApplication"><span class="fixed">Application</span></a> element, this setting is not
1251 inherited from the <a href="#confApplications"><span class="fixed">Applications</span></a> element. Any values
1252 desired must be specified. In most cases, this element can be omitted.</p>
1255 <dd class="attribute"><a name="confCAPath"><span class="fixed"><CAPath><i>pathname</i></CAPath></span></dd>
1257 <p>Paired with a <a href="#confCredPath"><span class="fixed">Path</span></a> element within a
1258 <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, it allows for the specification
1259 of additional certificates in a chain up to a trust anchor. As many <span class="fixed">CAPath</span> elements as
1260 necessary to complete the chain may be specified. May be needed if the relying party does not possess the entire CA
1264 <dd class="attribute"><a name="confCertificate"><span class="fixed"><Certificate format="<i>type</i>"></span></dd>
1266 <p>This specifies the certificate corresponding to this set of credentials. The certificate itself must be specified
1267 by a <a href="#confCredPath"><span class="fixed">Path</span></a> element contained by this element. If the certificate
1268 isn't self-signed or signed by an authority familiar to the relying party, the files of certificates in the path to
1269 the root authority may be specified using one or more <a href="#confCAPath"><span class="fixed">CAPath</span></a> elements.
1270 Valid formats are <span class="fixed">PEM</span>, <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>.</p>
1271 <p>It's placed within the <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element and must be
1272 paired with the corresponding private key using the <a href="#confKey"><span class="fixed">Key</span></a> element.</p>
1275 <dd class="attribute"><a name="confCredentials"><span class="fixed"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></span></dd>
1277 <p>This element is the container for credentials used by the XML-based credentials provider with type
1278 "edu.internet2.middleware.shibboleth.common.Credentials". These credentials are used by the target to
1279 authenticate itself in SSL sessions or sign attribute requests, depending on application configuration. It must contain
1280 one or more <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> elements.</p>
1283 <dd class="attribute"><a name="confCredentialsProvider"><span class="fixed"><CredentialsProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.Credentials"</span>></span></dd>
1285 <p>This element is the container for providers of credentials used by the target and is placed inside the
1286 <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element. The supplied
1287 provider of type "edu.internet2.middleware.shibboleth.common.Credentials" must contain one
1288 <a href="#confCredentials"><span class="fixed">Credentials</span></a> element detailing the credentials
1289 to be used by the target. Other provider types might require different content.</p>
1292 <dd class="attribute"><a name="confCredentialUse"><span class="fixed"><CredentialUse <span class="mandatory">TLS="<i>string</i>" Signing="<i>string</i>"</span>></span></dd>
1294 <p>Used in the <a href="#confApplications"><span class="fixed">Applications</span></a> or
1295 <a href="#confApplication"><span class="fixed">Application</span></a> elements to specify the credentials used by
1296 applications for signing and TLS/SSL. The <span class="fixed">TLS</span> and <span class="fixed">Signing</span>
1297 attribute values reference the identifiers of credential resolvers defined in the
1298 <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> element. May also contain
1299 <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements that specify the credentials
1300 to use for specific origins or federations.</p>
1303 <dd class="attribute"><a name="confErrors"><span class="fixed"><Errors <span class="mandatory">shire="<i>pathname</i>" rm="<i>pathname</i>" access="<i>pathname</i>"</span> supportContact="<i>e-mail</i>" logoLocation="<i>URL</i>"/></span></dd>
1305 <p>Shibboleth is capable of displaying customized error pages based on templates and information provided by
1306 additional attributes in this element. These should all be customized to fit the requirements of the target application.
1307 For more information on configuration of error page generation, please see <a href="#4.b.">section 4.b</a>.</p>
1309 <li class="mandatory"><span class="fixed">shire</span>: Specifies the location of the template for the error page
1310 generated when there is an error re-directing the user to the WAYF or processing a new session sign-on.</li>
1311 <li class="mandatory"><span class="fixed">rm</span>: Specifies the location of the template for the error page
1312 generated if internal errors occur when supplying attributes to the application.</li>
1313 <li class="mandatory"><span class="fixed">accessError</span>: Specifies the location of the template for the page
1314 displayed to users when access to a protected resource is denied based on access control. This is distinct
1315 from when errors occur during the evaluation process itself, and indicates a denial of authorization.</li>
1316 <li><span class="fixed">supportContact</span>: Specifies a support e-mail address for the user to contact.</li>
1317 <li><span class="fixed">logoLocation</span>: Specifies the location of the logo used in the generation of error pages.
1318 This logo can be in any format that the web browser will understand, and should be a URL (absolute or relative) that
1319 will return a valid logo.</li>
1321 <p>The last two attributes are examples of tags that can be inserted at runtime into the templates. Arbitrary
1322 attributes may be specified in this element simply by adding them; no additional configuration is necessary.
1323 If there is a matching ShibMLP tag in the error page template as designed in <a href="#4.b.">4.b</a>, Shibboleth
1324 will insert the value of that attribute.</p>
1327 <dd class="attribute"><a name="confExtensions"><span class="fixed"><Extensions></span></dd>
1329 Extension libraries for one of the Shibboleth components or the entire target can be specified using this element
1330 depending on where it's present. It may be contained by any of the
1331 <a href="#confSHAR"><span class="fixed">SHAR</span></a>, <a href="#confSHIRE"><span class="fixed">SHIRE</span></a>,
1332 or <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> elements.
1333 It must contain one or more <a href="#confLibrary"><span class="fixed">Library</span></a> elements.
1336 <dd class="attribute"><a name="confFederationProvider"><span class="fixed"><FederationProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"</span> uri="<i>pathname</i>"></span></dd>
1338 <p>This element, when specified within an <a href="#confApplications"><span class="fixed">Applications</span></a>
1339 or <a href="#confApplication"><span class="fixed">Application</span></a> element, points to operational metadata either
1340 inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download
1341 periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.</p>
1342 <p>The default set of federation providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1343 element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1346 <dd class="attribute"><a name="confFileResolver"><span class="fixed"><FileResolver <span class="mandatory">Id="<i>string</i>"</span>></span></dd>
1348 <p>This element defines files used to store a private key, certificate, and certificate authorities and associates
1349 the set with an identifier. Placed inside the <a href="#confCredentials"><span class="fixed">Credentials</span></a>
1350 element. <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> and
1351 <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements will refer to these identifiers in
1352 their <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attributes, allowing different credentials
1353 to be used for different applications and relying parties.</p>
1354 <p>Must contain one <a href="#confKey"><span class="fixed">Key</span></a> element and should contain one
1355 <a href="#confCertificate"><span class="fixed">Certificate</span></a> element.</p>
1358 <dd class="attribute"><a name="confHost"><span class="fixed"><Host scheme="<i>protocol</i>" <span class="mandatory">name="<i>fqdn</i>"</span> port="<i>integer</i>" applicationId="<i>id</i>" requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"></span></dd>
1360 <p>Individual (real or virtual) hosts that this target protects are enumerated by <span class="fixed">Host</span> elements
1361 inside the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element. If a request is processed by
1362 Shibboleth for a URL on this host, these parameters will be applied to it. If there are
1363 <a href="#confPath"><span class="fixed">Path</span></a> elements within this element that match the URL and contain
1364 the <span class="fixed">applicationId</span>, <span class="fixed">requireSession</span>, or
1365 <span class="fixed">exportAssertion</span> attributes, they will override values in this element; similarly, values
1366 within this element will override those in the containing
1367 <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element.</p>
1369 <li><span class="fixed">scheme</span>: This specifies the protocol on which this host responds.
1370 Valid choices are <span class="fixed">http</span>, <span class="fixed">https</span>, <span class="fixed">ftp</span>,
1371 <span class="fixed">ldap</span>, and <span class="fixed">ldaps</span>.</li>
1372 <li class="mandatory"><span class="fixed">name</span>: This is the fully-qualified domain name of the host.
1373 This appended to the <span class="fixed">scheme</span> must match what is contained in the URL for the element's
1374 settings to apply to the request.</li>
1375 <li><span class="fixed">port</span>: This is the port the host is listening on, if not the standard port for the scheme.</li>
1376 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish
1377 an authenticated session with the user before handing off the request to the web server or application.
1378 If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span>
1379 (the default), applications are responsible for ensuring that a session exists if necessary, so-called
1380 <a href="#1.g.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span>
1381 for protected content without a full understanding of the implications.</li>
1382 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute
1383 assertion received from the origin is exported to a CGI request header called
1384 <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an
1385 application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments
1390 <dd class="attribute"><a name="confImplementation"><span class="fixed"><Implementation></span></dd>
1392 <p>A container element placed inside the <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element,
1393 the contents of this element will vary depending on the web server or environment that this Shibboleth deployment serves.
1394 Multiple configurations may be specified, but only one per implementation type. This element may contain the
1395 <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element.</p>
1398 <dd class="attribute"><a name="confISAPI"><span class="fixed"><ISAPI normalizeRequest="<i>true/false</i>"></span></dd>
1400 <p>The configuration information for Shibboleth targets deployed on Microsoft IIS is stored inside this container element.
1401 This element must contain one or more <a href="#confSite"><span class="fixed">Site</span></a> elements, each of which
1402 maps an INSTANCE ID value to a hostname. If <span class="fixed">normalizeRequest</span> is
1403 <span class="fixed">true</span> (the default), all redirects and computed request URLs generated by Shibboleth will
1404 be created using the hostname assigned to the site instance handling the request. If <span class="fixed">false</span>,
1405 the browser's supplied URL is sometimes used to compute the information. Placed inside the
1406 <a href="#confImplementation"><span class="fixed">Implementation</span></a> element.</p>
1409 <dd class="attribute"><a name="confKey"><span class="fixed"><Key format="<i>type</i>"></span></dd>
1411 <p>Specifies a file containing a private key to be used within a set of credentials. Valid formats are
1412 <span class="fixed">PEM</span> (the default), <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>.
1413 Placed within a <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, it should be paired
1414 with a <a href="#confCertificate"><span class="fixed">Certificate</span></a> element, and contain a
1415 <a href="#confCredPath"><span class="fixed">Path</span></a> element.</p>
1418 <dd class="attribute"><a name="confLibrary"><span class="fixed"><Library <span class="mandatory">path="<i>pathname</i>"</span> fatal="<i>true/false</i>"/></span></dd>
1420 <p>This element defines an extension library for one of Shibboleth's components and is placed within an
1421 <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.</p>
1423 <li class="mandatory"><span class="fixed">path</span>: This designates the complete pathname of the library.</li>
1424 <li><span class="fixed">fatal</span>: If <span class="fixed">true</span> and the library is not located or fails
1425 to load properly, the target will not successfully initialize. The default is false.</li>
1429 <dd class="attribute"><a name="confListener"><span class="fixed"><Listener <span class="mandatory">type="<i>string</i>"</span>></span></dd>
1431 <p>Specifies a pluggable implementation of a mechanism for communication between the web server and SHAR,
1432 specified in the <span class="fixed">type</span> attribute. This element is placed within the
1433 <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the
1434 <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and
1435 <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> elements.</p>
1438 <dd class="attribute"><a name="confMemorySessionCache"><span class="fixed"><MemorySessionCache AAConnectTimeout="<i>seconds</i>" AATimeout="<i>seconds</i>" cacheTimeout="<i>seconds</i>" cleanupInterval="<i>seconds</i>" defaultLifetime="<i>seconds</i>" propagateErrors="<i>true/false</i>" retryInterval="<i>seconds</i>" strictValidity="<i>true/false</i>"/></span></dd>
1440 <p>Shibboleth will cache sessions and received attributes in memory if this element is found in the
1441 <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. This element is mutually exclusive with the
1442 <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> and
1443 <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.</p>
1445 <li><span class="fixed">AAConnectTimeout</span>: Time in seconds the target will wait before timing out on the
1446 initial connection to an origin to request attributes. Defaults to <span class="fixed">15</span>.</li>
1447 <li><span class="fixed">AATimeout</span>: Time in seconds the target will wait before timing out while waiting
1448 for attributes from an origin once the initial connection is established. Defaults to <span class="fixed">30</span>.</li>
1449 <li><span class="fixed">cacheTimeout</span>: Time in seconds to permit a session to stay in the cache before
1450 being purged. Defaults to <span class="fixed">28800</span>.</li>
1451 <li><span class="fixed">cleanupInterval</span>: Seconds between runs of the background thread that purges
1452 expired sessions. Defaults to <span class="fixed">300</span>.</li>
1453 <li><span class="fixed">defaultLifetime</span>: If the attribute assertion doesn't carry an explicit
1454 expiration time, the assertion will expire after this time in <span class="fixed">seconds</span> has elapsed.
1455 Defaults to <span class="fixed">1800</span>.</li>
1456 <li><span class="fixed">propagateErrors</span>: If true, then any errors that occur during the attribute
1457 query stage are fatal and will be presented to the user as an error, terminating their session. If false,
1458 any errors that occur during the query are non-fatal, and the application will be given older, expired
1459 attributes based on the <span class="fixed">strictValidity</span> setting.
1460 <p>This should generally only be left to false (the default) by deployments that are using real principal
1461 names as subjects because attribute retrieval is treated as an optional process.</p></li>
1462 <li><span class="fixed">retryInterval</span>: Time in seconds between attempts to obtain fresh attributes. If a query fails, a timer is set, and once the interval elapses, the next user request causes another query. This prevents pointless repeated attempts to query a failed origin. Defaults to <span class="fixed">300</span>.</li>
1463 <li><span class="fixed">strictValidity</span>: If true, expired attributes will never be made available to the Shibboleth application; if no valid attributes can be obtained, then an empty set is provided. When false, if a fresh set of attributes cannot be retrieved due to failures, any cached, expired attributes are made available. Defaults to <span class="fixed">true</span>.</li>
1467 <dd class="attribute"><a name="confMySQLSessionCache"><span class="fixed"><MySQLSessionCache mysqlTimeout="<i>seconds</i>"/></span></dd>
1469 <p>Shibboleth will back the memory cache of sessions using an embedded MySQL database if this element is found
1470 in the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. Arguments may be passed directly to
1471 MySQL by populating this element with <span class="fixed"><a href="#confArgument">Argument</a></span> elements.
1472 The element may also specify any of the attributes defined for the <a href="#confMemorySessionCache">MemorySessionCache</a>
1473 element. Mutually exclusive with the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a>
1474 and <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.</p>
1476 <li><span class="fixed">mysqlTimeout</span>: Time in seconds to permit a session to stay in the persistent
1477 cache before being purged. Defaults to <span class="fixed">28800</span>.</li>
1481 <dd class="attribute">(RequestMap) <a name="confPath"><span class="fixed"><Path <span class="mandatory">name="<i>pathname</i>"</span> applicationId="<i>id</i>" requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"></span></dd>
1483 <p>This element allows for different application identifiers and session handling to be defined iteratively for
1484 subdirectories or documents within a host. Requests are processed on a best-match basis, with the innermost
1485 element taking precedence. Path elements may be contained by <a href="#confHost"><span class="fixed">Host</span></a>
1486 elements or other <a href="#confPath"><span class="fixed">Path</span></a> elements.</p>
1488 <li class="mandatory"><span class="fixed">name</span>: This is the name of the path component or filename to match
1489 against the request. Only exact matching is supported by the supplied request mapping provider.</li>
1490 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish
1491 an authenticated session with the user before handing off the request to the web server or application.
1492 If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span>
1493 (the default), applications are responsible for ensuring that a session exists if necessary, so-called
1494 <a href="#1.g.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span>
1495 for protected content without a full understanding of the implications.</li>
1496 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute
1497 assertion received from the origin is exported to a CGI request header called
1498 <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an
1499 application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments
1504 <dd class="attribute">(Credential) <a name="confCredPath"><span class="fixed"><Path><i>pathname</i></Path></span></dd>
1506 <p>Placed inside the <a href="#confKey"><span class="fixed">Key</span></a> and
1507 <a href="#confCertificate"><span class="fixed">Certificate</span></a> elements to specify the pathname of the file
1508 containing the credential.</p>
1511 <dd class="attribute"><a name="confRelyingParty"><span class="fixed"><RelyingParty <span class="mandatory">name="<i>string</i>" TLS="<i>string</i>" Signing="<i>string</i>"</span></span>></dd>
1512 <dd class="value"><p>One or more <span class="fixed">RelyingParty</span> elements may be contained by a <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> element to enumerate relying parties for which a distinct set of credentials should be used. The <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attribute values reference the identifiers of credential resolvers defined in <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements.</p>
1514 <li class="mandatory"><span class="fixed">name</span>: Identifies the origin site or group of sites to which the credentials specified in the element apply. This is used to match the providerId sent within attribute assertions from origin sites against a set of "groups" based on metadata.</li>
1518 <dd class="attribute"><a name="confRequestMap"><span class="fixed"><RequestMap <span class="mandatory">applicationId="<i>default</i>"</span> requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"></span></dd>
1520 <p>The <span class="fixed">RequestMap</span> element is a container holding
1521 <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a>
1522 elements. Request URLs processed by Shibboleth are parsed and matched against this set of elements in order to
1523 determine how to process the request. Attributes on the RequestMap, Host, and Path elements specify whether to
1524 require an authenticated session, and how to locate the associated Application element and settings.</p>
1526 <li><span class="fixed">applicationId</span>: Contains a fixed value of "default" to reference the default
1527 <a href="#confApplications"><span class="fixed">Applications</span></a> element.</li>
1528 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish
1529 an authenticated session with the user before handing off the request to the web server or application.
1530 If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span>
1531 (the default), web applications are responsible for ensuring that a session exists if necessary, so-called
1532 <a href="#1.g.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span>
1533 for protected content without a full understanding of the implications.</li>
1534 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute
1535 assertion received from the origin is exported to a CGI request header called
1536 <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an
1537 application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments
1542 <dd class="attribute"><a name="confRequestMapProvider"><span class="fixed"><RequestMapProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"</span> uri="<i>pathname</i>"></span></dd>
1544 <p>This element specifies a request mapper that defines how Shibboleth will handle sessions and other behavior
1545 for a given request. For the built-in type "edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap",
1546 there must be a <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element within this element, or
1547 the <span class="fixed">uri</span> attribute must contain the local pathname of an XML file containing one.</p>
1550 <dd class="attribute"><a name="confRevocationProvider"><span class="fixed"><RevocationProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.provider.XMLRevocation"</span> uri="<i>pathname</i>"></span></dd>
1552 <p>This element, when specified within an <a href="#confApplications"><span class="fixed">Applications</span></a>
1553 or <a href="#confApplication"><span class="fixed">Application</span></a> element, points to revocation information either
1554 inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download
1555 periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.</p>
1556 <p>The default set of revocation providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1557 element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1560 <dd class="attribute"><a name="confSessionCache"><span class="fixed"><SessionCache <span class="mandatory">type="<i>string</i>"</span>></span></dd>
1562 <p>Specifies a pluggable session cache implementation of the specified <span class="fixed">type</span>. This element
1563 is placed within the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with
1564 the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> and
1565 <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> elements.</p>
1566 <p>Any plugin should support the basic attributes defined by the
1567 <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element.</p>
1570 <dd class="attribute"><a name="confSessions"><span class="fixed"><Sessions
1571 <span class="mandatory">wayfURL="<i>URL</i>"
1572 shireURL="<i>URL</i>"</span>
1573 shireSSL="<i>true/false</i>"
1574 lifetime="<i>seconds</i>"
1575 timeout="<i>seconds</i>"
1576 checkAddress="<i>true/false</i>"
1577 cookieName="<i>URL</i>"
1578 cookieProps="<i>URL</i>"></span></dd>
1580 <p>Configuration parameters that affect the way Shibboleth handles sessions for an individual application are bundled
1581 in this element, which must be included in each <a href="#confApplication"><span class="fixed">Application</span></a>
1582 and the default <a href="#confApplications"><span class="fixed">Applications</span></a> element. Note that these
1583 parameters only apply to Shibboleth sessions, and not any sessions applications manage on their own behalf.</p>
1585 <li class="mandatory"><span class="fixed">wayfURL</span>: The URL of the <a href="#1.c.">WAYF service</a>
1586 responsible for redirecting users accessing this application to their identity provider (origin).</li>
1587 <li class="mandatory">
1588 <p><span class="fixed">shireURL</span>: Specifies the SHIRE URL, or assertion consumer service, at which
1589 new sessions are initiated or lazy sessions are triggered. This can be an absolute URL, or a relative path
1590 to be prefixed by the base URL of the virtual host. Using an absolute URL allows a virtual server to funnel
1591 requests to a fixed location, to force use of SSL, for example.</p>
1592 <p>Note that this URL issues the session cookie set on behalf of the application, and this cookie must be
1593 returned in subsequent requests, so the virtual host's domain name and port must be consistent with this
1594 domain name and port for some browsers to properly return the cookie. If default ports are used (and thus
1595 left unspecified), browsers will generally return cookies set via SSL to a non-SSL port. If non-default
1596 ports are used, it is recommended that this be a relative URL so that each virtual host handles its own
1597 cookie operations.</p>
1598 <p>For Shibboleth to function properly in IIS, the file extension at the end of this URL must match the
1599 value configured into IIS and mapped to the ISAPI extension. This causes the request to be serviced properly,
1600 even though no file by that name actually exists.</p>
1602 <li><span class="fixed">shireSSL</span>: If <span class="fixed">true</span> (the default), the application will
1603 <b>only</b> accept new session requests over SSL, as is strongly recommended; see <a href="#2.c.">section 2.c</a>
1604 for more details.</li>
1605 <li><span class="fixed">cookieName</span>: Optionally specifies the name given to in-memory session cookies that
1606 are associated with this application. If omitted, Shibboleth will generate a cookie name for you of the form
1607 _shibsession_<Application ID></li>
1608 <li><span class="fixed">cookieProps</span>: A string of additional Set-Cookie properties can be specified using
1609 this element which give the browser further instructions about cookie processing and use. Always begin with a
1610 semicolon to delineate from the session ID value.</li>
1611 <li><span class="fixed">lifetime</span>: Duration in seconds of the Shibboleth session; this does not affect
1612 the lifetime of application sessions initiated independently of Shibboleth. Defaults to 3600. If 0 is specified,
1613 sessions are infinite, subject to purging by the cache.</li>
1614 <li><span class="fixed">timeout</span>: If the value in seconds elapses following the last request in a
1615 session, the session will be expired for inactivity and a new session must be initiated upon the next request.
1616 Defaults to 1800. If 0 is specified, there is no inactivity timeout</li>
1617 <li><span class="fixed">checkAddress</span>: If <span class="fixed">true</span> (the default), Shibboleth will
1618 check the browser's client address to insure that session cookies are issued and used by a consistent client address.
1619 In most circumstances, this should be enabled to help prevent attacks using stolen cookies, but this can cause
1620 problems for users behind proxies or NAT devices.</li>
1624 <dd class="attribute"><a name="confSHAR"><span class="fixed"><SHAR logger="<i>pathname</i>"></span></dd>
1626 <p>This is the container element for configuration information pertaining to the SHAR, the target component responsible
1627 for most attribute and session processing. Its single attribute, <span class="fixed">logger</span>, points to a
1628 Log4J-format property configuration file that controls SHAR logging behavior. It is placed within the
1629 <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an
1630 <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1631 <p>It must contain either a <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> element to listen
1632 to the server module on a UNIX domain socket or a <a href="#confTCPListener"><span class="fixed">TCPListener</span></a>
1633 element to listen on a TCP port. Session caching must also be specified using a
1634 <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element to use in-memory session
1635 caching or a <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to backup session
1636 information into a MySQL database.</p>
1639 <dd class="attribute"><a name="confShibbolethTargetConfig"><span class="fixed"><ShibbolethTargetConfig clockSkew="integer"></span></dd>
1641 <p>This is the root element for target configuration and must be present once and only once. It must always contain a
1642 <a href="#confSHAR"><span class="fixed">SHAR</span></a> element, a
1643 <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element, an
1644 <a href="#confApplications"><span class="fixed">Applications</span></a> element, one or more
1645 <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements, and optionally an
1646 <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.</p>
1648 <li><span class="fixed">clockSkew</span>: Controls allowed clock skew in seconds between target and origin servers
1649 when evaluating times sent in messages. Defaults to 180, and should be as small as practical.</li>
1653 <dd class="attribute"><a name="confSHIRE"><span class="fixed"><SHIRE logger="<i>pathname</i>"></span></dd>
1655 <p>This is the container element for configuration information pertaining to the SHIRE, the part of the target that
1656 integrates into the web server environment. Its single attribute, <span class="fixed">logger</span>, points to a
1657 Log4J-format property configuration file that controls SHIRE logging behavior. It is placed within the
1658 <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an
1659 <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1660 <p>It may contain an <a href="#confImplementation"><span class="fixed">Implementation</span></a> element, within which
1661 configuration for the SHIRE which varies by platform will be specified.</p>
1662 <p>It may contain a <a href="#confRequestMapProvider"><span class="fixed">RequestMapProvider</span></a> element,
1663 which provides fine-grained control over aspects of target behavior at a host, path, or document level.</p>
1666 <dd class="attribute"><a name="confSite"><span class="fixed"><Site <span class="mandatory">id="<i>INSTANCE_ID</i>" host="<i>fqdn</i>"</span> scheme="<i>http/https</i>" port="<i>integer</i>"></span></dd>
1668 <p>This element is placed in the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element to specify a
1669 mapping from individual instance ID's to the corresponding host, port, and scheme.</p>
1672 <dd class="attribute"><a name="confTCPListener"><span class="fixed"><TCPListener <span class="mandatory">address="<i>pathname</i>" port="<i>integer</i>"</span> acl="<i>ip</i>"></span></dd>
1674 <p>This element is placed within the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually
1675 exclusive with the <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> and
1676 <a href="#confListener"><span class="fixed">Listener</span></a> elements. It allows the SHAR to communicate with the
1677 web server component using TCP.</p>
1679 <li class="mandatory"><span class="fixed">address</span>: Specifies the IP address of the listener.</li>
1680 <li class="mandatory"><span class="fixed">port</span>: Specifies the TCP port on which the SHAR will listen.</li>
1681 <li><span class="fixed">acl</span>: By default, the SHAR will only listen to requests from 127.0.0.1 (localhost).
1682 This should generally not be specified except in test environments.</li>
1686 <dd class="attribute"><a name="confTrustProvider"><span class="fixed"><TrustProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"</span> uri="<i>pathname</i>"></span></dd>
1688 <p>This element, when specified within an <a href="#confApplications"><span class="fixed">Applications</span></a>
1689 or <a href="#confApplication"><span class="fixed">Application</span></a> element, points to trust metadata either
1690 inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download
1691 periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.</p>
1692 <p>The default set of trust providers in the <a href="#confApplications"><span class="fixed">Applications</span></a>
1693 element can be replaced within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p>
1696 <dd class="attribute"><a name="confUnixListener"><span class="fixed"><UnixListener address="<i>pathname</i>"></span></dd>
1698 <p>Use this element to specify a UNIX domain socket located at the <span class="fixed">pathname</span> specified in
1699 the <span class="fixed">address</span> attribute at which the SHAR should listen for requests. This element must be
1700 contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the
1701 <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and
1702 <a href="#confListener"><span class="fixed">Listener</span></a> elements.
1703 <span class="fixed">UnixListener</span> cannot be specified for Windows-based installations.</p>
1707 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1709 <p>Shibboleth supports the dynamic generation of information in error pages
1710 referenced by the <a href="#confErrors"><span class="fixed">Errors</span></a> element
1711 in <span class="fixed">shibboleth.xml</span>. The target implementation
1712 employs a simply template language to insert special tags into the
1713 generated HTML. The parser will read the error template looking for any tag that
1716 <p><span class="fixed"><shibmlp tag-name /></span> </p>
1718 <p>Shibboleth will replace <span class="fixed">tag-name</span> with the
1719 appropriate markup tag either from the table below or by looking for a matching XML attribute
1720 in the <a href="#confErrors"><span class="fixed">Errors</span></a> element:</p>
1722 <dd class="attribute"><span class="fixed">requestURL</span></dd>
1723 <dd class="value">The user's requested URL.</dd>
1724 <dd class="attribute"><span class="fixed">errorType</span></dd>
1725 <dd class="value">The type of error.</dd>
1726 <dd class="attribute"><span class="fixed">errorText</span></dd>
1727 <dd class="value">The actual error message.</dd>
1728 <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1729 <dd class="value">A textual description of the error intended for human
1731 <dd class="attribute"><span class="fixed">originContactName</span></dd>
1732 <dd class="value">The contact name for the origin site provided by that
1733 site's metadata.</dd>
1734 <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1735 <dd class="value">The contact email address for the origin site provided
1736 by that site's metadata.</dd>
1737 <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1738 <dd class="value">The URL of an error handling page for the origin site
1739 provided by that site's metadata.</dd>
1741 <p>To improve the appearance of error messages, a simple, limited form of
1742 conditional checking is supported so that the presence of absence of data
1743 to substitute into a particular tag-name can trigger the inclusion or
1744 exclusion of markup. Conditionals look like:</p>
1746 <p><span class="fixed"><shibmlpif tag-name> arbitrary markup </shibmlpif></span><br>
1747 <span class="fixed"><shibmlpifnot tag-name> arbitrary markup </shibmlpifnot></span></p>
1749 <p>Respectively, these special tags include or skip the markup between the tags if the
1750 specified tag-name has an associated value available to be substituted for it. Note that
1751 you cannot nest these conditionals; a <span class="fixed">shibmlpif</span> tag cannot
1752 appear inside another <span class="fixed">shibmlpif</span> tag, due to the simplicity
1753 of the substitution engine.</p>
1754 <p>Sample error templates for different kinds of errors are included in the
1755 Shibboleth distribution, and can be triggered by anything that will cause
1756 Shibboleth to be unable to accept an incoming session, obtain attributes,
1757 make an authorization decision, etc., including bad configuration settings,
1758 signature verification or certificate validation failures, or a skewed clock
1760 <p><b>You should edit these templates, provide or remove style sheets and
1761 images, and otherwise customize these templates to suit the user experience
1762 you want your users to have when errors occur. The defaults are not likely
1763 to meet the needs of any site.</b></p>
1765 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1767 <p>The only target component that must have a private key and certificate is
1768 the SHAR. While the target server itself should support SSL in most cases
1769 for users, it is mandatory for the SHAR to authenticate when contacting an
1770 AA, and it must therefore be given a key and an SSL client certificate. It
1771 is permissible for the SHAR to use the same keypair and certificate used by
1772 the target web server itself, provided the certificate is signed by a CA
1773 accepted by the origin sites that will be queried for attributes.</p>
1774 <p>On Unix, we require that OpenSSL be installed to use Shibboleth. On
1775 Windows, OpenSSL libraries and the command line tool are included in the
1776 package and can be used directly, if not otherwise available. Certain
1777 commands require the <span class="fixed">openssl.cnf</span> configuration
1778 file, an example of which is included with the Windows installation in
1779 <span class="fixed">C:\opt\shibboleth\etc\shibboleth\openssl.cnf</span>.
1780 To locate this file for a command that requires it, add the
1781 <span class="fixed">-config C:\opt\shibboleth\etc\shibboleth\openssl.cnf</span>
1782 parameter to the command.</p>
1783 <p>The certificate and key file location should be based on whether they
1784 will also be used for Apache. If they will be used as a server key pair
1785 as well, they should probably be in the Apache tree in the usual
1786 <span class="fixed">mod_ssl</span>-defined locations inside the Apache
1787 configuration folder, and the SHAR can read them from there. If the SHAR is
1788 not running as <span class="fixed">root</span>, permissions might need to be
1789 changed to allow this access. If the certificate and key will only be used
1790 for the SHAR, they can be put in the same folder with the
1791 <span class="fixed">shibboleth.xml</span> file and protected appropriately.</p>
1792 <p>Other web servers like IIS do not use the file formats that Apache and
1793 Shibboleth can share, and therefore the components must generally use
1794 separate copies of the key and certificate if they are to be shared. Most
1795 other servers can export and/or import keys to and from PEM or DER format.
1796 Refer to your server's documentation or ask for assistance from others
1798 <p>The SHAR is assigned a key and a certificate using shibboleth.xml's
1799 <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element
1800 described in <a href="#4.a.">section 4.a.</a> Various formats are supported and
1801 OpenSSL can generate and convert among them. OpenSSL commands to generate a new
1802 keypair and a certificate request are shown here, assuming 2048 bit RSA keys are
1805 <p><span class="fixed">$ openssl genrsa -out ssl.key 2048<br>
1806 $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1808 <p>The signed certificate file returned by the CA should be usable directly.</p>
1809 <p>If the key is to be shared with Apache, the web server's child processes,
1810 often running as <span class="fixed">nobody</span> or a similar uid, must be
1811 able to read them while the server is running, which may require permission
1813 <p>This particularly applies when sharing the key and certificate used by
1814 mod_ssl, which are only readable by root by default. The password, if any,
1815 must be placed in the <span class="fixed">shibboleth.xml</span> file, since
1816 the Apache module cannot prompt for it during initial startup as mod_ssl
1817 can. The issues surrounding how to securely obtain a key while running as
1818 <span class="fixed">nobody</span> may be addressed in a later release. Since
1819 the password will be stored in clear text in a frequently examined file, it
1820 is suggested to use a password not used elsewhere, or preferably not to use
1821 a password at all.</p>
1824 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1826 <p>Protection of web pages is primarily achieved through "mapping"
1827 attributes provided by an AA to a localized vocabulary for authorization
1828 rules. This is accomplished using features in the AAP syntax, described in
1829 <a href="#4.e.">section 4.e.</a> This applies to both Apache and IIS.</p>
1830 <p><b><u>IIS</u></b></p>
1831 <p>The IIS filter module supports the mapping of attributes into HTTP headers
1832 via AAP files, but it does not yet support rule-based access control and
1833 therefore cannot protect static content at this time. In addition, all of
1834 the configuration settings, such as control over whether to prompt for new
1835 sessions automatically, are managed via the
1836 <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element,
1837 so there are no additional commands to document at this time.<br>
1839 <p><b><u>Apache</u></b></p>
1840 <p>The Apache module provided can also interpret AAP settings to map
1841 attributes to HTTP request headers and to <span class="fixed">Require</span>
1842 rules, permitting protection of both static and dynamic content. Any of the
1843 typical ways of protecting content may be used (.htaccess, Directory,
1844 Location, Files, etc.). They define what content is to be protected and
1845 static access control rules.</p>
1846 <p>There are two ways to require Shibboleth authentication, but both also require
1847 enabling the module to activate by specifying an <span class="fixed">AuthType</span>
1848 of <span class="fixed">shibboleth</span> and supplying at least one
1849 <span class="fixed">Require</span> rule in <span class="fixed">httpd.conf</span>
1850 or <span class="fixed">.htaccess</span> files. The <span class="fixed">Require</span>
1851 rule can enforce a specific access control policy based on attributes, can specify
1852 <span class="fixed">valid-user</span> to require any authenticated session, or it can
1853 support so-called lazy sessions by using the place-holder rule name of
1854 <span class="fixed">Shibboleth</span>. In such cases, the module is activated, but
1855 in a passive mode that does not automatically force a session, but will process
1856 and validate a session if one exists, leaving the authorization decision to the
1857 application. Using a static access control rule that will fail in the absence of
1858 a session is only sensible if one of the two approaches below that force a session
1860 <p>To require a session, either the Apache command, <span class="fixed">ShibRequireSession On</span>,
1861 or the <span class="fixed">requireSession</span> boolean XML attribute on the
1862 <a href="#confRequestMap><span class="fixed">RequestMap</span></a>,
1863 <a href="#confHost><span class="fixed">Host</span></a>, or
1864 <a href="#confPath><span class="fixed">Path</span></a> elements in
1865 <span class="fixed">shibboleth.xml</span> can be used. Both approaches are equivalent, and
1866 using either one to require a session will supersede a false or absent setting of the other type.</p>
1867 <p>As an example, the following commands will require Shibboleth authentication for a resource:</p>
1869 <span class="fixed">AuthType shibboleth<br>
1870 ShibRequireSession On<br>
1871 Require valid-user</span>
1873 <p>A complete list of Apache directives and their values is below:</p>
1875 <dd class="attribute"><span class="fixed">ShibURLScheme <http/https></span></dd>
1876 <dd class="value">Used in advanced virtual hosting environments which need to generate
1877 SSL redirects from virtual servers that use only HTTP. Supplements the
1878 Apache <span class="fixed">ServerName</span> and <span class="fixed">Port</span>
1879 commands with this missing option. Defaults to a null value in which the scheme
1880 for redirects is based on the physical connection to the server. This is a server-level
1881 command, while the rest of the commands listed are content commands that can appear
1883 <dd class="attribute"><span class="fixed">AuthType <string></span></dd>
1884 <dd class="value">Use <span class="fixed">shibboleth</span> for direct
1885 invocation, or <span class="fixed">Basic</span> plus the
1886 <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1887 <dd class="attribute"><span class="fixed">ShibBasicHijack <on/off></span></dd>
1888 <dd class="value">Controls whether Shibboleth should or should not
1889 ignore requests with <span class="fixed">AuthType Basic</span>. Defaults
1890 to <span class="fixed">off</span>.</dd>
1891 <dd class="attribute"><span class="fixed">ShibRequireSession <on/off></span></dd>
1892 <dd class="value">Controls whether to require an authenticated session before passing
1893 control to the authorization phase or the actual resource. Defaults to
1894 <span class="fixed">off</span>.</dd>
1895 <dd class="attribute"><span class="fixed">ShibExportAssertion <on/off></span></dd>
1896 <dd class="value">Controls whether the SAML attribute assertion provided
1897 by the AA is exported in a base64-encoded HTTP header,
1898 <span class="fixed">HTTP_SHIB_ATTRIBUTES</span>. Defaults to <span class="fixed">off</span>.</dd>
1899 <dd class="attribute"><span class="fixed">ShibRequireAll <on/off></span></dd>
1900 <dd class="value">Controls whether all <span class="fixed">Require</span> rules
1901 specified must be satisfied before access to the resource is granted. Defaults to
1902 <span class="fixed">off</span>, which means any single rule can be satisfied, the
1903 usual Apache behavior.</dd>
1904 <dd class="attribute"><span class="fixed">AuthGroupFile <pathname></span></dd>
1905 <dd class="value">Same as mod_auth; collects values found in REMOTE_USER
1906 into a named group for access control. An attribute must be mapped to
1907 REMOTE_USER for this to work. Note that mod_auth will not support group
1908 files when the Shibboleth module is loaded, since they share the same command.
1909 <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is
1910 implemented</a> by placing a <span class="fixed">.htaccess</span> file
1911 that references a group file stored at <span class="fixed">/pathname</span>:</p>
1913 <p><span class="fixed">AuthGroupFile /pathname<br>
1914 require group workgroup</span></p>
1917 <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1918 AuthGroupFile</a> used by Shibboleth might resemble:<br>
1919 <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1921 <dd class="attribute"><span class="fixed">Require <string></span></dd>
1922 <dd class="value">Enforce authorization using one of the following methods.
1924 <li><span class="fixed">valid-user</span><blockquote>
1925 <p>Any Shibboleth user from a trusted origin site is accepted,
1926 even if no actual attributes are received. This is a very
1927 minimal kind of policy, but is useful for testing or for
1928 deferring real policy to an application.</p>
1931 <p><span class="fixed">user</span></p>
1933 <p>A space-delimited list of values, such as from the
1934 <span class="fixed">urn:mace:dir:attribute-def:eduPersonPrincipalName</span>
1935 attribute. Actually, any attribute can be mapped to REMOTE_USER,
1936 even if this doesn't always make sense.</p>
1939 <li><span class="fixed">group</span><blockquote>
1940 <p>A space-delimited list of group names defined within
1941 <span class="fixed">AuthGroupFile</span> files, again provided
1942 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1945 <li><span class="fixed"><i>alias</i></span><blockquote>
1946 <p>An arbitrary rule name that matches an Alias defined in an
1947 AAP file. The rule value is a space-delimited list of attribute
1948 values, whose format depends on the attribute in question (e.g.
1949 an affiliation rule might look like:</p>
1950 <p><span class="fixed">require affiliation staff@osu.edu faculty@mit.edu</span></p>
1953 <li><span class="fixed">shibboleth</span><blockquote>
1954 <p>If a session cookie of the expected name exists, the corresponding
1955 session will be validated and any cached attributes exported as otherwise
1956 specified. Authorization will be controlled by the resource, unless
1957 additional rules are specified. If however a session does not already
1958 exist, or if the current session expires or times out, no session will
1959 be requested and control will pass to the resource.</p>
1963 <p>Additionally, for <span class="fixed">user</span> and
1964 <span class="fixed"><alias></span>-based rules, if a tilde character is
1965 placed immediately following <span class="fixed">user</span> or
1966 <span class="fixed"><alias></span>, the expressions that follow are
1967 treated as regular expressions. The syntax supported is generally based
1968 on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1969 XML Schema</a>. This specification borders on unreadable, but the syntax
1970 is generally Perl-like. Expressions should generally be "anchored" with
1971 the ^ and $ symbols to insure mid-string matches don't cause false
1973 <p>For example, the rule:<br>
1974 <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1975 </span>would evaluate to allowing anyone with an <span class="fixed">
1976 affiliation</span> of <span class="fixed">member</span> from a .edu
1980 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1982 <p>Shibboleth allows a user and a site to release a varying set of
1983 attributes to a destination site, and does not impose restrictions on the
1984 kinds of attribute information provided by an AA. Target implementations
1985 must be prepared to examine the attributes they receive and filter them
1986 based on policies about what information to permit an origin site to assert
1987 about its users.</p>
1988 <p>Attribute acceptance is the process of defining acceptable attributes and
1989 filtering attribute values before passing them on to a resource manager,
1990 such as the Shibboleth module or a web application. Data blocked by
1991 AAP filters will not be passed to the CGI environment or used when enforcing
1992 <span class="fixed">.htaccess</span> rules in Apache. Note that the attribute
1993 assertion exported to the <span class="fixed">HTTP_SHIB_ATTRIBUTES</span> header
1994 is now also filtered. This is a change from previous versions. To compensate,
1995 either no AAP can be specified, or a rule can be applied to permit all
1996 attributes to pass through while also exporting specific attributes.</p>
1997 <p>The Shibboleth implementation supports Scoped and Simple attributes and
1998 filtering policies for different kinds of attributes, and is potentially
1999 extensible to more complex attributes in the future. An attribute is
2000 considered Scoped if the XML representation of its values contains a "Scope"
2001 attribute. As of 1.1+, this is detected at runtime and requires no
2002 configuration in advance.</p>
2003 <p><b>An essential part of the Shibboleth trust fabric is ensuring that
2004 sites only assert attributes for domains for which they are considered
2005 authoritative by the target. Typically, this means that Brown University
2006 will be trusted to assert attributes only scoped to <span class="fixed">
2007 brown.edu</span>. Unless there are very specific circumstances requiring
2008 this restriction be removed, it is strongly encouraged that such policies be
2009 left in place.</b></p>
2012 <p>Scoped attributes are a special kind of attribute whose values are a
2013 combination of a <span class="fixed">value</span> and a
2014 <span class="fixed">scope</span>, or <span class="fixed">context</span>
2015 for the value. An example is <span class="fixed">
2016 eduPersonScopedAffiliation</span>, which adds a scope to the defined set
2017 of <span class="fixed">eduPersonAffiliation</span> values, such as
2018 <span class="fixed">student</span>, <span class="fixed">member</span>,
2019 or <span class="fixed">faculty</span>. Scopes are expressed as DNS
2020 domains and subdomains as a convention.</p>
2021 <p>Any <span class="fixed">scoped</span> attribute can be scoped only to
2022 the origin site's permitted domains. These domains are listed in the
2023 operational metadata that provides policy information to the system and
2024 can be overridden or supplemented using the AAP. Domains can be explicit
2025 or regular expressions, and can be changed by a target to meet its needs.
2026 Thus, attribute acceptance processing for <span class="fixed">scoped</span>
2027 attributes is based on site metadata and target-specified overrides in
2028 addition to the mechanism described below for <span class="fixed">simple</span>
2030 <p>Scope rules specified in an AAP are additive with any domains
2031 permitted by site metadata, and the rules are applied by first looking
2032 for an applicable denial rule, and then looking at site metadata and any
2033 applicable site rules for an accept rule.</p>
2037 <p>Simple attributes are attributes whose value is expressed in XML as a
2038 Text node; that is, the value is just a string. Multiple values are
2039 permitted. <span class="fixed">eduPersonEntitlement</span>, in which the
2040 values are URIs, is one example of a simple attribute.</p>
2041 <p>Both Simple and Scoped attribute acceptance is controlled with an
2042 external (or in 1.2, optionally inline) policy file written in XML.
2043 The schema for the file is described by the <span class="fixed">shibboleth.xsd</span>
2044 schema, and an example file is included, <span class="fixed">AAP.xml</span>.
2045 It is now optional to supply such a policy, but in the absence of one, no
2046 attributes will be exported into request headers, and the option to export
2047 the assertion as a whole must be used instead.</p>
2048 <p>The policy is a default-deny algorithm that requires permissible
2049 attributes and values be listed explicitly. That is, an empty (as opposed to no)
2050 policy permits nothing. Each attribute to be supported must be listed in the
2051 policy by name in an <span class="fixed"><AttributeRule></span>. Each such
2052 rule is a collection of <span class="fixed"><SiteRule></span> elements
2053 along with an optional <span class="fixed"><AnySite></span> default
2054 rule. In turn each site rule is a set of <span class="fixed"><Value></span>
2055 rules that specify matches to permit, either literal or regular
2056 expressions, or a wildcarded <span class="fixed"><AnyValue></span>
2057 default rule, which is equivalent to a single regular expression rule
2058 allowing anything.</p>
2059 <p>With 1.2, a new <span class="fixed"><AnyAttribute></span> element
2060 can be used before or in place of the <span class="fixed"><AttributeRule></span>
2061 elements to allow all attributes and values to pass muster. The purpose of this
2062 is to then supply rules to specify the export of particular attributes, without
2063 using those rules to control acceptance.</p>
2065 <p>A syntax summary follows:</p>
2067 <p><span class="fixed"><AttributeAcceptancePolicy></span></p>
2069 <p>The top level element in the file.</p>
2071 <p><span class="fixed"><AnyAttribute></span></p>
2073 <p>Disables acceptance filtering and leaves the assertion intact.</p>
2075 <p><span class="fixed"><AttributeRule><br>
2076 Name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"<br>
2077 Header="Shib-EP-Affiliation" Alias="affiliation"></span></p>
2079 <p>Specifies a rule for an attribute, named by its URI. The
2080 following XML attributes can be supplied:</p>
2081 <table border="1" cellpadding="5" cellspacing="5">
2083 <td><span class="fixed">Name</span></td>
2084 <td>The name of the Shibboleth attribute, usually a URI.
2085 This is the only required XML attribute.</td>
2088 <td><span class="fixed">Namespace</span></td>
2089 <td>If the attribute's name includes a SAML namespace,
2090 supply it here. Normally this is unused.</td>
2093 <td><span class="fixed">Header</span></td>
2094 <td>The HTTP request header to map the attribute's values
2098 <td><span class="fixed">Alias</span></td>
2099 <td>A short name for the attribute, determines the name of
2100 the Apache <span class="fixed">Require</span> rule.</td>
2104 <p><span class="fixed"><AnySite></span></p>
2106 <p>Specifies a rule that always applies to the attribute, regardless
2107 of the asserting origin site.</p>
2109 <p><span class="fixed"><SiteRule Name="providerId"></span></p>
2111 <p>A rule that applies to the origin site corresponding to the supplied
2114 <p><span class="fixed"><Scope Accept="true|false" Type="type"></span></p>
2116 <p>Specifies a value to accept or deny, either directly using
2117 <span class="fixed">type</span> <span class="fixed">literal</span>,
2118 or using a set of matching expressions as <span class="fixed">type</span>
2119 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
2120 is the default if <span class="fixed">Type</span> is not specified.
2121 Accept defaults to "true">.</p>
2123 <p><span class="fixed"><AnyValue></span></p>
2125 <p>Specifies a rule that always applies to the attribute and site,
2126 regardless of the value(s).</p>
2128 <p><span class="fixed"><Value Type="type"></span></p>
2130 <p>Specifies a value to permit, either directly using
2131 <span class="fixed">type</span> <span class="fixed">literal</span>,
2132 or using a set of matching expressions as <span class="fixed">type</span>
2133 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
2134 is the default if <span class="fixed">Type</span> is not specified.</p>
2137 <p>The regular expression syntax is a subset of the usual Perl and Unix
2138 syntaxes that is described in the XML Schema specification by the W3C. Most
2139 typical expressions should work. Be sure to anchor them using
2140 <span class="fixed">^</span> and <span class="fixed">$</span> to avoid
2141 unintentional matches midstring.</p>
2143 <h4><a name="4.f."></a>4.f. Using Attributes and Session Data in Applications</h4>
2145 <p>Apart from the simple RM functionality provided, attribute information
2146 may be made available directly to applications via the standard practice of
2147 creating custom HTTP request headers before passing control to the
2148 resource. Web applications should make no assumption about the presence of
2149 specific attributes for their use unless they have intimate knowledge of the
2150 attribute release policies in place.</p>
2151 <p>The AAP rules control this interface, and map Shibboleth attributes
2152 to header names, such as <span class="fixed">Shib-EP-Affiliation</span>.
2153 Using that example, any values of the mapped attribute will be placed in
2154 that header, delimited by semicolons. An application that uses a CGI-like
2155 syntax to access the header will find the values in the <span class="fixed">
2156 HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any
2157 header, to drive legacy applications that expect information in a particular
2159 <p>The <span class="fixed">REMOTE_USER</span> variable is a special case
2160 that is generally populated automatically by the web server based on an
2161 internal piece of data that represents the current <span class="fixed">
2162 username</span>. Unlike many authentication modules, Shibboleth does not
2163 guarantee that <span class="fixed">REMOTE_USER</span> will have any value,
2164 because users may remain anonymous in many cases. If it does have a value,
2165 it is set solely because of an AAP file that maps an attribute to that
2166 header name. For many purposes, the <span class="fixed">
2167 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be
2168 mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be
2169 provided by the AA, and <span class="fixed">REMOTE_USER</span> might still
2171 <p>In addition to general attribute information, the following special
2172 HTTP headers are created for any authenticated request:</p>
2174 <dd class="attribute"><span class="fixed">HTTP_SHIB_ORIGIN_SITE</span></dd>
2175 <dd class="value">Contains the unique identifier (providerId) of the
2176 origin site of the user. Some applications may use this to lookup
2177 additional policy or application data. It normally takes the form of a
2178 URI but could be any string in some deployments.</dd>
2179 <dd class="attribute"><span class="fixed">HTTP_SHIB-AUTHENTICATION-METHOD</span></dd>
2180 <dd class="value">Contains the SAML AuthenticationMethod URI that
2181 documents some aspect of the user's authentication to the origin site's
2182 web authentication service.</dd>
2183 <dd class="attribute"><span class="fixed">HTTP_SHIB_APPLICATION_ID</span></dd>
2184 <dd class="value">Contains the XML <span class="fixed">applicationId</span>
2185 attribute in <span class="fixed">shibboleth.xml</span> that corresponds to
2186 the request based on the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a>
2187 and associated elements.</dd>
2188 <dd class="attribute"><span class="fixed">HTTP_SHIB_ATTRIBUTES</span></dd>
2189 <dd class="value">Contains the assertion in XML containing the
2190 SAML attribute information from the AA in base64-encoded format.
2191 This is a raw interface that provides an application with the entire
2192 assertion in, but is still a filtered view based on any attribute acceptance
2195 <p>Finally, special support exists to obtain the value of the SAML
2196 <span class="fixed"><NameIdentifier></span> element, which identifies the
2197 subject of the session, the user. Many Shibboleth deployments use opaque handles
2198 that have no application value, however newer deployments may choose to support
2199 alternative identifiers, including formats defined by SAML. Targets can use
2200 these origins and obtain the primary subject name by using a special AAP
2201 <span class="fixed"><AttributeRule></span> with a
2202 <span class="fixed">Name</span> corresponding to the SAML
2203 <span class="fixed">Format</span> identifier that describes the kind of
2204 identifier used to represent the subject. The rule specifies in what header
2205 to export the identifier value (such as <span class="fixed">REMOTE_USER</span>),
2206 while the <span class="fixed">Format</span> identifier will be placed in the
2207 <span class="fixed">HTTP_SHIB_NAMEIDENTIFIER_FORMAT</span> header.
2210 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
2212 <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span>
2213 in the <span class="fixed">/opt/shibboleth/bin</span> folder of the
2214 distribution to maintain metadata files referenced by <span class="fixed">
2215 shibboleth.xml</span>. It will return 0 only on success and a negative number on
2216 failure and log errors to <span class="fixed">stderr</span>. If the data in
2217 the new metadata file is unusable or schema invalid, or the signature is invalid,
2218 the existing copy is kept and not overwritten. The SHAR and SHIRE stat all
2219 metadata files each time the data is used, allowing them to detect and utilize
2220 updates in real-time during system operation.</p>
2221 <p><span class="fixed">siterefresh</span> takes the following command-line
2224 <dd class="attribute"><span class="fixed">--url <URL></span></dd>
2225 <dd class="value">Specifies the <span class="fixed">URL</span> of the
2226 remote metadata file with which to update the local file. HTTPS is not
2227 supported at this time.</dd>
2228 <dd class="attribute"><span class="fixed">--out <pathname></span></dd>
2229 <dd class="value">Specifies the local file to which to write the new
2231 <dd class="attributeopt"><span class="fixed">--noverify</span></dd>
2232 <dd class="value">Explicitly disables the requirement for the file to be signed
2233 and allows the certificate parameter to be ommitted. If the file is signed,
2234 the signature will be verified using whatever key is supplied inside it,
2235 and an invalid signature will still result in an error, but if the file is
2236 unsigned or has a valid signature, only a warning will be logged, and the
2237 result will be success.</dd>
2238 <dd class="attributeopt"><span class="fixed">--cert <pathname></span></dd>
2239 <dd class="value">Specifies the location of a certificate stored in
2240 <span class="fixed">PEM</span> format used to validate the signature of
2241 the metadata file. Since much of Shibboleth's security flows from
2242 metadata files, this option is highly recommended, and the certificate
2243 used should be verified independently in some out of band fashion.</dd>
2244 <dd class="attributeopt"><span class="fixed">--schema <pathname></span></dd>
2245 <dd class="value">Optionally defines a base path for schemas to use
2246 when validating the file. Defaults to a location based on the installation
2247 path on Unix, or <span class="fixed">\opt\shibboleth\etc\shibboleth</span>
2249 <dd class="attributeopt"><span class="fixed">--rootns <XML namespace></span></dd>
2250 <dd class="value">Optionally defines the XML namespace of the root element
2251 expected in the new file. Normally unused, provided to support alternative
2252 metadata formats that may be backported to older releases.</dd>
2253 <dd class="attributeopt"><span class="fixed">--rootname <XML element name></span></dd>
2254 <dd class="value">Optionally defines the name of the root element
2255 expected in the new file. Normally unused, provided to support alternative
2256 metadata formats that may be backported to older releases.</dd>
2258 <p>If a zero is returned, the command will copy the retrieved file to the output
2259 location. Otherwise one of the following error values will be returned:</p>
2260 <table align="center" cellspacing="5">
2261 <tr><td>-100</td><td>an invalid combination of parameters was specified</td></tr>
2262 <tr><td>-10</td><td>the OpenSAML library failed to initialize</td></tr>
2263 <tr><td>-1</td><td>the file's XML digital signature was invalid</td></tr>
2264 <tr><td>-2</td><td>a SAML exception was trapped</td></tr>
2265 <tr><td>-3</td><td>an XML library exception was trapped</td></tr>
2266 <tr><td>-4</td><td>a general XML security library exception was trapped</td></tr>
2267 <tr><td>-5</td><td>an XML security library crypto exception was trapped</td></tr>
2268 <tr><td>-6</td><td>an unknown exception was trapped</td></tr>
2270 <p>A complete command issued to <span class="fixed">siterefresh</span> might
2273 <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out IQ-sites.xml --cert internet2.pem \<br>
2274 --url http://wayf.internet2.edu/InQueue/IQ-sites.xml </span></p>
2276 <p>It is recommended that such commands be added to a <span class="fixed">
2277 crontab</span> to keep the site and trust files refreshed. AAP files tend to
2278 be site-specific, but could be maintained and distributed centrally. If the
2279 command is invoked in a script that writes the file to a new location and
2280 compares it with the old contents before overwriting the original, the
2281 command could be run very often without impacting target operations,
2282 providing a high degree of currency in case sites become compromised.</p>
2284 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
2286 <p>Shibboleth includes a useful plugin that extends the default memory cache
2287 for storing session data in the SHAR with a backing cache using an embedded
2288 MySQL database. It is now disabled by default. The plugin can be found in the
2289 <span class="fixed">/opt/shibboleth/libexec</span> folder, and is loaded as an
2290 extension library using the <a href="#confExtensions"><span class="fixed">Extensions</span></a>
2291 element of <span class="fixed">shibboleth.xml</span>. The extension and the
2292 <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a>
2293 element are commented out by default.</p>
2294 <p>Important <a href="#confArgument"><span class="fixed">Argument</span></a>
2295 elements you'll find by default include:</p>
2296 <blockquote class="fixed">
2297 <p>--language=/opt/shibboleth/share/english<br>
2298 --datadir=/opt/shibboleth/data</p>
2300 <p>which set the message file path and the location of the cache's
2301 database files respectively. Make sure the data directory exists before
2302 starting the SHAR if you change this path.
2308 <h3><a name="5."></a>5. Troubleshooting</h3>
2309 <p>This section provides basic information about testing Shibboleth targets.
2310 This information is not intended to be comprehensive, but instead rudimentary
2311 guidelines for basic configuration tests and problems. For more detailed
2312 information or answers to specific problems not addressed in this section,
2313 please mail <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
2314 with a thorough description of errors and configurations used.</p>
2315 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
2317 <p>The target may be tested by generating a folder with very basic access
2318 controls on it, and accessing it using a web browser. Place a simple webpage
2319 such as <span class="fixed">index.html</span> in <span class="fixed">
2320 /secure/</span>. Then, add the following lines to <span class="fixed">
2321 httpd.conf</span>, which should be removed when testing is over:</p>
2323 <p><span class="fixed"># Configure a test directory<br>
2324 <Location /secure><br>
2325 AuthType shibboleth<br>
2326 ShibRequireSession On<br>
2327 require valid-user<br>
2328 </Location><br>
2331 <p><b>For information regarding specific error messages that may be
2332 generated if the target does not work successfully, please refer to section
2333 <a href="#5.b.">5.b.</a>, or write
2334 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>.</b></p>
2336 <h4><a name="5.b."></a>5.b. Common Problems</h4>
2338 <p>A knowledge base is being developed in the
2339 <a href="https://umdrive.memphis.edu/wassa/public/shib.faq/shibboleth-faq.html">
2340 Shibboleth Deployer's FAQ</a>. Please mail
2341 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
2342 with any additional questions or problems encountered that are not answered
2343 by this basic guide.</p>