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');
85 background-color: #EEEEEE;
86 background-image: url('none');
88 padding-bottom: 0.5em;
91 border-bottom-width: none;
92 border-top-width: none;
93 border-left-width: 1px;
94 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
99 background-color: #FFCCFF;
103 background-color: #EEEEEE;
108 font-family: monospace;
120 <body link="red" vlink="red" alink="black" bgcolor="white">
123 <h2>Shibboleth Target Deployment Guide</h2>
125 <p>Shibboleth Target Deployment Guide<br>
126 Shibboleth Version 1.2<br />
128 <h3>This version of the deploy guide is for Shibboleth v1.2. For documentation
129 related to prior versions of Shibboleth, please consult the appropriate branch
130 in the Shibboleth CVS.</h3>
131 <h3>The default configuration of Shibboleth is <b>not</b> secure and should not be
132 used for protection of production content. The example private key bundled with the
133 distribution is publically available, widely circulated, and well-known; also, the
134 default federation and trust metadata is for testing purposes only. For information
135 about securing a Shibboleth deployment, please refer to the production guide.
136 Shibboleth should only be used to protect sensitive content when deployed carefully
137 in conjunction with proper trust settings and policies.</h3>
139 <p>The Shibboleth target implementation has been substantially redesigned for this release. Most of the
140 configuration process has changed to accomodate more complex deployments but many of the defaults work
141 fine for testing and simpler applications. Among the new features:</p>
143 <li>New XML-based configuration system supporting runtime adjustment of many settings and better
144 integration with supplemental configuration files</li>
145 <li>Ability to partition deployment into "Applications" at the vhost, path, or document level</li>
146 <li>"Lazy" sessions allow applications to redirect browser to initiate a session, allows
147 content to decide it needs authentication or attributes at runtime</li>
148 <li>Flexible support for multilateral and bilateral trust arrangements</li>
149 <li>Support for more types of key and certificate formats</li>
150 <li>Improved pluggability for many aspects of system, including access control modules</li>
153 <p>Before starting, please sign up for all applicable
154 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing
155 lists</a>. Announcements pertinent to Shibboleth deployments and developments
156 and resources for deployment assistance can be found here.</p>
157 <p>Please send any questions, concerns, or eventual confusion to
158 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>.
159 This should include, but not be limited to, questions about the documentation,
160 undocumented problems, installation or operational issues, and anything else
168 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
171 <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
173 <li><a href="#1.a."><font color="black">Origin</font></a></li>
174 <li><a href="#1.b."><font color="black">Target</font></a></li>
175 <li><a href="#1.c."><font color="black">WAYF</font></a></li>
176 <li><a href="#1.d."><font color="black">Federations</font></a></li>
177 <li><a href="#1.e."><font color="black">Relying Parties</font></a></li>
178 <li><a href="#1.f."><font color="black">Applications</font></a></li>
179 <li><a href="#1.g."><font color="black">Sessions</font></a></li>
183 <h4><a href="#2."><font color="black">Planning</font></a></h4>
185 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
186 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
187 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
188 <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
189 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
190 <li><a href="#2.f."><font color="#000000">Attribute Acceptance Policies</font></a></li>
191 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
192 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
193 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
197 <h4><a href="#3."><font color="black">Installation</font></a></h4>
199 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
200 <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
201 <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
202 <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
203 <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
207 <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
209 <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
210 shibboleth.xml</span></font></a></li>
211 <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
212 <li><a href="#4.c."><font color="black">Key Generation and Certificate
213 Installation</font></a></li>
214 <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
215 <li><a href="#4.e."><font color="black">Defining Attributes and
216 Acceptance Policies</font></a></li>
217 <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
218 <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
219 <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
223 <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
225 <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
226 <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
235 <h3><a name="1."></a>1. Shibboleth Overview</h3>
236 <p>Shibboleth is a system designed to exchange attributes across realms for the
237 primary purpose of authorization. It provides a secure framework for one
238 organization to transmit attributes about a web-browsing individual across
239 security domains to another institution. In the primary usage case, when a user
240 attempts to access a resource at a remote domain, the user's own home security
241 domain can send certain information about that user to the target site in a
242 trusted exchange. These attributes can then be used by the resource to help
243 determine whether to grant the user access to the resource. The user may have
244 the ability to decide whether to release specific attributes to certain sites by
245 specifying personal Attribute Release Policies (ARP's), effectively preserving
246 privacy while still granting access based on trusted information.</p>
247 <p>When a user first tries to access a resource protected by Shibboleth, they
248 are redirected to a service which asks the user to specify the organization from
249 which they want to authenticate. If the user has not yet locally authenticated
250 to a WebISO service, the user will then be redirected to their home
251 institution's authentication system. After the user authenticates, the
252 Shibboleth components at the local institution will generate a temporary
253 reference to the user, known as a handle, for the individual and send this to
254 the target site. The target site can then use the handle to ask for attributes
255 about this individual. Based on these attributes, the target can decide whether
256 or not to grant access to the resource. The user may then be allowed to access
257 the requested materials.</p>
258 <p>There are several controls on privacy in Shibboleth, and mechanisms are
259 provided to allow users to determine exactly which information about them is
260 released. A user's actual identity isn't necessary for many access control
261 decisions, so privacy often is needlessly compromised. Instead, the resource
262 often utilizes other attributes such as faculty member or member of a certain
263 class. While these are commonly determined using the identity of the user,
264 Shibboleth provides a way to mutually refer to the same principal without
265 revealing that principal's identity. Because the user is initially known to the
266 target site only by a randomly generated temporary handle, if sufficient, the
267 target site might know no more about the user than that the user is a member of
268 the origin organization. This handle should never be used to decide whether or
269 not to grant access, and is intended only as a temporary reference for
270 requesting attributes.</p>
271 <h4><a name="1.a."></a>1.a. Origin</h4>
273 <p>There are four primary components to the origin side in Shibboleth: the
274 Attribute Authority (AA), the Handle Service (HS), the directory service,
275 and the local sign-on system (SSO). The AA and HS are provided with
276 Shibboleth, and an open-source WebISO solution Pubcookie is also supplied;
277 the directory is provided by the origin site. Shibboleth is able to
278 interface with a directory exporting an LDAP interface or a SQL database
279 containing user attributes, and is designed such that programming interfaces
280 to other repositories should be readily implemented. Shibboleth relies on
281 standard web server mechanisms to trigger local authentication. A .htaccess
282 file can be easily used to trigger either the local WebISO system or the web
283 server's own Basic Auth mechanism, which will likely utilize an enterprise
284 authentication system, such as Kerberos.</p>
285 <p>From the origin site's point of view, the first contact will be the
286 redirection of a user to the handle service, which will then consult the SSO
287 system to determine whether the user has already been authenticated. If not,
288 then the browser user will be asked to authenticate, and then sent back to
289 the target URL with a handle bundled in an attribute assertion. Next, a
290 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
291 which will include the previously mentioned handle. The AA then consults the
292 ARP's for the directory entry corresponding to the handle, queries the
293 directory for these attributes, and releases to the SHAR all attributes the
294 SHAR is entitled to know about that user.</p>
296 <h4><a name="1.b."></a>1.b. Target</h4>
298 <p>There are three primary components to the target side in Shibboleth: the
299 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
300 Requester (SHAR), and the resource manager (RM). An implementation of each
301 of these is included in the standard Shibboleth distribution. These
302 components are intended to run on the same web server.</p>
303 <p>From the target's point of view, a browser will hit the RM with a request
304 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
305 in, which will use the WAYF to acquire the name of a handle service to ask
306 about the user. The handle service (HS) will then reply with a SAML
307 authentication assertion containing a handle, which the SHIRE then hands off
308 to the SHAR. The SHAR uses the handle and the supplied address of the
309 corresponding attribute authority (AA) to request all attributes it is
310 allowed to know about the handle. The SHAR performs some basic validation
311 and analysis based on attribute acceptance policies (AAP's). These
312 attributes are then handed off to the RM, which is responsible for using
313 these attributes to decide whether to grant access.</p>
315 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
317 <p>The WAYF service can be either outsourced and operated by a federation or
318 deployed as part of the SHIRE. It is responsible for allowing a user to
319 associate themself with an institution of their specification, then
320 redirecting the user to the known address for the handle service of that
323 <h4><a name="1.d."></a>1.d. Federations</h4>
325 <p>A federation is one way to provide part of the underlying trust required
326 for function of the Shibboleth architecture. A federation in the context of
327 Shibboleth is a group of organizations(universities, corporations, content
328 providers, etc.) who agree to exchange attributes using the SAML/Shibboleth
329 protocols and abide by a common set of policies and practices. In so doing,
330 they must implicitly or explicitly agree to a common set of guidelines.
331 Joining a federation is not explicitly necessary for operation of
332 Shibboleth, but it dramatically expands the number of targets and origins
333 that can interact without defining bilateral agreements between all these
335 <p>A federation can be created in a variety of formats and trust models, but
336 to support Shibboleth, it must provide a certain set of services to
337 federation members. It needs to supply a registry to process applications to
338 the federation and distribute membership information to the origin and
339 target sites. This must include distribution of the PKI components necessary
340 for trust between origins and targets. There also needs to be a set of
341 agreements and best practices defined by the federation governing the
342 exchange, use, and population of attributes before and after transit, and
343 there should be a way to find information on local authentication and
344 authorization practices for federation members.</p>
346 <h4><a name="1.e."></a>1.e. Relying Parties</h4>
348 <p>Some aspects of both origin and target configuration can vary and be
349 expressed in terms of the "relying party". To an origin, a target
350 is a relying party, while targets consider origins to be relying
351 parties (it's a matter of perspective). Certificates, policies, and
352 other aspects of an interaction are specified on the basis of the relying
353 party, and may or may not vary between relying parties depending on the
354 deployment's needs.</p>
355 <p>Each origin and target is assigned a URI, a unique identifier to enable
356 control over configuration down to the level of an individual partner (a single
357 relying party). By convention, this is termed a "providerId". More
358 frequently, an entire federation will be viewed by an origin or target as a
359 single relying party to simplify management. An individual origin or target
360 with which this deployment exchanges information may sometimes be part of
361 multiple relying parties if there are multiple trust agreements
362 under which these transactions are performed. Care should be taken to avoid
363 conflicting or inconsistent configuration in such cases.</p>
365 <h4><a name="1.f."></a>1.f. Applications</h4>
367 <p>Shibboleth "applications" are the primary unit of target
368 configuration. Applications as viewed by the target implementation
369 are not necessarily defined by the same metrics as in other contexts. An
370 individual application represents a set of web resources that operates
371 using the same attribute handling and trust configuration and shares a common
372 <a href="#1.g.">session</a> with the browser user. As a user navigates between
373 resources on a server that cross an application boundary, a new session is
374 established, though user interaction may not be required. As a consequence of
375 the relationship between applications and sessions (which are tracked with
376 a cookie), an application usually does not span more than one virtual host.
377 Apart from cookie-based constraints, web resources can be aggregated into
378 applications in arbitrary ways.</p>
379 <p>A single target deployment may support a large number of applications,
380 but it need not register or publish information about each one with the
381 origins it accepts information from. Instead it can communicate using a
382 more limited set of distinct "providerId" values (often just a
383 single one). This allows targets with a complex internal configuration
384 to be treated as a single entity by origins for the purposes of attribute
387 <h4><a name="1.g."></a>1.g. Sessions</h4>
389 <p>Much of the target implementation is concerned with establishing, and
390 subsequently maintaining, sessions with the browser user on behalf of the
391 <a href="#1.f.">applications</a> at the target. A session consists of a
392 cookie passed between the browser and web server, associated with a
393 security context. The context contains the user's authentication information,
394 and generally a set of attributes that make up the user's identity. Each
395 application maintains distinct sessions with the browser by means of separate
396 cookies. It is important to note that all such sessions are independent and
397 distinct: any session can exist with or without any other session, and the
398 expiration of any one session does not imply the expiration of any other
399 session. Shibboleth also does not support any logout functionality beyond the
400 termination of individual application sessions by deletion of respective
401 cookies; also, there is no way for the target to cause origin-side sessions,
402 such as a user's SSO login, to expire.</p>
403 <p>A browser user accessing a Shibboleth-protected resource may have two
404 outcomes: standard session establishment, and lazy session
405 establishment. The standard session establishment mechanism in which
406 Shibboleth protects the resource in all circumstances results in the
407 establishment of a cookie-based browser session and a set of attributes
408 cached for that application. Shibboleth 1.2 also supports so-called lazy
409 session establishment, in which the resource may be accessed without prior
410 authentication. This means the application must be intelligent enough to
411 determine whether authentication is necessary, and then construct the proper URL
412 to initiate a browser redirect to request authentication; if the
413 application determines none is necessary or uses other authorization
414 mechanisms, then the request for authentication may not need to be triggered.
415 This complex functionality is mostly useful to protect a single URL with
416 different access mechanisms, or to require authenticated access only in
417 instances where the application deems it necessary.</p>
418 <p>Independently of this, a web-based application protected by Shibboleth
419 may have a need to establish its own session with the user. This session
420 may persist well beyond the Shibboleth session, and logouts from this
421 session, if supported, will not terminate a Shibboleth session initiated to
422 access the resource. Application administrators should carefully evaluate
423 the expiration of all sessions to limit vulnerability to attacks or user
424 negligence. Logging out of the entire desktop session is usually the
425 only (relatively) foolproof logout mechanism on the web.</p>
428 <h3><a name="2."></a>2. Planning</h3>
429 <p>There are several essential elements that must be present in the environment
430 to ensure Shibboleth functions well, both political and technical. Shibboleth
431 currently runs on a specific range of platforms and web server environments. The
432 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations
433 and requirements for a successful implementation of a Shibboleth target.</p>
434 <h4><a name="2.a."></a>2.a. Requirements</h4>
436 <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and
437 Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a
438 separate SHAR process. The plugins use the Sun/ONC RPC mechanism to communicate
439 with the SHAR over Unix domain or TCP sockets. The target's web servers must
440 be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a>
441 1.3+, 2.0+, or Microsoft IIS 4.0+ More precise technical
442 details are discussed in <a href="#3.a.">3.a</a>.</p>
444 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
446 <p>While it is not necessary for a target or origin to join a federation,
447 doing so greatly facilitates the implementation of multilateral trust
448 relationships. Each federation will have a different application process.</p>
449 <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or
450 the Shibboleth v1.0 architectural document.</p>
451 <p>For testing in a private environment, Shibboleth comes with a default
452 configuration that demonstrates how to implement a local peered agreement
453 and supports testing both origin and target on the same box using localhost
454 URLs. The sample key and certificate is for ease of testing only, and should
455 always be replaced for real world use.</p>
457 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
459 <p>Shibboleth's protocols and software have been extensively engineered to
460 provide protection against many attacks. However, the most secure protocol
461 can be compromised if it is placed in an insecure environment. To ensure
462 Shibboleth is as secure as possible, there are several recommended security
463 precautions which should be in place at local sites.</p>
465 <li>SSL use is optional for target sites, but should be used if at all
466 possible, at least in the processing of incoming sessions (called the
467 SHIRE URL or assertion consumer service). Federation guidelines should
468 be considered when determining whether to implement SSL, and, in
469 general, SSL should be used for interactions with client machines to
470 provide the necessary authentication and encryption to ensure protection
471 from man-in-the-middle attacks. It is strongly suggested that all
472 password traffic or similarly sensitive data should be SSL-protected.
473 Assessment of the risk tradeoff against possible performance degradation
474 should be performed for all applications.</li>
475 <li>Many other attacks can be made on the several redirection steps that
476 Shibboleth takes to complete attribute transfer. The best protection
477 against this is safeguarding the WAYF service and ensuring that rogue
478 targets and origins are not used, generally by development of the trust
479 model underneath Shibboleth. Shibboleth also leverages DNS for security,
480 which is not uncommon, but attacks concerning domain name lookups
481 should be considered.</li>
482 <li>Information regarding origin users is generally provided by the
483 authoritative enterprise directory, and the acceptance of requests from
484 target applications can be carefully restricted to ensure that all
485 requests the SHAR performs are authorized and all information the origin
486 provides is accurate. Use of plaintext passwords is strongly advised
488 <li>Server platforms should be properly secured, commensurate with the
489 level that would be expected for an organization's other security
490 services, and cookie stores on client machines should be well protected.</li>
493 <h4><a name="2.d."></a>2.d. Server Certs</h4>
495 <p>In the Shibboleth architecture, the SHAR, HS, and AA must all have
496 various client and/or server certificates for use in signing assertions and
497 creating SSL channels. These should be issued by a commonly accepted CA,
498 which may be stipulated by your federation. After understanding the CA's
499 acceptible to your federations, consult chapter <a href="#4.c.">4.c</a> for
500 information on certificate and key generation.</p>
502 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
504 <p>The Attribute Authority maintains a set of rules called Attribute Release
505 Policies (ARP's) that define which attributes are released to which targets.
506 When a browser user tries to access a resource, the SHAR asks the origin
507 site AA to release all the attributes it is allowed to know, possibly
508 restricted to a specifically desired subset. The SHAR provides a client
509 certificate with its request (assuming SSL is used) so the AA can further
510 refine the information the SHAR is allowed to know. The AA
511 processes this request using all applicable ARP's, determines which
512 attributes and values it will release, and then obtains the values actually
513 associated with the browser user. The AA sends these attributes and values
514 back to the SHAR.</p>
515 <p>Targets should work together with expected origin sites to ensure that
516 the sets of attributes that both sites expect to correspond using are
519 <h4><a name="2.f."></a>2.f. Attribute Acceptance Policies</h4>
521 <p>When a target receives a set of attributes, it must evaluate them in the
522 context of the Attribute Authority that is providing them, to assess their
523 "reasonableness". For example, if the value of an attribute is expected to
524 be from a small set of enumerated choices, the value should be compared
525 against that list. If a particular attribute or value is only trusted when
526 asserted by specific origins, that too should be checked.</p>
527 <p>Targets are configured to accept specific attributes that they understand
528 and care about, and are also configured with the rules to apply before
529 accepting the attributes for use by the RM or an application. Attributes and
530 values that don't meet the target's requirements are filtered out. The set
531 of configuration rules to make these decisions is called an Attribute
532 Acceptance Policy (AAP).</p>
534 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
536 <p>A primary Shibboleth design consideration was to require very little or
537 no modification to client machines. The only requirement is that a browser
538 is used which supports cookies, redirection and SSL. Browser users will have
539 to perform an additional click to submit the authentication assertion if
540 JavaScript is not functional.</p>
542 <h4><a name="2.h."></a>2.h. Clocks</h4>
544 <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should be run on all
545 web servers. Shibboleth employs a short assertion acceptance window to protect
546 against replay attacks. Because of this, any significant degree of clock
547 skew can hinder the ability of users to access sites successfully.</p>
549 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
551 <p>Especially for higher education, there are a handful of laws enacted
552 which may have important ramifications on the disclosure of personal
553 information and attributes. Since Shibboleth does not necessarily need to
554 transmit identity, it is an ideal solution for many higher education
555 situations. Nevertheless, all parties within the United States of America
556 are strongly advised to consult the
557 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
558 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
559 legislation before deploying Shibboleth.</p>
564 <h3><a name="3."></a>3. Installation</h3>
565 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
566 <p>The Shibboleth project makes binary packages available only for Windows,
567 that are precompiled against recent releases of various required libraries such
568 as OpenSSL. Binaries for other platforms may be available on a limited or ad hoc
569 basis. It is highly advisable to build from source when using Shibboleth in
570 a production environment in order to permit patching or updating of packages as
571 security holes and bugs are fixed. Building from source is necessary to give you
572 complete control over your deployment platform. The binary packages represent a
573 snapshot in time only. To build from source, see the <span class="fixed">
574 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source
576 <p>The software requirements listed correspond to the binary distribution. In
577 general, source builds should work against all recent versions of the operating
578 systems and software dependencies listed below. For specific questions, inquire
579 to the support mailing list, or give it a try. Note that OpenSSL releases
580 frequent security updates; the version listed may not be the most current, but
581 most minor "letter" updates should be usable.</p>
583 <p><b>General Requirements and Notes:</b></p>
585 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.x</a>
587 <p>Apache 1.3.x must be compiled with mod_so for DSO module support, and
588 should include SSL support (preferably using <span class="fixed">mod_ssl</span>),
589 and EAPI support (which <span class="fixed">mod_ssl</span> requires and provides).</p>
590 <p><b>Portions of the <span class="fixed">libphp4</span> Apache
591 module are written in C++, as is Shibboleth. There is a known
592 conflict between the PHP extensions <span class="fixed">libpspell.so</span>
593 and <span class="fixed">libsablot.so</span> which will manifest
594 itself as segmentation faults when starting Apache. If a site wants
595 to use <span class="fixed">libphp4.so</span> and Shibboleth at the same time,
596 then one of the following may be done:</b>
598 <li>Remove the options <span class="fixed">--with-pspell</span>
599 and <span class="fixed">--with-xslt-sablot</span> from PHP's
601 <li>Rebuild these two modules using the same version of GCC that
602 was used to compile Shibboleth.</li>
606 <li><a href="http://www.apache.org/dist/httpd/">Apache 2.0.x</a>
608 <p>Apache 2.0.x must be compiled with mod_so for DSO module support, and
609 should include SSL support which is available but not included by default.
610 See also the note about PHP above.</p>
611 <p>At the time of writing, an incompatibility exists between Shibboleth
612 and <span class="fixed">mod_cgi</span> that causes forked CGI child processes
613 to fail. The newer <span class="fixed">mod_cgid</span> provided for use with
614 the multi-threaded worker MPM works fine and is suggested as a work-around
615 even if running in prefork mode.</p>
620 <p>When installing under Windows 2003, if the server is not in a
621 domain before installing IIS 6, there may be issues surrounding
622 permissions on directories because of new restrictions on IIS
623 extensions accessing files.</p>
626 <li><a href="http://www.openssl.org">OpenSSL</a>
628 <p>Verions 0.9.6 and 0.9.7 are both supported, but 0.9.7 should be used
629 if possible, as support for 0.9.6 may be dropped in a future release.
630 Support for threads and shared libraries <b>must</b> be included during
631 configuration using the <i>threads</i> and <i>shared</i> options.</p>
634 <p>Most other required libraries are either easy to update or not found
635 on typical systems. See the <span class="fixed">INSTALL.txt</span> files
636 in the OpenSAML and Shibboleth source distributions for specific requirements
637 of a given release. The important requirements are for pthreads support and
638 shared libraries on Unix platforms. Without both, building will be hard and
639 stability unlikely.</p>
641 <p><b>Operating System Specific Notes:</b></p>
643 <li>Windows NT/2000/XP/2003
646 <p>Any Apache modules used, and Apache itself, must be compiled
647 with the Microsoft DLL-based runtime, selected by compiling with
651 <p>The installer will prompt for an install path, change default
652 configuration files as appropriate for Windows, and set various
653 environment variables for you. A default SHAR service can also
654 be installed, or you can install it manually using the
655 instructions in this guide.</p>
656 <p>Note that debug/symbol versions of the libraries and software
657 are included, and may be used by appending "debug" to the
658 Shibboleth library path and using the corresponding modules and
659 binaries. If you do so, be aware that Apache and other modules
660 must also be compiled with Microsoft's debug runtime (via the /MDd
661 compiler option). In most cases, you can safely ignore or even
662 delete the debug versions.</p>
666 <li>RedHat Linux 7.2,7.3:
669 <p>The most recent Red Hat RPM (1.3.27-2 as of this writing) is sufficient for
670 use with Shibboleth. You can use the older version of OpenSSL included, for this
671 release, but be advised this may change in the future.</p>
674 <p>The version of GCC that comes with this system is too old to build Shibboleth.
675 Special update RPMs are available for GCC 3.04 that will work provided you
676 configure packages with CC and CXX set to gcc3 and g++3 respectively. Newer
677 GCC versions also work but may require a glibc upgrade and necessitate a lot
678 of unrelated package updates.</p>
682 <li>RedHat Linux 9 / Fedora
685 <p>Apache 2.0 is included as the default version in this release. If using
686 the prefork MPM (<span class="fixed">/sbin/httpd</span>), then the Apache configuration
687 file needs to be modified to use <span class="fixed">mod_cgid</span> in place of
688 <span class="fixed">mod_cgi</span>. If using the worker MPM
689 (<span class="fixed">/sbin/httpd.worker</span>), then <span class="fixed">mod_cgid</span>
690 is used already, which Apache strongly recommends.</p>
694 <li>RedHat Enterprise Linux
697 <p>Apache 2.0 is included as the default version in this release. Unlike
698 the RH 9 and Fedora distributions, <span class="fixed">mod_cgid</span> is not
699 included, which not only causes problems for Shibboleth but is also suboptimal
700 if the worker MPM is used. No workaround is known yet, save building
701 <span class="fixed">mod_cgid</span> from the Apache source.</p>
708 <p>Shibboleth requires that Apache and Apache-SSL be built with
709 <span class="fixed">libpthread</span>, or loading the
710 <span class="fixed">mod_shib_13</span> or <span class="fixed">mod_shib_20</span>
711 modules will cause Apache to fail. While RedHat's Apache is compatible,
712 Debian's Apache must be rebuilt with <span class="fixed">libpthread</span>:</p>
714 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
715 $ apt-build --rebuild --reinstall install \<br>
716 apache-common apache apache-ssl</span></p>
724 <p>The shared library version of OpenSSL is required by
725 Shibboleth. The static libraries may be installed as well if
726 necessary for other applications, but cannot be used within
727 mod_ssl or any other Apache modules. If mod_ssl's libssl.so
728 module is linked against the static version, bus errors will
730 <p>To check how mod_ssl was built, run the <span class="fixed">
731 ldd</span> command against <span class="fixed">libssl.so</span>
732 in the Apache <span class="fixed">libexec/</span> folder and
733 check the output for references to <span class="fixed">
734 libssl.so.0.9.7</span>. If you see an earlier version
735 mentioned, or no mention of it at all, then OpenSSL 0.9.7 must be
736 built with shared libraries from source, and the Apache module rebuilt with it.</p>
737 <p>openssl-0.9.7d, the latest security fix release, has been tested,
738 but any 0.9.7 version should work.</p>
741 <p>Solaris does not come with GCC 3, but various versions can be obtained
742 from <a href="http://www.sunfreeware.com">http://www.sunfreeware.com</a>.
743 If building your own, GCC must be configured to use Sun's linker. Note that
744 you should use a consistent version of GCC across any other C++ libraries
745 in use within Apache, but other C++ code can freely use a different version
746 as long as the necessary <span class="fixed">libstdc++.so</span> for a given
747 version is available</p>
750 <p>Use of GCC is recommended, but new releases of Sun's Forte compiler have
751 been used successfully with some tinkering with configuration scripts.</p>
757 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
759 <p>For the sake of clarity, this deployment guide assumes that standard
760 directories are used for all installations. These directories may be changed
761 for local implementations, but must be done so consistently.</p>
762 <p>On Unix, the build documentation suggests building into
763 <span class="fixed">/opt/shibboleth</span>. If you use a different layout or
764 location, most of the essential configuration files will be tweaked for you,
765 but watch for any exceptions.</p>
766 <p>On Windows, use of the installer is recommended. Visual Studio 6.0
767 project files are included with the OpenSAML and Shibboleth source
768 distributions for source builds if maximum flexibility to deal with
769 security issues is desired.</p>
771 <h4><a name="3.c."></a>3.c. Configure Apache</h4>
774 <li>Shibboleth includes configuration directives in the files
775 <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span>
776 and <span class="fixed">/opt/shibboleth/etc/shibboleth/apache2.config</span>
777 which must be added to the <span class="fixed">httpd.conf</span> file used
778 locally. It is recommended that these directives simply be added to the end of the
779 existing <span class="fixed">httpd.conf</span> file rather than trying
780 to merge it in-line; <a href="#3.c.2.">step 2</a> describes the
781 necessary modifications to the Apache startup script. The default
782 configuration will often work, but if customization is necessary, these
783 options may be modified:<dl>
784 <dd class="attribute"><span class="fixed">LoadModule <module> <pathname></span></dd>
785 <dd class="value">Specifies the name and location of the module,
786 installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shib_13.so</span>
787 or <span class="fixed">/opt/shibboleth/libexec/mod_shib_20.so</span></dd>
789 <dd class="attribute"><span class="fixed">ShibConfig <pathname></span></dd>
790 <dd class="value">Specifies the <span class="fixed">pathname</span>
791 of the Shibboleth configuration file. Defaults to <span class="fixed">
792 /opt/shibboleth/etc/shibboleth/shibboleth.xml</span>.</dd>
794 <dd class="attribute"><span class="fixed">ShibSchemaDir <path></span></dd>
795 <dd class="value">Specifies the <span class="fixed">path</span>
796 of the Shibboleth schema folder. Defaults to <span class="fixed">
797 /opt/shibboleth/etc/shibboleth</span>.</dd>
799 <dd class="attribute"><span class="fixed"><Location <i>url</i>><br>
800 SetHandler <method><br>
801 </Location></span></dd>
802 <dd class="value"><p>(Apache 1.3 only) Specifies the relative <span class="fixed">path</span>
803 and the <span class="fixed">handler</span> the target uses to process
804 incoming sessions and lazy session startup for Shibboleth-protected
805 resources. This works in concert with the <span class="fixed">shireURL</span>
806 settings in the XML configuration file. Any virtual locations that are to be
807 used for this purpose should be defined to Apache here.</p></dd>
810 <li>If the OpenSSL libraries are not in the system's search path, they
811 should be added to the <span class="fixed">LD_LIBRARY_PATH</span> used by
812 Apache. Generally libtool's linker options will insure that the modules
813 can locate the Shibboleth libraries, but if not, you may need to add
814 <span class="fixed">/opt/shibboleth/lib</span> to <span class="fixed">
815 LD_LIBRARY_PATH</span> as well.</li>
816 <li>The SHAR must be started along with Apache. Among other methods on
817 Unix, this can be done either by creating a separate SHAR startup script
818 or by modifying Apache's RC script to start/stop the <span class="fixed">
819 SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is
820 suggested that Apache's script be modified by adding:<blockquote>
821 <p><span class="fixed">/opt/shibboleth/bin/shar -f &</span> </p>
823 <p>In most cases, the build process insures that the SHAR can locate
824 the configuration file and schemas, but the SHIBCONFIG and SHIBSCHEMAS
825 environment variables may be used as well. Command line options can also
826 be used to specify them.</p>
827 <p>On Windows, the SHAR is a service and is managed separately.</li>
828 <li>By default, the Shibboleth modules are configured to log information
829 on behalf of Apache to the file <span class="fixed">
830 /opt/shibboleth/var/log/shibboleth/shire.log</span>, though this can be
831 changed. For this log to be created, Apache must have permission to
832 write to this file, which may require that the file be manually created
833 and permissions assigned to whatever user Apache is configured to run
834 under. If the file does not appear when Apache runs with the modules
835 loaded, check for permission problems.</li>
836 <li>The options in <span class="fixed">shibboleth.xml</span> must be
837 configured as documented in <a href="#4.a.">4.a</a>. Apache content may
838 then need to be modified for Shibboleth authentication. This is
839 discussed in <a href="#4.d.">4.d</a>. It is recommended that the target
840 then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
843 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
846 <li>The package includes an ISAPI filter and bundled extension for
847 session processing in a single library, <span class="fixed">libexec\isapi_shib.dll</span>.
848 This filter is configured using commands in <span class="fixed">
849 C:\opt\shibboleth\etc\shibboleth\shibboleth.xml</span> (or wherever you've
850 installed the software). Make sure you or the installer has added the lib
851 directory to the path as directed in <a href="#3.b.">section 3.b.</a>
852 <p>Installing the extension into IIS is a two step process:
854 <li type="a">First, add the filter using the Internet Services
855 Manager MMC console. Right click on the machine icon on the left,
856 and edit the WWW Service master properties. On the "ISAPI Filters"
857 tab, add a new filter called Shibboleth and specify the DLL named
858 above. The priority should be High, and once the filter is loaded,
859 make sure it appears in the list <b>below</b> the "sspifilt" entry.
860 Restart IIS and make sure the filter shows up with a green arrow.
861 Check the Windows event log if it fails to load.</li>
862 <li type="a">Secondly, map a special file extension, such as
863 <span class="fixed">.shire</span>, to the ISAPI library so that
864 virtual URLs can be specified to invoke the SHIRE handler for each
865 web site. Right click on the machine icon on the left, and edit the
866 WWW Service master properties. On the "Home Directory" tab, add a
867 script mapping using the "Configuration" button. The "Executable"
868 box should point to <span class="fixed">isapi_shib.dll</span>, and the
869 "Extension" can be set to anything unlikely to conflict, but
870 <span class="fixed">.shire</span> is assumed (and the dot must be
871 included). You should NOT select the option to limit verbs, and
872 you MUST uncheck the "Check that file exists" box.</li>
873 <li type="a"><font color=#444499>(IIS 6 Only)</font> A new Web
874 Service Extension must be defined for Shibboleth; without this, the
875 mapping from <span class="fixed">*.shire</span> to <span
876 class="fixed">isapi_shib.dll</span> won't occur and a file error
877 will appear Add this extension with an arbitrary name and associate
878 it with <span class="fixed">isapi_shib.dll</span>.</li>
881 <li>All other aspects of configuration are handled via the
882 <span class="fixed">shibboleth.xml</span> file and associated XML
883 files described in subsequent sections. Particular use is made of
884 the <span class="fixed">/SHIRE/Implementation/ISAPI</span> element that allows the
885 IIS sites to be mapped to fully-qualified hostnames for proper request mapping.</li>
886 <li>Instance IDs are used in the IIS metabase to identify web sites. In older versions,
887 they are applied starting with 1(one) and number the web sites in order in the
888 Internet Services Manager from top to bottom. Newer versions appear to assign
889 some IID values with strange ASCII formulas applied to the site name. A simple
890 ASP or CGI script can be run within a site to dump the INSTANCE_ID header.</li>
891 <li>See the following section for information on running the SHAR
892 service on Windows.</li>
893 <li>The options in <span class="fixed">shibboleth.xml</span> must be
894 configured as documented in <a href="#4.a.">4.a</a>. It is recommended
895 that the target then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
898 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
900 <p>The SHAR is a console application that is primarily designed to be
901 installed as a Windows service. To run the process in console mode for
902 testing or to diagnose major problems, the <span class="fixed">-console</span>
903 parameter is used. Otherwise, parameters are used to install (or remove) the SHAR from the
904 service database and subsequent control is via the Service Control Manager
905 applet. The following command line parameters can be used:</p>
907 <dd class="attribute"><span class="fixed">-console</span></dd>
908 <dd class="value">Allows the process to be started from a command
909 prompt. Since the console will exit if the desktop user logs out, this
910 is not suitable for production use, but may be useful for testing.</dd>
911 <dd class="attribute"><span class="fixed">-check</span></dd>
912 <dd class="value">Validates the general correctness of the configuration.
913 Not all problems can be detected this way, but the chance of successful startup
914 is high if the checking process does not log any errors.</dd>
915 <dd class="attribute"><span class="fixed">-config <pathname></span> </dd>
916 <dd class="value">Specifies the pathname of the SHAR's configuration
917 file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>
918 or the value of the <span class="fixed">SHIBCONFIG</span> environment
919 variable, if it is set.</dd>
920 <dd class="attribute"><span class="fixed">-schemadir <path></span> </dd>
921 <dd class="value">Specifies the path to the XML schema files. Defaults to
922 <span class="fixed">\opt\shibboleth\etc\shibboleth</span> or the value of the
923 <span class="fixed">SHIBSCHEMAS</span> environment variable, if it is set.</dd>
924 <dd class="attribute"><span class="fixed">-install <servicename></span></dd>
925 <dd class="value">Installs the SHAR as a named service in the Windows
926 service database. A name should be provided if multiple instances of the
927 SHAR need to be run on different ports, and thus installed separately.
928 The <span class="fixed">-config</span> option can be provided to include
929 a specific configuration file on the service's command line.</dd>
930 <dd class="attribute"><span class="fixed">-remove <servicename></span></dd>
931 <dd class="value">Removes the named service instance of the SHAR from
932 the Windows service database.</dd>
938 <h3><a name="4."></a>4. Getting Running</h3>
939 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.xml</span></h4>
941 <p>The configuration for the target is mostly contained within <span class="fixed">shibboleth.xml</span>, located by default at <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>. The target comes pre-configured with certificates and settings that will work against a test origin running on the same server; however, there are several values that must later be changed to interoperate with other sites securely and effectively.</p><p>The following is a hyperlinked version of a basic configuration file, followed by a list of elements and attributes that must be modified. The actual example shipped with Shibboleth includes many more options that are commented out and other elements necessary to support test functionality. Click on any attribute or element for more information on its population and definition.</p>
943 <blockquote><span class="fixed">
944 <a class="fixedlink" href="#confShibbolethTargetConfig"><ShibbolethTargetConfig xmlns="urn:mace:shibboleth:target:config:1.0"
945 <br> logger="/opt/shibboleth/etc/shibboleth/shibboleth.logger" clockSkew="180"></a>
947 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
948 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/shibboleth/libexec/xmlproviders.so" fatal="true"/></a>
949 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
951 <br> <a class="fixedlink" href="#confSHAR"><SHAR logger="/opt/shibboleth/etc/shibboleth/shar.logger"></a>
953 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
954 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/shibboleth/libexec/shib-mysql-ccache.so" fatal="false"/></a>
955 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
956 <br>
957 <br> <a class="fixedlink" href="#confUnixListener"><UnixListener address="/tmp/shar-socket"/></a>
959 <br> <!-- Primarily for IIS Deployments:
960 <br> <a class="fixedlink" href="#confTCPListener"><TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/></a>
961 <br> -->
962 <br>
963 <br> <a class="fixedlink" href="#confMemorySessionCache"><MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
964 <br> defaultLifetime="1800" retryInterval="300" strictValidity="true" propagateErrors="true"/></a>
965 <br>
966 <br> <a class="fixedlink" href="#confSHAR"></SHAR></a>
967 <br>
968 <br> <a class="fixedlink" href="#confSHIRE"><SHIRE logger="/opt/shibboleth/etc/shibboleth/shire.logger"></a>
970 <br> <a class="fixedlink" href="#confRequestMapProvider"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></a>
971 <br> <a class="fixedlink" href="#confRequestMap"><RequestMap applicationId="default"></a>
972 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="https"></a>
973 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
974 <br> <a class="fixedlink" href="#confHost"></Host></a>
975 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="http"></a>
976 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
977 <br> <a class="fixedlink" href="#confHost"></Host></a>
978 <br> <a class="fixedlink" href="#confRequestMap"></RequestMap></a>
979 <br> <a class="fixedlink" href="#confRequestMapProvider"></RequestMapProvider></a>
980 <br> <!-- IIS only:
981 <br> <a class="fixedlink" href="#confImplementation"><Implementation></a>
982 <br> <a class="fixedlink" href="#confISAPI"><ISAPI normalizeRequest="true"></a>
983 <br> <a class="fixedlink" href="#confSite"><Site id="1" host="localhost"/></a>
984 <br> <a class="fixedlink" href="#confISAPI"></ISAPI></a>
985 <br> <a class="fixedlink" href="#confImplementation"></Implementation></a>
986 <br> -->
987 <br> <a class="fixedlink" href="#confSHIRE"></SHIRE></a>
989 <br> <a class="fixedlink" href="#confApplications"><Applications xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
990 <br> applicationId="default" providerId="https://localhost/shibboleth/target"></a>
991 <br> <a class="fixedlink" href="#confSessions"><Sessions lifetime="7200" timeout="3600" checkAddress="true"
992 <br> shireURL="/Shibboleth.shire" shireSSL="false" cookieName="_shibsession_default" cookieProps="; path=/"
993 <br> wayfURL="https://wayf.internet2.edu/InQueue/WAYF"/></a>
995 <br> <a class="fixedlink" href="#confErrors"><Errors shire="/opt/shibboleth/etc/shibboleth/shireError.html"
996 <br> rm="/opt/shibboleth/etc/shibboleth/rmError.html"
997 <br> access="/opt/shibboleth/etc/shibboleth/accessError.html"
998 <br> supportContact="root@localhost"
999 <br> logoLocation="/shibtarget/logo.jpg"
1000 <br> styleSheet="/shibtarget/main.css"/></a>
1002 <br> <a class="fixedlink" href="#confPolicy"><Policy signRequest="false" signedResponse="false" signedAssertions="false"></a>
1003 <br> <!--
1004 <br> <a class="fixedlink" href="#confAttributeDesignator"><AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"
1005 <br> AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/></a>
1006 <br> -->
1008 <br> <a class="fixedlink" href="#confAAPProvider"><AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP" uri="/opt/shibboleth/etc/shibboleth/AAP.xml"/></a>
1010 <br> <a class="fixedlink" href="#confFederationProvider"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"
1011 <br> uri="/opt/shibboleth/etc/shibboleth/sites.xml"/></a>
1013 <br> <a class="fixedlink" href="#confTrustProvider"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"
1014 <br> uri="/opt/shibboleth/etc/shibboleth/trust.xml"/></a>
1016 <br> <!--
1017 <br> <a class="fixedlink" href="#confRevocationProvider"><RevocationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLRevocation"
1018 <br> uri="/opt/shibboleth/etc/shibboleth/trust.xml"/></a>
1019 <br> -->
1021 <br> <a class="fixedlink" href="confAudience"><saml:Audience>urn:mace:inqueue</saml:Audience></a>
1022 <br> <a class="fixedlink" href="#confPolicy"></Policy></a>
1024 <br> <a class="fixedlink" href="#confCredentialUse"><CredentialUse TLS="defcreds" Signing="defcreds"></a>
1025 <br> <a class="fixedlink" href="#confRelyingParty"><RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/></a>
1026 <br> <a class="fixedlink" href="#confCredentialUse"></CredentialUse></a>
1028 <br> <a class="fixedlink" href="#confApplications"></Applications></a>
1030 <br> <a class="fixedlink" href="#confCredentialsProvider"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></a>
1031 <br> <a class="fixedlink" href="#confCredentials"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a>
1032 <br> <a class="fixedlink" href="#confFileResolver"><FileResolver Id="defcreds"></a>
1033 <br> <a class="fixedlink" href="#confKey"><Key format="PEM"></a>
1034 <br> <a class="fixedlink" href="#confPath"><Path>/opt/shibboleth/etc/shibboleth/shar.key</Path></a>
1035 <br> <a class="fixedlink" href="#confKey"></Key></a>
1036 <br> <a class="fixedlink" href="#confCertificate"><Certificate format="PEM"></a>
1037 <br> <a class="fixedlink" href="#confPath"><Path>/opt/shibboleth/etc/shibboleth/shar.crt</Path></a>
1038 <br> <a class="fixedlink" href="#confCertificate"></Certificate></a>
1039 <br> <a class="fixedlink" href="#confFileResolver"></FileResolver></a>
1040 <br> <a class="fixedlink" href="#confCredentials"></Credentials></a>
1041 <br> <a class="fixedlink" href="#confCredentialsProvider"></CredentialsProvider></a>
1043 <br><a class="fixedlink" href="#confShibbolethTargetConfig"></ShibbolethTargetConfig></a>
1045 </span></blockquote>
1047 <p>The following changes must be made to the default configuration before the target will interoperate in a federation.</p>
1050 <p>The main <a href="#confApplications"><span class="fixed">Applications</span></a> element's <span class="fixed">providerId</span> attribute must be changed to reflect the URI this target will use to identify itself to origins by default. This will often be approved or supplied by a federation.</p>
1053 <p>The <span class="fixed">supportContact</span> and error templates for the target found in the <a href="#confErrors"><span class="fixed">Errors</span></a> element should be changed to ensure that users have a proper support mechanism.</p>
1056 <p>Proper credentials for this target signed by an authority that the federation recognizes must be referenced by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element. The default configuration points at flat files with widely-available, insecure keys and certificates. Note that keys are supported in a variety of formats: DER, PEM, encrypted PEM, PKCS8, and encrypted PKCS8.</p>
1059 <p><a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a> and
1060 <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a> elements must be added or
1061 changed as needed to reflect the arrangements required. This information is often provided by
1062 federations to their members.</p>
1066 <p>For Apache (but not IIS), there is also information that must be
1067 configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span>
1068 (or equivalent); for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1069 <p>Information in the logging configuration files referenced by
1070 <span class="fixed">shibboleth.xml</span> may require additional changes to
1071 meet local needs. The logging level can be raised to <span class="fixed">
1072 DEBUG</span> if extremely detailed information is needed for testing.
1073 It is recommended that after initial installation is
1074 completed, the log level in both files be left at either <span class="fixed">
1075 INFO</span> or <span class="fixed">WARN</span>.</p>
1076 <p>All elements are optional unless otherwise specified. All attributes of an element are optional unless designated <span class="mandatory">mandatory</span> by a purple background.</p>
1078 <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>
1079 <dd class="value">This element is used to specify individual attribute acceptance policies that will apply to this application and may appear zero or more times within the <a href="#confPolicy"><span class="fixed">Policy</span></a> element. For information about these policies and their format, refer to <a href="#4.e.">section 4.e</a>.
1080 <p>The default set of AAP providers can be overridden within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p></dd>
1082 <dd class="attribute"><a name="confApplication"><span class="fixed"><Application <span class="mandatory">id="<i>identifier</i>"</span> providerId="<i>identifier</i>"></span></dd>
1083 <dd class="value">Individual applications that require different attributes, session settings, policies, etc. can be differentiated from the default configuration as specified in the <a href="#confApplications"><span class="fixed">Applications</span></a> element, which contains this element. It must contain a <a href="#confSessions"><span class="fixed">Sessions</span></a> element, but overriding the default <a href="#confErrors"><span class="fixed">Errors</span></a>, <a href="#confPolicy"><span class="fixed">Policy</span></a>, and <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> elements is optional.
1085 <li class="mandatory"><span class="fixed">id</span>: This attribute defines an internal identifier allowing individual <span class="fixed">applicationId</span> attributes as part of <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a> elements to point to this <span class="fixed">Application</span> to handle requests.</li>
1086 <li><span class="fixed">providerId</span>: Distinct from the internal identifier, the <span class="fixed">providerId</span> is the unique identifier that will be used when communicating with origin sites to request authentication or attributes. This value is referenced by origins when creating rules for the release of attributes to targets. If none is specified, the default <a href="#confApplications><span class="fixed">Applications</span></a> element's <span class="fixed">providerId</span> applies.</li>
1089 <dd class="attribute"><a name="confApplications"><span class="fixed"><Applications id="<i>default</i>" <span class="mandatory">providerId="<i>identifier</i>"</span>></span></dd>
1090 <dd class="value">The <span class="fixed">Applications</span> element must appear once and contains default settings for requests handled by the target whose applicable request mapping using matching <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a> elements has no declared <span class="fixed">applicationId</span> attribute. It must contain at least one each of the <a href="#confSessions"><span class="fixed">Sessions</span></a>, <a href="#confErrors"><span class="fixed">Errors</span></a>, <a href="#confPolicy"><span class="fixed">Policy</span></a>, and <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> elements, and may contain individual <a href="#confApplication"><span class="fixed">Application</span></a> elements. Contained by the main <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element.
1092 <li><span class="fixed">id</span>: This attribute has a fixed value of "default" and should not be changed.</li>
1093 <li class="mandatory"><span class="fixed">providerId</span>: Distinct from the internal identifier, the <span class="fixed">providerId</span> is the unique identifier that will be used when communicating with origin sites to request authentication or attributes. This value is referenced by origins when creating rules for the release of attributes to targets.</li>
1096 <dd class="attribute"><a name="confArgument"><span class="fixed"><Argument><i>value</i></Argument></span></dd>
1097 <dd class="value">The <span class="fixed">Argument</span> element is used in the <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to specify one or more arguments to pass to the MySQL database engine.</dd>
1099 <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>
1100 <dd class="value">The <span class="fixed">AttributeDesignator</span> element is used in the <a href="#confPolicy"><span class="fixed">Policy</span></a> element to name an attribute to specifically request from origins on behalf of an application. If none are specified, the application will be given anything the origin allows it to see.
1102 <li class="mandatory"><span class="fixed">AttributeName</span>: Specifies the name of a SAML attribute, generally a URI.</li>
1103 <li class="mandatory"><span class="fixed">AttributeNamespace</span>: Specifies the attribute's SAML namespace, which Shibboleth by convention sets to "urn:mace:shibboleth:1.0:attributeNamespace:uri".</li>
1105 <p>The default set of designators can be overridden within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements, but if defaults are specified, it isn't possible to "remove" them and revert to none.</p>
1108 <dd class="attribute"><a name="confAudience"><span class="fixed"><saml:Audience><i>value</i></saml:Audience></span></dd>
1109 <dd class="value">The <span class="fixed">Audience</span> element is used in the <a href="#confPolicy"><span class="fixed">Policy</span></a> element to specify one or more SAML audience URIs to treat as valid while processing assertions. A target application always includes its own <span class="fixed">providerId</span> as an audience value.
1110 <p>Within an <a href="#confApplication"><span class="fixed">Application</span></a> element, this setting is not inherited from the <a href="#confApplications"><span class="fixed">Applications</span></a> element. All values desired must be specified.</p></dd>
1112 <dd class="attribute"><a name="confCAPath"><span class="fixed"><CAPath><i>pathname</i></CAPath></span></dd>
1113 <dd class="value">Paired with a <a href="#confPath"><span class="fixed">Path</span></a> element and contained by a <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, this element allows for the specification of additional certificates in the chain up to the trust anchor. As many <span class="fixed">CAPath</span> elements as necessary to complete the chain may be specified. May be needed if the relying party does not possess the entire CA chain already.</dd>
1115 <dd class="attribute"><a name="confCertificate"><span class="fixed"><Certificate format="<i>type</i>"></span></dd>
1116 <dd class="value">This specifies the certificate corresponding to this set of credentials. The certificate itself must be referred to using a <a href="#confPath"><span class="fixed">Path</span></a> element contained by this element. If this certificate isn't self-signed or signed by a root familiar to the relying party, the files of certificates in the path to the root may be specified using one or more <a href="#confPath"><span class="fixed">CAPath</span></a> elements. Valid encodings are <span class="fixed">PEM</span>, <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>. It resides within the <a href="#confFileResolver"><span class="fixed">FileResolver</span> element and must be paired with the corresponding private key using the <a href="#confKey"><span class="fixed">Key</span></a> element.</dd>
1118 <dd class="attribute"><a name="confCredentials"><span class="fixed"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></span></dd>
1119 <dd class="value">This element is the container for credentials used by the XML-based credentials provider with type "edu.internet2.middleware.shibboleth.common.Credentials" It must contain one or more <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> elements.</dd>
1121 <dd class="attribute"><a name="confCredentialsProvider"><span class="fixed"><CredentialsProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.Credentials"</span>></span></dd>
1122 <dd class="value">This element is the container for providers of credentials used by the target and is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element. The supplied provider of type "edu.internet2.middleware.shibboleth.common.Credentials" must contain one <a href="#confCredentials"><span class="fixed">Credentials</span></a> element detailing the individual credentials to be used by the target. Other provider types might require different content.</dd>
1124 <dd class="attribute"><a name="confCredentialUse"><span class="fixed"><CredentialUse <span class="mandatory">TLS="<i>string</i>" Signing="<i>string</i>"</span>></span></dd>
1125 <dd class="value">Required in the <a href="#confApplications"><span class="fixed">Applications</span></a> element or overridden in <a href="#confApplication"><span class="fixed">Application</span></a> elements, this specifies the credentials used by the target for signing and TLS/SSL. 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. May also contain <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements that override the credentials to use for specific origins or federations.</dd>
1127 <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>
1128 <dd class="value">Shibboleth is capable of displaying customized error pages based on templates and special resources provided by additional attributes in this element. These should all be customized to fit the requirements of the target application. For more information on configuration of error page generation, please see <a href="#4.b.">section 4.b</a>.
1130 <li class="mandatory"><span class="fixed">shire</span>: Specifies the location of the template for the error page generated when there is an error re-directing the user to the WAYF or processing a new session sign-on.</li>
1131 <li class="mandatory"><span class="fixed">rm</span>: Specifies the location of the template for the error page generated if internal errors occur when supplying attributes to the application.</li>
1132 <li class="mandatory"><span class="fixed">accessError</span>: Specifies the location of the template for the page displayed to users when access to a protected resource is denied based on access control. This is distinct from when errors occur during the evaluation process itself, and indicates a denial of authorization.</li>
1133 <li><span class="fixed">supportContact</span>: Specifies a support e-mail address for the user to contact.</li>
1134 <li><span class="fixed">logoLocation</span>: Specifies the location of the logo used in the generation of error pages. This logo can be in any format that the web browser will understand, and should be a URL (absolute or relative) that will return a valid logo.</li>
1136 The last two attributes are examples of tags that can be inserted at runtime into the templates. Arbitrary attributes can be used.
1139 <dd class="attribute"><a name="confExtensions"><span class="fixed"><Extensions></span></dd>
1140 <dd class="value">Extension libraries for one of the Shibboleth components or the entire target can be specified using this element depending on where it's present. It may be contained by any of the <a href="#confSHAR"><span class="fixed">SHAR</span></a>, <a href="#confSHIRE"><span class="fixed">SHIRE</span></a>, or <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> elements. It should always contain one or more <a href="#confLibrary"><span class="fixed">Library</span></a> elements.</dd>
1142 <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>
1143 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to operational metadata either inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download periodically. This should be updated regularly; see <a href="#4.g.">section 4.g</a> for further details.
1144 <p>If an <a href="#confApplication"><span class="fixed">Application</span></a> does not include any <span class="fixed">FederationProvider</span> elements, the default set is used.</p>
1147 <dd class="attribute"><a name="confFileResolver"><span class="fixed"><FileResolver <span class="mandatory">Id="<i>string</i>"</span>></span></dd>
1148 <dd class="value">This element defines the files used to store a private key, certificate, and certificate authorities and associates the set with an identifier. Contained by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element. <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> and <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements will refer to these identifiers in their <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attributes, allowing different credentials to be used for different applications and relying parties. It must contain one <a href="#confKey"><span class="fixed">Key</span></a> element and should contain one <a href="#confCertificate"><span class="fixed">Certificate</span></a> element.</dd>
1150 <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>
1151 <dd class="value">Individual (real or virtual) hosts that this target protects are enumerated by <span class="fixed">Host</span> elements in the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element. If a request is processed by Shibboleth for a URL on this host, these parameters will be applied to it. If there are <a href="#confPath"><span class="fixed">Path</span></a> elements within this element that match the URL and contain the <span class="fixed">applicationId</span>, <span class="fixed">requireSession</span>, or <span class="fixed">exportAssertion</span> attributes, they will override those in this element; similarly, the ones within this element will override those in the containing <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element.
1153 <li><span class="fixed">scheme</span>: This specifies the protocol on which this host responds. Valid choices are <span class="fixed">http</span>, <span class="fixed">https</span>, <span class="fixed">ftp</span>, <span class="fixed">ldap</span>, and <span class="fixed">ldaps</span>.</li>
1154 <li class="mandatory"><span class="fixed">name</span>: This is the fully-qualified domain name of the host. This appended to the <span class="fixed">scheme</span> must match what is contained in the URL for the element's settings to apply to the request.</li>
1155 <li><span class="fixed">port</span>: This is the port the host is listening on, if not the standard port for the scheme.</li>
1156 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish an authenticated session with the user before handing off the request to the web server or application. If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span> (the default), applications are responsible for ensuring that a session exists if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> for protected content without a full understanding of the implications.</li>
1157 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute assertion received from the origin is exported to a CGI request header called <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1160 <dd class="attribute"><a name="confImplementation"><span class="fixed"><Implementation></span></dd>
1161 <dd class="value">A container element placed inside the <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element, the contents of this element will vary depending on the web server or environment that this Shibboleth deployment serves. Multiple configurations may be specified, but only one per implementation type. This element may contain the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element. <!-- NOT IMPLEMENTED: and <a href="#confNSAPI"><span class="fixed">NSAPI</span></a>, <a href="#confJava"><span class="fixed">Java</span></a> -->.</dd>
1163 <dd class="attribute"><a name="confISAPI"><span class="fixed"><ISAPI normalizeRequest="<i>true/false</i>"></span></dd>
1164 <dd class="value">The configuration information for Shibboleth targets deployed on Microsoft IIS is stored inside this container element. This element must contain one or more <a href="#confSite"><span class="fixed">Site</span></a> elements, each of which maps an INSTANCE ID value to a hostname. If <span class="fixed">normalizeRequest</span> is <span class="fixed">true</span> (the default), all redirects and computed request URLs generated by Shibboleth will be created using the hostname assigned to the site instance handling the request. If <span class="fixed">false</span>, the browser's supplied URL is sometimes used to compute the information. Contained by the <a href="#confImplementation"><span class="fixed">Implementation</span></a> element.</dd>
1166 <dd class="attribute"><a name="confKey"><span class="fixed"><Key format="<i>type</i>"></span></dd>
1167 <dd class="value">This specifies the file containing a private key to be used by a set of credentials. Valid encodings are <span class="fixed">PEM</span> (the default), <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>. Keys are supported in a variety of formats: DER, PEM, encrypted PEM, and encrypted PKCS12. It resides within the <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, should be paired with a <a href="#confCertificate"><span class="fixed">Certificate</span></a> element, and contain a <a href="#confPath"><span class="fixed">Path</span></a> element.</dd>
1169 <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>
1170 <dd class="value">This element defines an extension library for one of Shibboleth's components when specified within an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.
1171 <ul><li class="mandatory"><span class="fixed">path</span>: This designates the complete pathname to where the library is.</li>
1172 <li><span class="fixed">fatal</span>: If set to <span class="fixed">true</span> and the library is not located or fails to load properly, the target will not start. The default is false.</li>
1175 <dd class="attribute"><a name="confListener"><span class="fixed"><Listener <span class="mandatory">type="<i>string</i>"</span>></span></dd>
1176 <dd class="value">Specifies a pluggable implementation of a mechanism for communication between the web server and SHAR, specified in the <span class="fixed">type</span> attribute. This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> elements.</dd>
1178 <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>
1179 <dd class="value">Shibboleth will cache sessions and received attributes in memory if this element is placed in the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. This element is mutually exclusive with the <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> and <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.
1181 <li><span class="fixed">AAConnectTimeout</span>: Time in seconds the target will wait before timing out on the initial connection to an origin to request attributes. Defaults to <span class="fixed">15</span>.</li>
1182 <li><span class="fixed">AATimeout</span>: Time in seconds the target will wait before timing out while waiting for attributes from an origin once the initial connection is established. Defaults to <span class="fixed">30</span>.</li>
1183 <li><span class="fixed">cacheTimeout</span>: Time in seconds to permit a session to stay in the cache before being purged. Defaults to <span class="fixed">28800</span>.</li>
1184 <li><span class="fixed">cleanupInterval</span>: Seconds between runs of the background thread that purges expired sessions. Defaults to <span class="fixed">300</span>.</li>
1185 <li><span class="fixed">defaultLifetime</span>: If the attribute assertion doesn't carry an explicit expiration time, the assertion will expire after this time in <span class="fixed">seconds</span> has elapsed. Defaults to <span class="fixed">1800</span>.</li>
1186 <li><span class="fixed">propagateErrors</span>: If true, then any errors that occur during the attribute query stage are fatal and will be presented to the user as an error, terminating their session. If false, any errors that occur during the query are non-fatal, and the
1187 application will be given older, expired attributes based on the <span class="fixed">strictValidity</span> setting.</p>
1188 <p>This should generally only be left to false (the default) by deployments that are using real principal names as subjects because attribute retrieval is treated as an optional process.</p></li>
1189 <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>
1190 <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>
1193 <dd class="attribute"><a name="confMySQLSessionCache"><span class="fixed"><MySQLSessionCache mysqlTimeout="<i>seconds</i>"/></span></dd>
1194 <dd class="value">Shibboleth will back the memory cache of sessions using an embedded MySQL database if this element is placed in the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. Arguments may be passed directly to MySQL by populating this element with <span class="fixed"><a href="#confArgument">Argument</a></span> elements. The element may also specify any of the attributes defined for the <a href="#confMemorySessionCache">MemorySessionCache</a> element. Mutually exclusive with the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> and <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.
1196 <li><span class="fixed">mysqlTimeout</span>: Time in seconds to permit a session to stay in the persistent cache before being purged. Defaults to <span class="fixed">28800</span>.</li>
1199 <dd class="attribute"><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>
1200 <dd class="value">This element allows for different application identifiers and session handling to be defined iteratively for subdirectories or documents within a host. Requests are processed on a best-match basis, with the innermost element taking precedence. Path elements may be contained by <a href="#confHost"><span class="fixed">Host</span></a> elements or other <a href="#confPath"><span class="fixed">Path</span></a> elements.
1202 <li class="mandatory"><span class="fixed">name</span>: This is the name of the path component or filename to match against the request.</li>
1203 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish an authenticated session with the user before handing off the request to the web server or application. If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span> (the default), applications are responsible for ensuring that a session exists if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> for protected content without a full understanding of the implications.</li>
1204 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute assertion received from the origin is exported to a CGI request header called <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1207 <dd class="attribute"><a name="confPolicy"><span class="fixed"><Policy signRequest="<i>true/false</i>" signedResponse="<i>true/false</i>" signedAssertions="<i>true/false</i>"></span></dd>
1208 <dd class="value">This element is the main container for specifying policies for attributes, trust, and operational metadata by an application. It must be contained by the <a href="#confApplications"><span class="fixed">Applications</span></a> element and, if contained by an <a href="#confApplication"><span class="fixed">Application</span></a> element, may override portions of the policies which would have been inherited by default. The configuration for policy is defined by these elements, each of which is optional: <a href="#confAttributes"><span class="fixed">Attributes</span></a>, <a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a>, <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a>, <a href="#confRevocationProvider"><span class="fixed">RevocationProvider</span></a>, and <a href="#confAudiences"><span class="fixed">saml:Audiences</span></a>.
1210 <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute requests that it sends to origins from this application. This is usually unnecessary, as the TLS/SSL transport can provide authentication more efficiently.</li>
1211 <li><span class="fixed">signedResponse</span>: If <span class="fixed">true</span>, the target will require that all SAML attribute responses it receives for this application be signed.</li>
1212 <li><span class="fixed">signedAssertions</span>: If <span class="fixed">true</span>, the target will require that individual SAML assertions it receives for this application be signed. This may be particularly useful if the application is forwarding the assertion, but requires a liberal (or no) AAP to avoid corrupting the signature.</li>
1215 <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>"
1216 uri="<i>URI</i>"></span></dd>
1217 <dd class="value"><p><b>For a general description of how the target handles incoming requests, please refer to <a href="#1.f.">section 1.f</a>.</b></p><p>Each <span class="fixed">RequestMap</span> element contains a set of hosts, URLs, and applications that all share the same rules on session and assertion requirements in the form of individual <a href="#confHost"><span class="fixed">Host</span></a> elements. If session requirement or assertion handling conditions varies across that granularity, additional <span class="fixed">RequestMap</span> elements may be specified for them. Alternatively, these conditions may be specified on <a href="#confPath"><span class="fixed">Path</span></a> and <a href="#confHost"><span class="fixed">Host</span></a> elements within this element which will override these settings.</p>
1219 <li><span class="fixed">applicationId</span>: Contains a fixed value of "default" to reference the default <a href="#confApplications"><span class="fixed">Applications</span></a> element.</li>
1220 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish an authenticated session with the user before handing off the request to the web server or application. If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span> (the default), applications are responsible for ensuring that a session exists if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> for protected content without a full understanding of the implications.</li>
1221 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute assertion received from the origin is exported to a CGI request header called <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1224 <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>
1225 <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>
1227 <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.</li>
1231 <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>
1232 <dd class="value"><p>This element specifies a request mapper that defines how Shibboleth will handle sessions and access control for a given request. For the built-in type "edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap", there must be a <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element within this element, or the <span class="fixed">uri</span> attribute must contain the local pathname of an XML file containing one.</p></dd>
1234 <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>
1235 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to revocation metadata either inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download periodically. This should be updated regularly; see <a href="#4.g.">section 4.g</a> for further details.
1236 <p>If an <a href="#confApplication"><span class="fixed">Application</span></a> does not include any <span class="fixed">RevocationProvider</span> elements, the default set is used.</p>
1238 <dd class="attribute"><a name="confSessionCache"><span class="fixed"><SessionCache <span class="mandatory">type="<i>string</i>"</span>></span></dd>
1239 <dd class="value">Use this element to specify a pluggable session cache implementation of the specified <span class="fixed">type</span> This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> and <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> elements.
1240 <p>Any plugin should support the basic attributes defined by the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element.</p></dd>
1242 <dd class="attribute"><a name="confSessions"><span class="fixed"><Sessions
1243 <span class="mandatory">wayfURL="<i>URL</i>"
1244 shireURL="<i>URL</i>"</span>
1245 shireSSL="<i>true/false</i>"
1246 cookieName="<i>URL</i>"
1247 cookieProps="<i>URL</i>"
1248 lifetime="<i>seconds</i>"
1249 timeout="<i>seconds</i>"
1250 checkAddress="<i>true/false</i>"></span></dd>
1251 <dd class="value">Configuration parameters that affect the way Shibboleth handles sessions for an individual application are bundled in this element, which must be included in each <a href="#confApplication"><span class="fixed">Application</span></a> and <a href="#confApplications"><span class="fixed">Applications</span></a> element. Note that these parameters only apply to Shibboleth sessions, and not any sessions applications manage on their own behalf.
1253 <li class="mandatory"><span class="fixed">wayfURL</span>: The URL of the <a href="#1.c.">WAYF service</a> responsible for redirecting users accessing this application to their identity provider (origin).</li>
1254 <li class="mandatory"><p><span class="fixed">shireURL</span>: Specifies the SHIRE URL, or assertion consumer service, at which new sessions are initiated or lazy sessions are triggered. This can be an absolute URL, or a relative path to be prefixed by the base URL of the virtual host. Using an absolute URL allows a virtual server to funnel requests to a fixed location, to force use of SSL, for example.</p>
1255 <p>Note that this URL issues the session cookie set on behalf of the application, and this cookie must be returned in subsequent requests, so the virtual host's domain name and port must be consistent with this domain name and port for some browsers to properly return the cookie. If default ports are used (and thus left unspecified), browsers will generally return cookies set via SSL to a non-SSL server. If non-default ports are used, it is recommended that this be a relative URL so that each virtual host handles its own cookie operations.</p>
1256 <p>For Shibboleth to function properly in IIS, the file extension at the end of this URL must match the value configured into IIS and mapped to the ISAPI extension. This causes the request to be serviced properly, even though no file by that name actually exists.</p></li>
1257 <li><span class="fixed">shireSSL</span>: If <span class="fixed">true</span> (the default), the application will <b>only</b> accept new session requests over SSL, as is strongly recommended; see <a href="#2.c.">section 2.c</a> for more details.</li>
1258 <li><span class="fixed">cookieName</span>: Optionally specifies the name given to in-memory session cookies that are associated with this application. If ommitted, Shibboleth will generate a cookie name for you of the form _shibsession_<Application ID></li>
1259 <li><span class="fixed">cookieProps</span>: A string of additional Set-Cookie properties can be specified using this element which give the browser further instructions about cookie processing and use. Always begin with a semicolon to delineate from the session ID value.</li>
1260 <li><span class="fixed">lifetime</span>: Duration in seconds of the Shibboleth session; this does not affect the lifetime of application sessions initiated independently of Shibboleth. Defaults to 3600. If 0 is specified, sessions are infinite, subject to purging by the cache.</li>
1261 <li><span class="fixed">timeout</span>: If the duration in seconds elapses following the last request in a session, the session will be expired for inactivity and a new session must be initiated upon the next request. Defaults to 1800. If 0 is specified, there is no inactivity timeout</li>
1262 <li><span class="fixed">checkAddress</span>: If <span class="fixed">true</span> (the default), Shibboleth will check the browser's client address to insure that session cookies are issued and used by a consistent client address. In most circumstances, this should be enabled to help prevent attacks using stolen cookies, but this can cause problems for users behind proxies or NAT devices.</li>
1265 <dd class="attribute"><a name="confSHAR"><span class="fixed"><SHAR logger="<i>pathname</i>"></span></dd>
1266 <dd class="value">This is the container element for configuration information pertaining to the SHAR, the target component responsible for most attribute and session processing. Its single attribute, <span class="fixed">logger</span>, points to a Log4J-format property configuration file that controls SHAR logging behavior. It is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1267 <p>It must contain either a <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> element to listen to the Apache module on a UNIX domain socket or a <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> element to listen on a TCP port. Session caching must also be specified using a <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element to use in-memory session caching or a <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to backup session information in a MySQL database.</p></dd>
1269 <dd class="attribute"><a name="confShibbolethTargetConfig"><span class="fixed"><ShibbolethTargetConfig clockSkew="integer"></span></dd>
1270 <dd class="value">This is the root element for target configuration and must be present once and only once. It must always contain a <a href="#confSHAR"><span class="fixed">SHAR</span></a> element, a <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element, an <a href="#confApplications"><span class="fixed">Applications</span></a> element, one or more <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements, and optionally an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.
1271 <ul><li><span class="fixed">clockSkew</span>: Controls allowed clock skew in seconds between target and origin servers when evaluating times sent in messages. Defaults to 180, and should be as small as practical.</li>
1274 <dd class="attribute"><a name="confSHIRE"><span class="fixed"><SHIRE logger="<i>pathname</i>"></span></dd>
1275 <dd class="value">This is the container element for configuration information pertaining to the SHIRE, the part of the target that integrates into the web server environment. Its single attribute, <span class="fixed">logger</span>, points to a Log4J-format property configuration file that controls SHIRE logging behavior. It is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1276 <p>It may contain an <a href="#confImplementation"><span class="fixed">Implementation</span></a> element, within which configuration for the SHIRE which varies by platform will be specified.</p>
1277 <p>It may contain a <a href="#confRequestMapProvider"><span class="fixed">RequestMapProvider</span></a> element, which provides fine-grained control over aspects of target behavior at a host, path, or document level.</dd>
1279 <dd class="attribute"><a name="confSite"><span class="fixed"><Site <span class="mandatory">id="<i>INSTANCE_ID</i>" host="<i>fqdn</i>"</span>/></span></dd>
1280 <dd class="value">This element is placed in the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element to specify a mapping from individual instance ID's to respective vhost domain names.</dd>
1282 <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>
1283 <dd class="value">This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and <a href="#confListener"><span class="fixed">Listener</span></a> elements. It allows the SHAR to communicate with the web-server component using TCP.
1284 <ul><li class="mandatory"><span class="fixed">address</span>: Specifies the address of the listener.</li>
1285 <li class="mandatory"><span class="fixed">port</span>: Specifies the TCP port on which the SHAR will listen.</li>
1286 <li><span class="fixed">acl</span>: By default, the SHAR will only listen to requests from 127.0.0.1 (localhost). This should generally not be specified except in test environments.</li>
1289 <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>
1290 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to trust metadata either inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download periodically. This should be updated regularly; see <a href="#4.g.">section 4.g</a> for further details.
1291 <p>If an <a href="#confApplication"><span class="fixed">Application</span></a> does not include any <span class="fixed">TrustProvider</span> elements, the default set is used.</p>
1293 <dd class="attribute"><a name="confUnixListener"><span class="fixed"><UnixListener address="<i>pathname</i>"></span></dd>
1294 <dd class="value">Use this element to specify a UNIX domain socket located at the <span class="fixed">pathname</span> specified in the <span class="fixed">address</span> attribute at which the SHAR should listen for requests. This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and <a href="#confListener"><span class="fixed">Listener</span></a> elements. <span class="fixed">UnixListener</span> cannot be specified for Windows-based installations.</dd>
1297 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1299 <p>Shibboleth supports the dynamic generation of information in error pages
1300 referenced by <span class="fixed">shibboleth.xml</span>. The Shib Target
1301 employs a special Markup Language Processor to insert special tags into the
1302 generated HTML. The parser will read the error file looking for any tag that
1305 <p><span class="fixed"><shibmlp tag-name /></span> </p>
1307 <p>Shibboleth will replace <span class="fixed">tag-name</span> with the
1308 appropriate markup tag from the table below:</p>
1310 <dd class="attribute"><span class="fixed">supportContact</span></dd>
1311 <dd class="value">The value of the <span class="fixed">supportContact</span>
1312 for this web site.</dd>
1313 <dd class="attribute"><span class="fixed">logoLocation</span></dd>
1314 <dd class="value">The value of the <span class="fixed">logoLocation</span>
1315 for this web site. This is used to fill in the template error page only;
1316 if a custom error page is created, then the image may be linked to
1317 statically by the page itself.</dd>
1318 <dd class="attribute"><span class="fixed">requestURL</span></dd>
1319 <dd class="value">The user's requested URL.</dd>
1320 <dd class="attribute"><span class="fixed">errorType</span></dd>
1321 <dd class="value">The type of error.</dd>
1322 <dd class="attribute"><span class="fixed">errorText</span></dd>
1323 <dd class="value">The actual error message.</dd>
1324 <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1325 <dd class="value">A textual description of the error intended for human
1327 <dd class="attribute"><span class="fixed">originContactName</span></dd>
1328 <dd class="value">The contact name for the origin site provided by that
1329 site's metadata.</dd>
1330 <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1331 <dd class="value">The contact email address for the origin site provided
1332 by that site's metadata.</dd>
1333 <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1334 <dd class="value">The URL of an error handling page for the origin site
1335 provided by that site's metadata.</dd>
1337 <p>This configuration is only for Apache servers, and is only used by
1338 resources protected by Shibboleth. See <a href="#4.d.">section 4.d.</a></p>
1339 <p>Sample error templates for different kinds of errors are included in the
1340 Shibboleth distribution, and can be triggered by anything that will cause
1341 Shibboleth to be unable to make an authorization decision, including a bad
1342 sites file, certificate verification failures, or a skewed clock between
1344 <p><b>You should edit these templates, provide or remove style sheets and
1345 images, and otherwise customize these templates to suit the user experience
1346 you want your users to have when errors occur. The defaults are not likely
1347 to meet the needs of any site.</b></p>
1349 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1351 <p>The only target component that must have a private key and certificate is
1352 the SHAR. While the target server itself should support SSL in most cases
1353 for users, it is mandatory for the SHAR to authenticate when contacting an
1354 AA, and it must therefore be given a key and an SSL client certificate. It
1355 is permissible for the SHAR to use the same keypair and certificate used by
1356 the target web server itself, provided the certificate is signed by a CA
1357 accepted by the origin sites that will be queried for attributes.</p>
1358 <p>On Unix, we require that OpenSSL be installed to use Shibboleth. On
1359 Windows, OpenSSL libraries and the command line tool are included in the
1360 package and can be used directly, if not otherwise available.</p>
1361 <p>The certificate and key file location should be based on whether they
1362 will also be used for Apache. If they will be used as a server certificate
1363 as well, they should probably be in the Apache tree in the usual
1364 <span class="fixed">mod_ssl</span>-defined locations inside the Apache
1365 configuration folder., and the SHAR can read them from there. If the SHAR is
1366 not running as <span class="fixed">root</span>, permissions might need to be
1367 changed to allow this access. If the certificate and key will only be used
1368 for the SHAR, they can be put in the same folder with the
1369 <span class="fixed">shibboleth.xml</span> file and protected appropriately.</p>
1370 <p>Other web servers like IIS do not use the raw PEM format that Apache and
1371 Shibboleth can share, and therefore the components must generally use
1372 separate copies of the key and certificate if they are to be shared. Most
1373 other servers can export and/or import keys to and from PEM format or other
1374 formats that OpenSSL can convert. Refer to your server's documentation or
1375 ask for assistance from others who use it.</p>
1376 <p>The SHAR is assigned a key and a certificate using shibboleth.xml's
1377 <span class="fixed">certFile</span>, <span class="fixed">keyFile</span> and
1378 <span class="fixed">keyPass</span> settings, described in <a href="#4.a.">
1379 section 4.a.</a> These files must currently be in PEM format. OpenSSL
1380 commands to generate a new keypair and a certificate request are shown here,
1381 assuming 2048 bit RSA keys are to be used:</p>
1383 <p><span class="fixed">$ openssl genrsa -des3 -out ssl.key 2048<br>
1384 $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1386 <p>The signed certificate file returned by the CA should be usable directly,
1387 or can be converted to PEM format using the <span class="fixed">openssl x509</span>
1389 <p>If the key is to be shared with Apache, the web server's child processes,
1390 often running as <span class="fixed">nobody</span>, must be able to read
1391 them while the server is running, which may require permission changes.</p>
1392 <p>This particularly applies when sharing the key and certificate used by
1393 mod_ssl, which are only readable by root by default. The password, if any,
1394 must be placed in the <span class="fixed">shibboleth.xml</span> file, since
1395 the Apache module cannot prompt for it during initial startup as mod_ssl
1396 can. The issues surrounding how to securely obtain a key while running as
1397 <span class="fixed">nobody</span> may be addressed in a later release. Since
1398 the password will be stored in clear text in a frequently examined file, it
1399 is suggested to use a password not used elsewhere.</p>
1400 <p>Finally, the <span class="fixed">calist</span> command provides the SHAR
1401 with a set of CA roots to trust when validating AA server certificates. In
1402 all cases, the SHAR verifies that the certificate's Subject CN equals the
1403 AA's hostname, but the CA list restricts the accepted signers to those
1404 permitted by the SHAR. The parameter can be omitted to skip such validation,
1405 but this is not secure.</p>
1407 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1409 <p>Protection of web pages is primarily achieved through "mapping"
1410 attributes provided by an AA to a localized vocabulary for authorization
1411 rules. This was formerly accomplished in Apache with the <span class="fixed">
1412 ShibMapAttribute</span> command, but this has been replaced with additional
1413 features in the AAP syntax, described in <a href="#4.e.">section 4.e.</a>
1414 This applies to both Apache and IIS.</p>
1415 <p><b><u>IIS</u></b></p>
1416 <p>The IIS RM module supports the mapping of attributes via AAP files, but
1417 it does not support rule-based policies and therefore cannot protect static
1418 content at this time. In addition, all of the configuration settings are
1419 managed globally or per-site and are pulled from the <span class="fixed">
1420 shibboleth.xml</span> file, so there are no additional commands to document
1423 <p><b><u>Apache</u></b></p>
1424 <p>The Apache RM module provided can interpret AAP settings to map
1425 attributes to HTTP request headers and to <span class="fixed">Require</span>
1426 rules, permitting protecting of both static and dynamic content. The
1427 commands described here can appear in content-specific configuration blocks
1428 or <span class="fixed">.htaccess</span> files. They determine what content
1429 is to be protected, session policies, and static access control rules.</p>
1430 <p>Any of the typical ways of protecting content may be used (.htaccess,
1431 Directory, Location, Files, etc.). There are two ways to trigger Shibboleth
1432 authentication: specifying an <span class="fixed">AuthType</span> of
1433 <span class="fixed">shibboleth</span> to use Shibboleth directly, or using
1434 <span class="fixed">ShibBasicHijack</span> to process existing .htaccess
1435 files using Shibboleth instead. Support for authorization consists of
1436 mod_auth-style require directives, as well as support for mod_auth group
1438 <p>A complete list of the directives and their values is below:</p>
1440 <dd class="attribute"><span class="fixed">AuthType <string></span></dd>
1441 <dd class="value">Use <span class="fixed">shibboleth</span> for direct
1442 invocation, or <span class="fixed">Basic</span> plus the
1443 <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1444 <dd class="attribute"><span class="fixed">ShibSSLOnly <on/off></span></dd>
1445 <dd class="value">Controls whether Shibboleth will reject non-SSL
1446 requests for resources from clients. Defaults to <span class="fixed">off</span>.</dd>
1447 <dd class="attribute"><span class="fixed">ShibBasicHijack <on/off></span></dd>
1448 <dd class="value">Controls whether Shibboleth should or should not
1449 ignore requests with <span class="fixed">AuthType Basic</span>. Defaults
1450 to <span class="fixed">off</span>.</dd>
1451 <dd class="attribute"><span class="fixed">ShibExportAssertion <on/off></span></dd>
1452 <dd class="value">Controls whether the SAML attribute assertion provided
1453 by the AA is exported in a base64-encoded HTTP header,
1454 <span class="fixed">Shib-Attributes</span>. Defaults to
1455 <span class="fixed">off</span>. While this does require parsing the raw
1456 XML, it also permits an application to see attributes that may have been
1457 filtered by an AAP, or to forward the SAML assertion to a third party.</dd>
1458 <dd class="attribute"><span class="fixed">ShibAuthLifetime <seconds></span></dd>
1459 <dd class="value">If set, sessions are always terminated after the
1460 specified number of seconds, resulting in a new redirect and request for
1461 authentication, just as if a new request without a session is received.
1462 Defaults to infinite.</dd>
1463 <dd class="attribute"><span class="fixed">ShibAuthTimeout <seconds></span></dd>
1464 <dd class="value">If set, sessions are always terminated after the
1465 specified number of seconds of inactivity (defined as no requests
1466 received in that session), resulting in a new redirect and request for
1467 authentication, just as if a new request without a session is received.
1468 Defaults to infinite.</dd>
1469 <dd class="attribute"><span class="fixed">AuthGroupFile <pathname></span></dd>
1470 <dd class="value">Same as mod_auth; collects values found in REMOTE_USER
1471 into a named group for access control. An attribute must be mapped to
1472 REMOTE_USER for this to work. Note that mod_auth will not support group
1473 files when mod_shibrm is loaded, since they share the same command.
1474 <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is
1475 implemented</a> by placing a <span class="fixed">.htaccess</span> file
1476 that references a group file stored at <span class="fixed">/pathname</span>:</p>
1478 <p><span class="fixed">AuthGroupFile /pathname<br>
1479 require group workgroup</span></p>
1482 <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1483 AuthGroupFile</a> used by Shibboleth might resemble:<br>
1484 <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1486 <dd class="attribute"><span class="fixed">Require <string></span></dd>
1487 <dd class="value">Enforce authorization using one of the following
1488 methods.<ul type="circle">
1489 <li><span class="fixed">valid-user</span><blockquote>
1490 <p>Any Shibboleth user from a trusted origin site is accepted,
1491 even if no actual attributes are received. This is a very
1492 minimal kind of policy, but is useful for testing or for
1493 deferring real policy to an application.</p>
1496 <p><span class="fixed">user</span></p>
1498 <p>A space-delimited list of values, such as from the
1499 <span class="fixed">
1500 urn:mace:dir:attribute-def:eduPersonPrincipalName</span>
1501 attribute. Actually, any attribute can be mapped to REMOTE_USER,
1502 even if this doesn't always make sense.</p>
1505 <li><span class="fixed">group</span><blockquote>
1506 <p>A space-delimited list of group names defined within
1507 <span class="fixed">AuthGroupFile</span> files, again provided
1508 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1511 <li><span class="fixed"><alias></span><blockquote>
1512 <p>An arbitrary rule name that matches an Alias defined in an
1513 AAP file. The rule value is a space-delimited list of attribute
1514 values, whose format depends on the attribute in question (e.g.
1515 an affiliation rule might look like:</p>
1516 <p><span class="fixed">require affiliation staff@osu.edu
1517 faculty@mit.edu</span></p>
1521 <p>Additionally, for <span class="fixed">user</span> and
1522 <span class="fixed"><alias></span>-based rules, if a tilde character is
1523 placed immediately following <span class="fixed">user</span> or
1524 <span class="fixed"><alias></span>, the expressions that follow are
1525 treated as regular expressions. The syntax supported is generally based
1526 on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1527 XML Schema</a>. This specification borders on unreadable, but the syntax
1528 is generally Perl-like. Expressions should generally be "anchored" with
1529 the ^ and $ symbols to insure mid-string matches don't cause false
1531 <p>For example, the rule:<br>
1532 <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1533 </span>would evaluate to allowing anyone with an <span class="fixed">
1534 affiliation</span> of <span class="fixed">member</span> from a .edu
1538 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1540 <p>Shibboleth allows a user and a site to release a varying set of
1541 attributes to a destination site, and does not impose restrictions on the
1542 kinds of attribute information provided by an AA. Target implementations
1543 must be prepared to examine the attributes they receive and filter them
1544 based on policies about what information to permit an origin site to assert
1545 about its users.</p>
1546 <p>Attribute acceptance is the process of defining acceptable attributes and
1547 filtering attribute values before passing them on to a resource manager,
1548 such as the <span class="fixed">mod_shibrm</span> module. Data blocked by
1549 AAP filters will not be passed to the CGI environment or used when enforcing
1550 <span class="fixed">.htaccess</span> rules. Note that the attribute
1551 assertion exported to the <span class="fixed">Shib-Attributes</span> header
1553 <p>The Shibboleth implementation supports Scoped and Simple attributes and
1554 filtering policies for different kinds of attributes, and is potentially
1555 extensible to more complex attributes in the future. An attribute is
1556 considered Scoped if the XML representation of its values contains a "Scope"
1557 attribute. As of 1.1, this is detected at runtime and requires no
1558 configuration in advance.</p>
1559 <p><b>An essential part of the Shibboleth trust fabric is ensuring that
1560 sites only assert attributes for domains for which they are considered
1561 authoritative by the target. Typically, this means that Brown University
1562 will be trusted to assert attributes only scoped to <span class="fixed">
1563 brown.edu</span>. Unless there are very specific circumstances requiring
1564 this restriction be removed, it is strongly encouraged that such policies be
1568 <p>Scoped attributes are a special kind of attribute whose values are a
1569 combination of a <span class="fixed">value</span> and a
1570 <span class="fixed">scope</span>, or <span class="fixed">context</span>
1571 for the value. An example is <span class="fixed">
1572 eduPersonScopedAffiliation</span>, which adds a scope to the defined set
1573 of <span class="fixed">eduPersonAffiliation</span> values, such as
1574 <span class="fixed">student</span>, <span class="fixed">member</span>,
1575 or <span class="fixed">faculty</span>. Scopes are expressed as DNS
1576 domains and subdomains.</p>
1577 <p>Any <span class="fixed">scoped</span> attribute can be scoped only to
1578 the origin site's permitted domains. These domains are listed in the
1579 site metadata that provides policy information to the system. Domains
1580 can be explicit or regular expressions, and can be changed by a target
1581 to meet its needs. Targets can also override the rules specified for the
1582 site in their own AAPs, choosing to accept additional scopes or deny
1583 scopes that would ordinarily be accepted based on metadata provided by a
1584 federation. Thus, attribute acceptance processing for
1585 <span class="fixed">scoped</span> attributes is based on site metadata
1586 and target-specified overrides in addition to the mechanism described
1587 below for <span class="fixed">simple</span> attributes.</p>
1588 <p>Scope rules specified in an AAP are additive with any domains
1589 permitted by site metadata, and the rules are applied by first looking
1590 for an applicable denial rule, and then looking at site metadata and any
1591 applicable site rules for an accept rule.</p>
1595 <p>Simple attributes are attributes whose value is expressed in XML as a
1596 Text node; that is, the value is just a string. Multiple values are
1597 permitted. <span class="fixed">eduPersonEntitlement</span>, in which the
1598 values are URIs, is one example of a simple attribute.</p>
1599 <p>Both Simple and Scoped attribute acceptance is controlled with an
1600 external policy file written in XML. The schema for the file is
1601 described by the <span class="fixed">shibboleth.xsd</span> schema, and
1602 an example file is included, <span class="fixed">AAP.xml</span>. It is
1603 mandatory to supply such a file, because attributes are recognized based
1604 on their presence in this file, and not by separate configuration
1605 processes. Only by listing an attribute in the file will it be accepted
1606 and processed by the RM.</p>
1607 <p>The policy is a default-deny algorithm that requires permissible
1608 attributes and values be listed explicitly. That is, an empty file
1609 permits nothing. Each attribute to be supported must be listed in the
1610 file by name in an <span class="fixed"><AttributeRule></span>. Each such
1611 rule is a collection of <span class="fixed"><SiteRule></span> elements
1612 along with an optional <span class="fixed"><AnySite></span> default
1613 rule. In turn each site rule is a set of <span class="fixed"><Value></span>
1614 rules that specify matches to permit, either literal or regular
1615 expressions, or a wildcarded <span class="fixed"><AnyValue></span>
1616 default rule, which is equivalent to a single regular expression rule
1617 allowing anything.</p>
1619 <p>A syntax summary follows:</p>
1621 <p><span class="fixed"><AttributeAcceptancePolicy</span></p>
1623 <p>The top level element in the file.</p>
1625 <p><span class="fixed"><AttributeRule<br>
1626 Name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"<br>
1627 Header="Shib-EP-Affiliation" Alias="affiliation"></span></p>
1629 <p>Specifies a rule for an attribute, named by its URI. The
1630 following XML attributes can be supplied:</p>
1631 <table border="1" cellpadding="5" cellspacing="5">
1633 <td><span class="fixed">Name</span></td>
1634 <td>The name of the Shibboleth attribute, usually a URI.
1635 This is the only required XML attribute.</td>
1638 <td><span class="fixed">Namespace</span></td>
1639 <td>If the attribute's name includes a SAML namespace,
1640 supply it here. Normally this is unused.</td>
1643 <td><span class="fixed">Header</span></td>
1644 <td>The HTTP request header to map the attribute's values
1648 <td><span class="fixed">Alias</span></td>
1649 <td>A short name for the attribute, determines the name of
1650 the Apache <span class="fixed">Requires</span> rule.</td>
1654 <p><span class="fixed"><AnySite></span></p>
1656 <p>Specifies a rule that always applies to the attribute, regardless
1657 of the asserting AA.</p>
1659 <p><span class="fixed"><SiteRule Name="host.domain.com"></span></p>
1661 <p>A rule that applies to the origin site AA corresponding to the
1664 <p><span class="fixed"><Scope Accept="true|false" Type="type"></span></p>
1666 <p>Specifies a value to accept or deny, either directly using
1667 <span class="fixed">type</span> <span class="fixed">literal</span>,
1668 or using a set of matching expressions as <span class="fixed">type</span>
1669 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1670 is the default if <span class="fixed">Type</span> is not specified.
1671 Accept defaults to "true">.</p>
1673 <p><span class="fixed"><AnyValue></span></p>
1675 <p>Specifies a rule that always applies to the attribute and site,
1676 regardless of the value(s).</p>
1678 <p><span class="fixed"><Value Type="type"></span></p>
1680 <p>Specifies a value to permit, either directly using
1681 <span class="fixed">type</span> <span class="fixed">literal</span>,
1682 or using a set of matching expressions as <span class="fixed">type</span>
1683 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1684 is the default if <span class="fixed">Type</span> is not specified.</p>
1687 <p>The regular expression syntax is a subset of the usual Perl and Unix
1688 syntaxes that is described in the XML Schema specification by the W3C. Most
1689 typical expressions should work. Be sure to anchor them using
1690 <span class="fixed">^</span> and <span class="fixed">$</span> to avoid
1691 unintentional matches midstring.</p>
1693 <h4><a name="4.f."></a>4.f. Using Attributes in Applications</h4>
1695 <p>Apart from the simple RM functionality provided, attribute information
1696 may be made available directly to applications via the standard practice of
1697 creating custom HTTP request headers before passing control to the
1698 application. Applications should make no assumption about the presence of
1699 specific attributes for their use unless they have intimate knowledge of the
1700 attribute release policies in place.</p>
1701 <p>The AAP metadata controls this interface, and maps a Shibboleth attribute
1702 to a header name, such as <span class="fixed">Shib-EP-Affiliation</span>.
1703 Using that example, any values of the mapped attribute will be placed in
1704 that header, delimited by semicolons. An application that uses a CGI-like
1705 syntax to access the header will find the values in the <span class="fixed">
1706 HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any
1707 header, to drive legacy applications that expect information in a particular
1709 <p>The <span class="fixed">REMOTE_USER</span> variable is a special case
1710 that is generally populated automatically by the web server based on an
1711 internal piece of data that represents the current <span class="fixed">
1712 username</span>. Unlike many authentication modules, Shibboleth does not
1713 guarantee that <span class="fixed">REMOTE_USER</span> will have any value,
1714 because users may remain anonymous in many cases. If it does have a value,
1715 it is set solely because of an AAP file that maps an attribute to that
1716 header name. For many purposes, the <span class="fixed">
1717 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be
1718 mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be
1719 provided by the AA, and <span class="fixed">REMOTE_USER</span> might still
1721 <p>The <span class="fixed">Shib-Origin-Site</span> variable will contain the
1722 unique name/identifier of the origin site of the user. Some applications may
1723 use this to lookup additional policy or application data. It normally takes
1724 the form of a URI but could be any string in some deployments.</p>
1725 <p>Finally, configuration may instruct the web server to place the entire
1726 XML message containing the SAML attribute information from the AA into a
1727 base64-encoded header called <span class="fixed">Shib-Attributes</span>.
1728 This is a raw interface that provides an application with the entire AA
1729 response, and is not a filtered view based on any attribute acceptance rules
1730 or even based on what attributes are recognized by the target. What was sent
1731 is what you see.</p>
1733 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
1735 <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span>
1736 in the <span class="fixed">/opt/shibboleth/bin</span> folder of the
1737 distribution to maintain metadata files referenced by <span class="fixed">
1738 shibboleth.xml</span>. It will return 0 on success and a negative number on
1739 failure and log errors to <span class="fixed">stderr</span>. If the data in
1740 the new metadata file is bad or the signature is invalid, the existing copy
1741 is kept. The SHAR and SHIRE stat all metadata files each time the data is
1742 used, allowing them to detect and utilize updates in real-time operation.</p>
1743 <p><span class="fixed">siterefresh</span> takes the following command-line
1746 <dd class="attribute"><span class="fixed">--url <URL></span> </dd>
1747 <dd class="value">Specifies the <span class="fixed">URL</span> of the
1748 remote metadata file with which to update the local file.</dd>
1749 <dd class="attribute"><span class="fixed">--out <pathname></span> </dd>
1750 <dd class="value">Specifies the local file to which to write the new
1752 <dd class="attributeopt"><span class="fixed">--cert <pathname></span>
1754 <dd class="valueopt">Specifies the location of a certificate stored in
1755 <span class="fixed">PEM</span> format used to validate the signature of
1756 the metadata file. Since much of Shibboleth's security flows from
1757 metadata files, this option is highly recommended, and the certificate
1758 used should be verified independently.</dd>
1759 <dd class="attributeopt"><span class="fixed">--schema <pathname></span>
1761 <dd class="valueopt">Optionally defines a base path for schemas to use
1762 when validating the file. Defaults to <span class="fixed">
1763 /opt/shibboleth/etc/shibboleth/</span>.</dd>
1765 <p>A complete command issued to <span class="fixed">siterefresh</span> might
1768 <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out sites.xml
1769 --cert internet2.pem \<br>
1770 --url http://wayf.internet2.edu/InQueue/sites.xml </span></p>
1772 <p>It is recommended that similar commands be added to a <span class="fixed">
1773 crontab</span> to keep the site and trust files refreshed. AAP files tend to
1774 be site-specific, but could be maintained and distributed centrally. If the
1775 command is invoked in a script that writes the file to a new location and
1776 compares it with the old contents before overwriting the original, the
1777 command could be run very often without impacting target operations,
1778 providing a high degree of currency in case sites become compromised.</p>
1780 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
1782 <p>Shibboleth includes a useful plugin that extends the default memory cache
1783 for storing session data in the SHAR with a backing cache using an embedded
1784 MySQL database. In most distributions, it is enabled by default. The plugin
1785 can be found in the <span class="fixed">/opt/shibboleth/libexec</span>
1786 folder, and is loaded as an extension library using the <span class="fixed">
1787 [extensions:saml]</span> section of <span class="fixed">shibboleth.xml</span>.
1788 The following configuration options are available:</p>
1790 <dd class="attributeopt"><span class="fixed">mysql-cache-timeout =
1791 <seconds> (in [shar] section)</span></dd>
1792 <dd class="valueopt">Specifies the duration in <span class="fixed">
1793 seconds</span> that must elapse between user accesses before that user's
1794 session is purged from the persistent cache. Defaults to
1795 <span class="fixed">28800</span> seconds, or 8 hours. This should
1796 generally be longer than the associated server's settings for session
1797 lifetime and timeout, and the memory cache's timeout.</dd>
1798 <dd class="attributeopt"><span class="fixed"><MySQL Arguments>
1799 (one per line in [mysql] section)</span></dd>
1800 <dd class="valueopt">To pass arguments to the MySQL engine, create
1801 argument lines in the <span class="fixed">[mysql]</span> section in the
1803 <blockquote class="fixed">
1804 <p>arg1=<argument><br>
1805 arg2=<argument><br>
1808 <p>Important arguments you'll find by default include: </p>
1809 <blockquote class="fixed">
1810 <p>arg1 = --language=/opt/shibboleth/share/english<br>
1811 arg2 = --datadir=/opt/shibboleth/data</p>
1813 <p>which set the message file path and the location of the cache's
1814 database files respectively. Make sure the data directory exists before
1815 starting the SHAR if you change this path.</dd>
1821 <h3><a name="5."></a>5. Troubleshooting</h3>
1822 <p>This section provides basic information about testing Shibboleth targets.
1823 This information is not intended to be comprehensive, but instead rudimentary
1824 guidelines for basic configuration tests and problems. For more detailed
1825 information or answers to specific problems not addressed in this section,
1826 please mail <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
1827 with a thorough description of errors and configurations used.</p>
1828 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
1830 <p>The target may be tested by generating a folder with very basic access
1831 controls on it, and accessing it using a web browser. Place a simple webpage
1832 such as <span class="fixed">index.html</span> in <span class="fixed">
1833 /secure/</span>. Then, add the following lines to <span class="fixed">
1834 httpd.conf</span>, which should be removed when testing is over:</p>
1836 <p><span class="fixed"># Configure a test directory<br>
1837 <Location /secure><br>
1838 AuthType shibboleth<br>
1839 require valid-user<br>
1841 # Per-directory SHIRE Configuration<br>
1842 #ShibBasicHijack On<br>
1844 # RM Configuration<br>
1845 #AuthGroupFile /foo<br>
1846 #ShibRequireSession On<br>
1847 #ShibExportAssertion On<br>
1848 </Location><br>
1851 <p><b>For information regarding specific error messages that may be
1852 generated if the target does not work successfully, please refer to section
1853 <a href="#5.b.">5.b.</a>, or write
1854 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.</b></p>
1856 <h4><a name="5.b."></a>5.b. Common Problems</h4>
1858 <p>A knowledge base is being developed in the
1859 <a href="https://umdrive.memphis.edu/wassa/public/shib.faq/shibboleth-faq.html">
1860 Shibboleth Deployer's FAQ</a>. Please mail
1861 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
1862 with any additional questions or problems encountered that are not answered
1863 by this basic guide.</p>