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>
180 <h4><a href="#2."><font color="black">Planning</font></a></h4>
182 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
183 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
184 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
185 <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
186 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
187 <li><a href="#2.f."><font color="#000000">Attribute Acceptance Policies</font></a></li>
188 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
189 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
190 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
194 <h4><a href="#3."><font color="black">Installation</font></a></h4>
196 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
197 <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
198 <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
199 <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
200 <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
204 <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
206 <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
207 shibboleth.xml</span></font></a></li>
208 <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
209 <li><a href="#4.c."><font color="black">Key Generation and Certificate
210 Installation</font></a></li>
211 <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
212 <li><a href="#4.e."><font color="black">Defining Attributes and
213 Acceptance Policies</font></a></li>
214 <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
215 <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
216 <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
220 <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
222 <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
223 <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
232 <h3><a name="1."></a>1. Shibboleth Overview</h3>
233 <p>Shibboleth is a system designed to exchange attributes across realms for the
234 primary purpose of authorization. It provides a secure framework for one
235 organization to transmit attributes about a web-browsing individual across
236 security domains to another institution. In the primary usage case, when a user
237 attempts to access a resource at a remote domain, the user's own home security
238 domain can send certain information about that user to the target site in a
239 trusted exchange. These attributes can then be used by the resource to help
240 determine whether to grant the user access to the resource. The user may have
241 the ability to decide whether to release specific attributes to certain sites by
242 specifying personal Attribute Release Policies (ARP's), effectively preserving
243 privacy while still granting access based on trusted information.</p>
244 <p>When a user first tries to access a resource protected by Shibboleth, they
245 are redirected to a service which asks the user to specify the organization from
246 which they want to authenticate. If the user has not yet locally authenticated
247 to a WebISO service, the user will then be redirected to their home
248 institution's authentication system. After the user authenticates, the
249 Shibboleth components at the local institution will generate a temporary
250 reference to the user, known as a handle, for the individual and send this to
251 the target site. The target site can then use the handle to ask for attributes
252 about this individual. Based on these attributes, the target can decide whether
253 or not to grant access to the resource. The user may then be allowed to access
254 the requested materials.</p>
255 <p>There are several controls on privacy in Shibboleth, and mechanisms are
256 provided to allow users to determine exactly which information about them is
257 released. A user's actual identity isn't necessary for many access control
258 decisions, so privacy often is needlessly compromised. Instead, the resource
259 often utilizes other attributes such as faculty member or member of a certain
260 class. While these are commonly determined using the identity of the user,
261 Shibboleth provides a way to mutually refer to the same principal without
262 revealing that principal's identity. Because the user is initially known to the
263 target site only by a randomly generated temporary handle, if sufficient, the
264 target site might know no more about the user than that the user is a member of
265 the origin organization. This handle should never be used to decide whether or
266 not to grant access, and is intended only as a temporary reference for
267 requesting attributes.</p>
268 <h4><a name="1.a."></a>1.a. Origin</h4>
270 <p>There are four primary components to the origin side in Shibboleth: the
271 Attribute Authority (AA), the Handle Service (HS), the directory service,
272 and the local sign-on system (SSO). The AA and HS are provided with
273 Shibboleth, and an open-source WebISO solution Pubcookie is also supplied;
274 the directory is provided by the origin site. Shibboleth is able to
275 interface with a directory exporting an LDAP interface or a SQL database
276 containing user attributes, and is designed such that programming interfaces
277 to other repositories should be readily implemented. Shibboleth relies on
278 standard web server mechanisms to trigger local authentication. A .htaccess
279 file can be easily used to trigger either the local WebISO system or the web
280 server's own Basic Auth mechanism, which will likely utilize an enterprise
281 authentication system, such as Kerberos.</p>
282 <p>From the origin site's point of view, the first contact will be the
283 redirection of a user to the handle service, which will then consult the SSO
284 system to determine whether the user has already been authenticated. If not,
285 then the browser user will be asked to authenticate, and then sent back to
286 the target URL with a handle bundled in an attribute assertion. Next, a
287 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
288 which will include the previously mentioned handle. The AA then consults the
289 ARP's for the directory entry corresponding to the handle, queries the
290 directory for these attributes, and releases to the SHAR all attributes the
291 SHAR is entitled to know about that user.</p>
293 <h4><a name="1.b."></a>1.b. Target</h4>
295 <p>There are three primary components to the target side in Shibboleth: the
296 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
297 Requester (SHAR), and the resource manager (RM). An implementation of each
298 of these is included in the standard Shibboleth distribution. These
299 components are intended to run on the same web server.</p>
300 <p>From the target's point of view, a browser will hit the RM with a request
301 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
302 in, which will use the WAYF to acquire the name of a handle service to ask
303 about the user. The handle service (HS) will then reply with a SAML
304 authentication assertion containing a handle, which the SHIRE then hands off
305 to the SHAR. The SHAR uses the handle and the supplied address of the
306 corresponding attribute authority (AA) to request all attributes it is
307 allowed to know about the handle. The SHAR performs some basic validation
308 and analysis based on attribute acceptance policies (AAP's). These
309 attributes are then handed off to the RM, which is responsible for using
310 these attributes to decide whether to grant access.</p>
312 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
314 <p>The WAYF service can be either outsourced and operated by a federation or
315 deployed as part of the SHIRE. It is responsible for allowing a user to
316 associate themself with an institution of their specification, then
317 redirecting the user to the known address for the handle service of that
320 <h4><a name="1.d."></a>1.d. Federations</h4>
322 <p>A federation is one way to provide part of the underlying trust required
323 for function of the Shibboleth architecture. A federation in the context of
324 Shibboleth is a group of organizations(universities, corporations, content
325 providers, etc.) who agree to exchange attributes using the SAML/Shibboleth
326 protocols and abide by a common set of policies and practices. In so doing,
327 they must implicitly or explicitly agree to a common set of guidelines.
328 Joining a federation is not explicitly necessary for operation of
329 Shibboleth, but it dramatically expands the number of targets and origins
330 that can interact without defining bilateral agreements between all these
332 <p>A federation can be created in a variety of formats and trust models, but
333 to support Shibboleth, it must provide a certain set of services to
334 federation members. It needs to supply a registry to process applications to
335 the federation and distribute membership information to the origin and
336 target sites. This must include distribution of the PKI components necessary
337 for trust between origins and targets. There also needs to be a set of
338 agreements and best practices defined by the federation governing the
339 exchange, use, and population of attributes before and after transit, and
340 there should be a way to find information on local authentication and
341 authorization practices for federation members.</p>
344 <h3><a name="2."></a>2. Planning</h3>
345 <p>There are several essential elements that must be present in the environment
346 to ensure Shibboleth functions well, both political and technical. Shibboleth
347 currently runs on a specific range of platforms and web server environments. The
348 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations
349 and requirements for a successful implementation of a Shibboleth target.</p>
350 <h4><a name="2.a."></a>2.a. Requirements</h4>
352 <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and
353 Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a
354 separate SHAR process. The plugins use the Sun/ONC RPC mechanism to communicate
355 with the SHAR over Unix domain or TCP sockets. The target's web servers must
356 be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a>
357 1.3+, 2.0+, or Microsoft IIS 4.0+ More precise technical
358 details are discussed in <a href="#3.a.">3.a</a>.</p>
360 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
362 <p>While it is not necessary for a target or origin to join a federation,
363 doing so greatly facilitates the implementation of multilateral trust
364 relationships. Each federation will have a different application process.</p>
365 <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or
366 the Shibboleth v1.0 architectural document.</p>
367 <p>For testing in a private environment, Shibboleth comes with a default
368 configuration that demonstrates how to implement a local peered agreement
369 and supports testing both origin and target on the same box using localhost
370 URLs. The sample key and certificate is for ease of testing only, and should
371 always be replaced for real world use.</p>
373 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
375 <p>Shibboleth's protocols and software have been extensively engineered to
376 provide protection against many attacks. However, the most secure protocol
377 can be compromised if it is placed in an insecure environment. To ensure
378 Shibboleth is as secure as possible, there are several recommended security
379 precautions which should be in place at local sites.</p>
381 <li>SSL use is optional for target sites, but should be used if at all
382 possible, at least in the processing of incoming sessions (called the
383 SHIRE URL or assertion consumer service). Federation guidelines should
384 be considered when determining whether to implement SSL, and, in
385 general, SSL should be used for interactions with client machines to
386 provide the necessary authentication and encryption to ensure protection
387 from man-in-the-middle attacks. It is strongly suggested that all
388 password traffic or similarly sensitive data should be SSL-protected.
389 Assessment of the risk tradeoff against possible performance degradation
390 should be performed for all applications.</li>
391 <li>Many other attacks can be made on the several redirection steps that
392 Shibboleth takes to complete attribute transfer. The best protection
393 against this is safeguarding the WAYF service and ensuring that rogue
394 targets and origins are not used, generally by development of the trust
395 model underneath Shibboleth. Shibboleth also leverages DNS for security,
396 which is not uncommon, but attacks concerning domain name lookups
397 should be considered.</li>
398 <li>Information regarding origin users is generally provided by the
399 authoritative enterprise directory, and the acceptance of requests from
400 target applications can be carefully restricted to ensure that all
401 requests the SHAR performs are authorized and all information the origin
402 provides is accurate. Use of plaintext passwords is strongly advised
404 <li>Server platforms should be properly secured, commensurate with the
405 level that would be expected for an organization's other security
406 services, and cookie stores on client machines should be well protected.</li>
409 <h4><a name="2.d."></a>2.d. Server Certs</h4>
411 <p>In the Shibboleth architecture, the SHAR, HS, and AA must all have
412 various client and/or server certificates for use in signing assertions and
413 creating SSL channels. These should be issued by a commonly accepted CA,
414 which may be stipulated by your federation. After understanding the CA's
415 acceptible to your federations, consult chapter <a href="#4.c.">4.c</a> for
416 information on certificate and key generation.</p>
418 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
420 <p>The Attribute Authority maintains a set of rules called Attribute Release
421 Policies (ARP's) that define which attributes are released to which targets.
422 When a browser user tries to access a resource, the SHAR asks the origin
423 site AA to release all the attributes it is allowed to know, possibly
424 restricted to a specifically desired subset. The SHAR provides a client
425 certificate with its request (assuming SSL is used) so the AA can further
426 refine the information the SHAR is allowed to know. The AA
427 processes this request using all applicable ARP's, determines which
428 attributes and values it will release, and then obtains the values actually
429 associated with the browser user. The AA sends these attributes and values
430 back to the SHAR.</p>
431 <p>Targets should work together with expected origin sites to ensure that
432 the sets of attributes that both sites expect to correspond using are
435 <h4><a name="2.f."></a>2.f. Attribute Acceptance Policies</h4>
437 <p>When a target receives a set of attributes, it must evaluate them in the
438 context of the Attribute Authority that is providing them, to assess their
439 "reasonableness". For example, if the value of an attribute is expected to
440 be from a small set of enumerated choices, the value should be compared
441 against that list. If a particular attribute or value is only trusted when
442 asserted by specific origins, that too should be checked.</p>
443 <p>Targets are configured to accept specific attributes that they understand
444 and care about, and are also configured with the rules to apply before
445 accepting the attributes for use by the RM or an application. Attributes and
446 values that don't meet the target's requirements are filtered out. The set
447 of configuration rules to make these decisions is called an Attribute
448 Acceptance Policy (AAP).</p>
450 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
452 <p>A primary Shibboleth design consideration was to require very little or
453 no modification to client machines. The only requirement is that a browser
454 is used which supports cookies, redirection and SSL. Browser users will have
455 to perform an additional click to submit the authentication assertion if
456 JavaScript is not functional.</p>
458 <h4><a name="2.h."></a>2.h. Clocks</h4>
460 <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should be run on all
461 web servers. Shibboleth employs a short assertion acceptance window to protect
462 against replay attacks. Because of this, any significant degree of clock
463 skew can hinder the ability of users to access sites successfully.</p>
465 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
467 <p>Especially for higher education, there are a handful of laws enacted
468 which may have important ramifications on the disclosure of personal
469 information and attributes. Since Shibboleth does not necessarily need to
470 transmit identity, it is an ideal solution for many higher education
471 situations. Nevertheless, all parties within the United States of America
472 are strongly advised to consult the
473 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
474 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
475 legislation before deploying Shibboleth.</p>
480 <h3><a name="3."></a>3. Installation</h3>
481 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
482 <p>The Shibboleth project makes binary packages available only for Windows,
483 that are precompiled against recent releases of various required libraries such
484 as OpenSSL. Binaries for other platforms may be available on a limited or ad hoc
485 basis. It is highly advisable to build from source when using Shibboleth in
486 a production environment in order to permit patching or updating of packages as
487 security holes and bugs are fixed. Building from source is necessary to give you
488 complete control over your deployment platform. The binary packages represent a
489 snapshot in time only. To build from source, see the <span class="fixed">
490 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source
492 <p>The software requirements listed correspond to the binary distribution. In
493 general, source builds should work against all recent versions of the operating
494 systems and software dependencies listed below. For specific questions, inquire
495 to the support mailing list, or give it a try. Note that OpenSSL releases
496 frequent security updates; the version listed may not be the most current, but
497 most minor "letter" updates should be usable.</p>
499 <p><b>General Requirements and Notes:</b></p>
501 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.x</a>
503 <p>Apache 1.3.x must be compiled with mod_so for DSO module support, and
504 should include SSL support (preferably using <span class="fixed">mod_ssl</span>),
505 and EAPI support (which <span class="fixed">mod_ssl</span> requires and provides).</p>
506 <p><b>Portions of the <span class="fixed">libphp4</span> Apache
507 module are written in C++, as is Shibboleth. There is a known
508 conflict between the PHP extensions <span class="fixed">libpspell.so</span>
509 and <span class="fixed">libsablot.so</span> which will manifest
510 itself as segmentation faults when starting Apache. If a site wants
511 to use <span class="fixed">libphp4.so</span> and Shibboleth at the same time,
512 then one of the following may be done:</b>
514 <li>Remove the options <span class="fixed">--with-pspell</span>
515 and <span class="fixed">--with-xslt-sablot</span> from PHP's
517 <li>Rebuild these two modules using the same version of GCC that
518 was used to compile Shibboleth.</li>
522 <li><a href="http://www.apache.org/dist/httpd/">Apache 2.0.x</a>
524 <p>Apache 2.0.x must be compiled with mod_so for DSO module support, and
525 should include SSL support which is available but not included by default.
526 See also the note about PHP above.</p>
527 <p>At the time of writing, an incompatibility exists between Shibboleth
528 and <span class="fixed">mod_cgi</span> that causes forked CGI child processes
529 to fail. The newer <span class="fixed">mod_cgid</span> provided for use with
530 the multi-threaded worker MPM works fine and is suggested as a work-around
531 even if running in prefork mode.</p>
536 <p>When installing under Windows 2003, if the server is not in a
537 domain before installing IIS 6, there may be issues surrounding
538 permissions on directories because of new restrictions on IIS
539 extensions accessing files.</p>
542 <li><a href="http://www.openssl.org">OpenSSL</a>
544 <p>Verions 0.9.6 and 0.9.7 are both supported, but 0.9.7 should be used
545 if possible, as support for 0.9.6 may be dropped in a future release.
546 Support for threads and shared libraries <b>must</b> be included during
547 configuration using the <i>threads</i> and <i>shared</i> options.</p>
550 <p>Most other required libraries are either easy to update or not found
551 on typical systems. See the <span class="fixed">INSTALL.txt</span> files
552 in the OpenSAML and Shibboleth source distributions for specific requirements
553 of a given release. The important requirements are for pthreads support and
554 shared libraries on Unix platforms. Without both, building will be hard and
555 stability unlikely.</p>
557 <p><b>Operating System Specific Notes:</b></p>
559 <li>Windows NT/2000/XP/2003
562 <p>Any Apache modules used, and Apache itself, must be compiled
563 with the Microsoft DLL-based runtime, selected by compiling with
567 <p>The installer will prompt for an install path, change default
568 configuration files as appropriate for Windows, and set various
569 environment variables for you. A default SHAR service can also
570 be installed, or you can install it manually using the
571 instructions in this guide.</p>
572 <p>Note that debug/symbol versions of the libraries and software
573 are included, and may be used by appending "debug" to the
574 Shibboleth library path and using the corresponding modules and
575 binaries. If you do so, be aware that Apache and other modules
576 must also be compiled with Microsoft's debug runtime (via the /MDd
577 compiler option). In most cases, you can safely ignore or even
578 delete the debug versions.</p>
582 <li>RedHat Linux 7.2,7.3:
585 <p>The most recent Red Hat RPM (1.3.27-2 as of this writing) is sufficient for
586 use with Shibboleth. You can use the older version of OpenSSL included, for this
587 release, but be advised this may change in the future.</p>
590 <p>The version of GCC that comes with this system is too old to build Shibboleth.
591 Special update RPMs are available for GCC 3.04 that will work provided you
592 configure packages with CC and CXX set to gcc3 and g++3 respectively. Newer
593 GCC versions also work but may require a glibc upgrade and necessitate a lot
594 of unrelated package updates.</p>
598 <li>RedHat Linux 9 / Fedora
601 <p>Apache 2.0 is included as the default version in this release. If using
602 the prefork MPM (<span class="fixed">/sbin/httpd</span>), then the Apache configuration
603 file needs to be modified to use <span class="fixed">mod_cgid</span> in place of
604 <span class="fixed">mod_cgi</span>. If using the worker MPM
605 (<span class="fixed">/sbin/httpd.worker</span>), then <span class="fixed">mod_cgid</span>
606 is used already, which Apache strongly recommends.</p>
610 <li>RedHat Enterprise Linux
613 <p>Apache 2.0 is included as the default version in this release. Unlike
614 the RH 9 and Fedora distributions, <span class="fixed">mod_cgid</span> is not
615 included, which not only causes problems for Shibboleth but is also suboptimal
616 if the worker MPM is used. No workaround is known yet, save building
617 <span class="fixed">mod_cgid</span> from the Apache source.</p>
624 <p>Shibboleth requires that Apache and Apache-SSL be built with
625 <span class="fixed">libpthread</span>, or loading the
626 <span class="fixed">mod_shib_13</span> or <span class="fixed">mod_shib_20</span>
627 modules will cause Apache to fail. While RedHat's Apache is compatible,
628 Debian's Apache must be rebuilt with <span class="fixed">libpthread</span>:</p>
630 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
631 $ apt-build --rebuild --reinstall install \<br>
632 apache-common apache apache-ssl</span></p>
640 <p>The shared library version of OpenSSL is required by
641 Shibboleth. The static libraries may be installed as well if
642 necessary for other applications, but cannot be used within
643 mod_ssl or any other Apache modules. If mod_ssl's libssl.so
644 module is linked against the static version, bus errors will
646 <p>To check how mod_ssl was built, run the <span class="fixed">
647 ldd</span> command against <span class="fixed">libssl.so</span>
648 in the Apache <span class="fixed">libexec/</span> folder and
649 check the output for references to <span class="fixed">
650 libssl.so.0.9.7</span>. If you see an earlier version
651 mentioned, or no mention of it at all, then OpenSSL 0.9.7 must be
652 built with shared libraries from source, and the Apache module rebuilt with it.</p>
653 <p>openssl-0.9.7d, the latest security fix release, has been tested,
654 but any 0.9.7 version should work.</p>
657 <p>Solaris does not come with GCC 3, but various versions can be obtained
658 from <a href="http://www.sunfreeware.com">http://www.sunfreeware.com</a>.
659 If building your own, GCC must be configured to use Sun's linker. Note that
660 you should use a consistent version of GCC across any other C++ libraries
661 in use within Apache, but other C++ code can freely use a different version
662 as long as the necessary <span class="fixed">libstdc++.so</span> for a given
663 version is available</p>
666 <p>Use of GCC is recommended, but new releases of Sun's Forte compiler have
667 been used successfully with some tinkering with configuration scripts.</p>
673 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
675 <p>For the sake of clarity, this deployment guide assumes that standard
676 directories are used for all installations. These directories may be changed
677 for local implementations, but must be done so consistently.</p>
678 <p>On Unix, the build documentation suggests building into
679 <span class="fixed">/opt/shibboleth</span>. If you use a different layout or
680 location, most of the essential configuration files will be tweaked for you,
681 but watch for any exceptions.</p>
682 <p>On Windows, use of the installer is recommended. Visual Studio 6.0
683 project files are included with the OpenSAML and Shibboleth source
684 distributions for source builds if maximum flexibility to deal with
685 security issues is desired.</p>
687 <h4><a name="3.c."></a>3.c. Configure Apache</h4>
690 <li>Shibboleth includes configuration directives in the files
691 <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span>
692 and <span class="fixed">/opt/shibboleth/etc/shibboleth/apache2.config</span>
693 which must be added to the <span class="fixed">httpd.conf</span> file used
694 locally. It is recommended that these directives simply be added to the end of the
695 existing <span class="fixed">httpd.conf</span> file rather than trying
696 to merge it in-line; <a href="#3.c.2.">step 2</a> describes the
697 necessary modifications to the Apache startup script. The default
698 configuration will often work, but if customization is necessary, these
699 options may be modified:<dl>
700 <dd class="attribute"><span class="fixed">LoadModule <module> <pathname></span></dd>
701 <dd class="value">Specifies the name and location of the module,
702 installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shib_13.so</span>
703 or <span class="fixed">/opt/shibboleth/libexec/mod_shib_20.so</span></dd>
705 <dd class="attribute"><span class="fixed">ShibConfig <pathname></span></dd>
706 <dd class="value">Specifies the <span class="fixed">pathname</span>
707 of the Shibboleth configuration file. Defaults to <span class="fixed">
708 /opt/shibboleth/etc/shibboleth/shibboleth.xml</span>.</dd>
710 <dd class="attribute"><span class="fixed">ShibSchemaDir <path></span></dd>
711 <dd class="value">Specifies the <span class="fixed">path</span>
712 of the Shibboleth schema folder. Defaults to <span class="fixed">
713 /opt/shibboleth/etc/shibboleth</span>.</dd>
715 <dd class="attribute"><span class="fixed"><Location <i>url</i>><br>
716 SetHandler <method><br>
717 </Location></span></dd>
718 <dd class="value"><p>(Apache 1.3 only) Specifies the relative <span class="fixed">path</span>
719 and the <span class="fixed">handler</span> the target uses to process
720 incoming sessions and lazy session startup for Shibboleth-protected
721 resources. This works in concert with the <span class="fixed">shireURL</span>
722 settings in the XML configuration file. Any virtual locations that are to be
723 used for this purpose should be defined to Apache here.</p></dd>
726 <li>If the OpenSSL libraries are not in the system's search path, they
727 should be added to the <span class="fixed">LD_LIBRARY_PATH</span> used by
728 Apache. Generally libtool's linker options will insure that the modules
729 can locate the Shibboleth libraries, but if not, you may need to add
730 <span class="fixed">/opt/shibboleth/lib</span> to <span class="fixed">
731 LD_LIBRARY_PATH</span> as well.</li>
732 <li>The SHAR must be started along with Apache. Among other methods on
733 Unix, this can be done either by creating a separate SHAR startup script
734 or by modifying Apache's RC script to start/stop the <span class="fixed">
735 SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is
736 suggested that Apache's script be modified by adding:<blockquote>
737 <p><span class="fixed">/opt/shibboleth/bin/shar -f &</span> </p>
739 <p>In most cases, the build process insures that the SHAR can locate
740 the configuration file and schemas, but the SHIB_CONFIG and SHIB_SCHEMAS
741 environment variables may be used as well. Command line options can also
742 be used to specify them.</p>
743 <p>On Windows, the SHAR is a service and is managed separately.</li>
744 <li>By default, the Shibboleth modules are configured to log information
745 on behalf of Apache to the file <span class="fixed">
746 /opt/shibboleth/var/log/shibboleth/shire.log</span>, though this can be
747 changed. For this log to be created, Apache must have permission to
748 write to this file, which may require that the file be manually created
749 and permissions assigned to whatever user Apache is configured to run
750 under. If the file does not appear when Apache runs with the modules
751 loaded, check for permission problems.</li>
752 <li>The options in <span class="fixed">shibboleth.xml</span> must be
753 configured as documented in <a href="#4.a.">4.a</a>. Apache content may
754 then need to be modified for Shibboleth authentication. This is
755 discussed in <a href="#4.d.">4.d</a>. It is recommended that the target
756 then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
759 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
762 <li>The package includes an ISAPI filter and bundled extension for
763 session processing in a single library, <span class="fixed">libexec\isapi_shib.dll</span>.
764 This filter is configured using commands in <span class="fixed">
765 C:\opt\shibboleth\etc\shibboleth\shibboleth.xml</span> (or wherever you've
766 installed the software). Make sure you or the installer has added the lib
767 directory to the path as directed in <a href="#3.b.">section 3.b.</a>
768 <p>Installing the extension into IIS is a two step process:
770 <li type="a">First, add the filter using the Internet Services
771 Manager MMC console. Right click on the machine icon on the left,
772 and edit the WWW Service master properties. On the "ISAPI Filters"
773 tab, add a new filter called Shibboleth and specify the DLL named
774 above. The priority should be High, and once the filter is loaded,
775 make sure it appears in the list <b>below</b> the "sspifilt" entry.
776 Restart IIS and make sure the filter shows up with a green arrow.
777 Check the Windows event log if it fails to load.</li>
778 <li type="a">Secondly, map a special file extension, such as
779 <span class="fixed">.shire</span>, to the ISAPI library so that
780 virtual URLs can be specified to invoke the SHIRE handler for each
781 web site. Right click on the machine icon on the left, and edit the
782 WWW Service master properties. On the "Home Directory" tab, add a
783 script mapping using the "Configuration" button. The "Executable"
784 box should point to <span class="fixed">isapi_shib.dll</span>, and the
785 "Extension" can be set to anything unlikely to conflict, but
786 <span class="fixed">.shire</span> is assumed (and the dot must be
787 included). You should NOT select the option to limit verbs, and
788 you MUST uncheck the "Check that file exists" box.</li>
789 <li type="a"><font color=#444499>(IIS 6 Only)</font> A new Web
790 Service Extension must be defined for Shibboleth; without this, the
791 mapping from <span class="fixed">*.shire</span> to <span
792 class="fixed">isapi_shib.dll</span> won't occur and a file error
793 will appear Add this extension with an arbitrary name and associate
794 it with <span class="fixed">isapi_shib.dll</span>.</li>
797 <li>All other aspects of configuration are handled via the
798 <span class="fixed">shibboleth.xml</span> file and associated XML
799 files described in subsequent sections. Particular use is made of
800 the <span class="fixed">/SHIRE/Implementation/ISAPI</span> element that allows the
801 IIS sites to be mapped to fully-qualified hostnames for proper request mapping.</li>
802 <li>Instance IDs are used in the IIS metabase to identify web sites. In older versions,
803 they are applied starting with 1(one) and number the web sites in order in the
804 Internet Services Manager from top to bottom. Newer versions appear to assign
805 some IID values with strange ASCII formulas applied to the site name. A simple
806 ASP or CGI script can be run within a site to dump the INSTANCE_ID header.</li>
807 <li>See the following section for information on running the SHAR
808 service on Windows.</li>
809 <li>The options in <span class="fixed">shibboleth.xml</span> must be
810 configured as documented in <a href="#4.a.">4.a</a>. It is recommended
811 that the target then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
814 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
816 <p>The SHAR is a console application that is primarily designed to be
817 installed as a Windows service. To run the process in console mode for
818 testing or to diagnose major problems, the <span class="fixed">-console</span>
819 parameter is used. Otherwise, parameters are used to install (or remove) the SHAR from the
820 service database and subsequent control is via the Service Control Manager
821 applet. The following command line parameters can be used:</p>
823 <dd class="attribute"><span class="fixed">-console</span></dd>
824 <dd class="value">Allows the process to be started from a command
825 prompt. Since the console will exit if the desktop user logs out, this
826 is not suitable for production use, but may be useful for testing.</dd>
827 <dd class="attribute"><span class="fixed">-check</span></dd>
828 <dd class="value">Validates the general correctness of the configuration.
829 Not all problems can be detected this way, but the chance of successful startup
830 is high if the checking process does not log any errors.</dd>
831 <dd class="attribute"><span class="fixed">-config <pathname></span> </dd>
832 <dd class="value">Specifies the pathname of the SHAR's configuration
833 file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>
834 or the value of the <span class="fixed">SHIB_CONFIG</span> environment
835 variable, if it is set.</dd>
836 <dd class="attribute"><span class="fixed">-schemadir <path></span> </dd>
837 <dd class="value">Specifies the path to the XML schema files. Defaults to
838 <span class="fixed">\opt\shibboleth\etc\shibboleth</span> or the value of the
839 <span class="fixed">SHIB_SCHEMAS</span> environment variable, if it is set.</dd>
840 <dd class="attribute"><span class="fixed">-install <servicename></span></dd>
841 <dd class="value">Installs the SHAR as a named service in the Windows
842 service database. A name should be provided if multiple instances of the
843 SHAR need to be run on different ports, and thus installed separately.
844 The <span class="fixed">-config</span> option can be provided to include
845 a specific configuration file on the service's command line.</dd>
846 <dd class="attribute"><span class="fixed">-remove <servicename></span></dd>
847 <dd class="value">Removes the named service instance of the SHAR from
848 the Windows service database.</dd>
854 <h3><a name="4."></a>4. Getting Running</h3>
855 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.xml</span></h4>
857 <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 dummy origin; 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 dummy functionality. Click on any attribute or element for more information on its population and definition.</p>
859 <blockquote><span class="fixed">
860 <a class="fixedlink" href="#confShibbolethTargetConfig"><ShibbolethTargetConfig xmlns="urn:mace:shibboleth:target:config:1.0"
861 <br> logger="/opt/local/shibboleth-1.2/etc/shibboleth/shibboleth.logger"></a>
863 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
864 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/local/shibboleth-1.2/libexec/xmlproviders.so" fatal="true"/></a>
865 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
867 <br> <a class="fixedlink" href="#confSHAR"><SHAR logger="/opt/local/shibboleth-1.2/etc/shibboleth/shar.logger"></a>
869 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
870 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/local/shibboleth-1.2/libexec/shib-mysql-ccache.so" fatal="false"/></a>
871 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
872 <br>
873 <br> <a class="fixedlink" href="#confUnixListener"><UnixListener address="/tmp/shar-socket"/></a>
875 <br> <!-- Primarily for IIS Deployments:
876 <br> <a class="fixedlink" href="#confTCPListener"><TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/></a>
877 <br> -->
878 <br>
879 <br> <a class="fixedlink" href="#confMemorySessionCache"><MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
880 <br> defaultLifetime="1800" retryInterval="300" strictValidity="true" propagateErrors="false"/></a>
881 <br>
882 <br> <a class="fixedlink" href="#confSHAR"></SHAR></a>
883 <br>
884 <br> <a class="fixedlink" href="#confSHIRE"><SHIRE logger="/opt/local/shibboleth-1.2/etc/shibboleth/shire.logger"></a>
886 <br> <a class="fixedlink" href="#confRequestMapProvider"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></a>
887 <br> <a class="fixedlink" href="#confRequestMap"><RequestMap applicationId="default"></a>
888 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="https"></a>
889 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
890 <br> <a class="fixedlink" href="#confHost"></Host></a>
891 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="http"></a>
892 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
893 <br> <a class="fixedlink" href="#confHost"></Host></a>
894 <br> <a class="fixedlink" href="#confRequestMap"></RequestMap></a>
895 <br> <a class="fixedlink" href="#confRequestMapProvider"></RequestMapProvider></a>
896 <br> <!-- IIS only:
897 <br> <a class="fixedlink" href="#confImplementation"><Implementation></a>
898 <br> <a class="fixedlink" href="#confISAPI"><ISAPI normalizeRequest="true"></a>
899 <br> <a class="fixedlink" href="#confSite"><Site id="1" host="localhost"/></a>
900 <br> <a class="fixedlink" href="#confISAPI"></ISAPI></a>
901 <br> <a class="fixedlink" href="#confImplementation"></Implementation></a>
902 <br> -->
903 <br> <a class="fixedlink" href="#confSHIRE"></SHIRE></a>
905 <br> <a class="fixedlink" href="#confApplications"><Applications xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
906 <br> applicationId="default" providerId="https://localhost/shibboleth/target"></a>
907 <br> <a class="fixedlink" href="#confSessions"><Sessions lifetime="7200" timeout="3600" checkAddress="true"
908 <br> shireURL="/Shibboleth.shire" shireSSL="false" cookieName="shib-default-app" cookieProps="; path=/"
909 <br> wayfURL="https://wayf.internet2.edu/InQueue/WAYF"/></a>
911 <br> <a class="fixedlink" href="#confErrors"><Errors shire="/opt/local/shibboleth-1.2/etc/shibboleth/shireError.html"
912 <br> rm="/opt/local/shibboleth-1.2/etc/shibboleth/rmError.html"
913 <br> access="/opt/local/shibboleth-1.2/etc/shibboleth/accessError.html"
914 <br> supportContact="root@localhost"
915 <br> logoLocation="/logo.gif"/></a>
916 <br>
917 <br> <a class="fixedlink" href="#confPolicy"><Policy signRequest="false" signedResponse="false" signedAssertions="false"></a>
919 <br> <a class="fixedlink" href="#confAAPProvider"><AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP" uri="/opt/local/shibboleth-1.2/etc/shibboleth/AAP.xml"/></a>
920 <br>
921 <br> <a class="fixedlink" href="#confFederationProvider"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"
922 <br> uri="/opt/local/shibboleth-1.2/etc/shibboleth/sites.xml"/></a>
923 <br>
924 <br> <a class="fixedlink" href="#confTrustProvider"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"
925 <br> uri="/opt/local/shibboleth-1.2/etc/shibboleth/trust.xml"/></a>
926 <br>
927 <br> <saml:Audience>urn:mace:inqueue</saml:Audience>
928 <br> <a class="fixedlink" href="#confPolicy"></Policy></a>
929 <br>
930 <br> <a class="fixedlink" href="#confCredentialUse"><CredentialUse TLS="defcreds" Signing="defcreds"></a>
931 <br> <a class="fixedlink" href="#confRelyingParty"><RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/></a>
932 <br> <a class="fixedlink" href="#confCredentialUse"></CredentialUse></a>
934 <br> <a class="fixedlink" href="#confApplications"></Applications></a>
935 <br>
936 <br> <a class="fixedlink" href="#confCredentialsProvider"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></a>
937 <br> <a class="fixedlink" href="#confCredentials"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a>
938 <br> <a class="fixedlink" href="#confFileResolver"><FileResolver Id="defcreds"></a>
939 <br> <a class="fixedlink" href="#confKey"><Key format="PEM"></a>
940 <br> <a class="fixedlink" href="#confPath"><Path>/opt/local/shibboleth-1.2/etc/shibboleth/shar.key</Path></a>
941 <br> <a class="fixedlink" href="#confKey"></Key></a>
942 <br> <a class="fixedlink" href="#confCertificate"><Certificate format="PEM"></a>
943 <br> <a class="fixedlink" href="#confPath"><Path>/opt/local/shibboleth-1.2/etc/shibboleth/shar.crt</Path></a>
944 <br> <a class="fixedlink" href="#confCertificate"></Certificate></a>
945 <br> <a class="fixedlink" href="#confFileResolver"></FileResolver></a>
946 <br> <a class="fixedlink" href="#confCredentials"></Credentials></a>
947 <br> <a class="fixedlink" href="#confCredentialsProvider"></CredentialsProvider></a>
949 <br><a class="fixedlink" href="#confShibbolethTargetConfig"></ShibbolethTargetConfig></a>
953 <p>The following changes must be made to the default configuration before the target will interoperate in a federation.</p>
956 <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 URN this target will use to identify itself with its primary relying party. This will often be supplied by a federation.</p>
959 <p>The <span class="fixed">supportContact</span> 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>
962 <p>Proper credentials for this target signed by an authority that the primary relying party 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. If a keystore must be used instead, consult <a href="#5.a.">section 5.a</a> for appropriate structure and details on population.</p>
966 <p>For Apache (but not IIS), there is also information that must be
967 configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span>
968 (or equivalent); for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
969 <p>Information in the logging configuration files referenced by
970 <span class="fixed">shibboleth.xml</span> may require additional changes to
971 meet local needs. The logging level can be raised to <span class="fixed">
972 INFO</span> or <span class="fixed">DEBUG</span> if additional detail is
973 needed for testing. It is recommended that after initial installation is
974 completed, the log level in both files be left at either <span class="fixed">
975 INFO</span> or <span class="fixed">WARN</span>.</p>
976 <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>
977 <dd class="attribute"><a name="confAAPProvider"><span class="fixed"><AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP" uri="<i>pathname</i>"/></span></dd>
978 <dd class="value">This element is used to specify individual attribute acceptance policies that will apply to this application and may appear one or more times within the <a href="#confAttributes"><span class="fixed">Attributes</span></a> element. For information about these policies and their format, refer to <a href="#4.e.">section 4.e</a>.</dd>
980 <!-- Removed due to complexity
982 <dd class="attribute"><a name="confApache"><span class="fixed"><Apache apacheConfig="<i>true/false</i>"/></span></dd>
983 <dd class="value">Session configuration for Apache-based targets will be specified in <span class="fixed">httpd.conf</span> if <span class="fixed">true</span> or in <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> elements if <span class="fixed">false</span>.</dd>
986 <dd class="attribute"><a name="confApplication"><span class="fixed"><Application <span class="mandatory">id="<i>identifier</i>"</span> providerId="<i>identifier</i>"></span></dd>
987 <dd class="value">Individual applications that require different attributes, credentials, sessions, 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 still contain a <a href="#confSessions"><span class="fixed">Sessions</span></a> element, but use of the <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.
989 <li class="mandatory"><span class="fixed">identifier</span>: This attribute defines an internal identifier allowing individual <span class="fixed">applicationId</span> attributes as part of <a href="#confRequestMap"><span class="fixed">RequestMap</span></a>, <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>
990 <li><span class="fixed">providerId</span>: Separate from the internal identifier, the <span class="fixed">providerId</span> is the value that will be sent to the AA in attribute requests to allow the AA to differentiate applications on the target. This value will often be provided to a federation to allow the origins to correctly release attributes to targets. If none is specified, the default <a href="#confApplications><span class="fixed">Applications</span></a> <span class="fixed">providerId</span> will apply.</li>
993 <dd class="attribute"><a name="confApplications"><span class="fixed"><Applications id="<i>identifier</i>" <span class="mandatory">providerId="<i>identifier</i>"</span>></span></dd>
994 <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="#confRequestMap"><span class="fixed">RequestMap</span></a>, <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.
996 <li><span class="fixed">identifier</span>: This attribute defines an internal identifier allowing individual <span class="fixed">applicationId</span> attributes need to point to the main <span class="fixed">Applications</span> configuration as a handler by over-riding their container elements.</li>
997 <li class="mandatory"><span class="fixed">providerId</span>: Separate from the internal identifier, the <span class="fixed">providerId</span> is the value that will be sent to the AA in attribute requests to allow the AA to differentiate applications on the target. This value will often be provided to a federation to allow the origins to correctly release attributes to targets.</li>
1000 <dd class="attribute"><a name="confAttributes"><span class="fixed"><Attributes signRequest="<i>true/false</i>" signedResponse="<i>true/false</i>" signedAssertions="<i>true/false</i>"></span></dd>
1001 <dd class="value">The <span class="fixed">Attributes</span> element affects how this application handles attribute queries to AA's and the processing of these attributes upon receipt. It may contain one or more <a href="#confAAPProvider><span class="fixed">AAPProvider</span></a> elements, each of which specifies a set of attribute acceptance policies; see <a href="#4.e.">section 4.e</a> for details.
1003 <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute requests that it sends to origins for requests for this application. This is not always necessary, as the SSL session can provide authentication.</li>
1004 <li><span class="fixed">signedResponse</span>: If this is <span class="fixed">true</span>, the target will require that all SAML attribute responses it receives for this application be signed.</li>
1005 <li><span class="fixed">signedAssertions</span>: If this is <span class="fixed">true</span>, the target will require that individual SAML attribute assertions it receives for this application be signed. This may be particularly useful if the application is exporting the assertion.</li>
1008 <dd class="attribute"><a name="confCAPath"><span class="fixed"><CAPath><i>pathname</i></CAPath></span></dd>
1009 <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. The expectations of the target and the federation may determine the necessity for the use of this field.</dd>
1011 <dd class="attribute"><a name="confCertAlias"><span class="fixed"><CertAlias><i>string</i></CertAlias></span></dd>
1012 <dd class="value">Specifies the alias for the certificate
1013 corresponding to the private key used by the HS. If no alias is specified, defaults to the private key's alias. Contained by the <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element.</dd>
1015 <dd class="attribute"><a name="confCertificate"><span class="fixed"><Certificate format="<i>type</i>"></span></dd>
1016 <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 origin, 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> and <span class="fixed">DER</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>
1018 <dd class="attribute"><a name="confCredentials"><span class="fixed"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></span></dd>
1019 <dd class="value">This element is the container for credentials used by the credential mechanism specified by the <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> element. For most deployments, the URN should be <span class="fixed"></span>. It must contain one <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element for flat key and certificate files or one <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element for compound keystores.</dd>
1021 <dd class="attribute"><a name="confCredentialsProvider"><span class="fixed"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></span></dd>
1022 <dd class="value">This element is the container for credentials used by the target and is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element. It must contain one <a href="#confCredentials"><span class="fixed">Credentials</span></a> element detailing the individual credentials to be used by the target in attribute transactions.</dd>
1024 <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>" supportContact="<i>e-mail</i>" logoLocation="<i>URL</i>"</span>/></span></dd>
1025 <dd class="value">Shibboleth is capable of displaying customized error pages based on templates and special resources provided by these configuration attributes. These should all be customized to fit the web scheme of the target. For more information on configuration of the error page generation, please see <a href="#4.b.">section 4.b</a>.
1027 <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>
1028 <li class="mandatory"><span class="fixed">rm</span>: Specifies the location of the template for the error page generated if internal errors occur in the RM.</li>
1029 <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 by the RM. This is distinct from when errors occur during the evaluation process itself, and indicates a denial of authorization.</li>
1030 <li class="mandatory"><span class="fixed">supportContact</span>: Specifies a support e-mail address for the user to contact.</li>
1031 <li class="mandatory"><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>
1034 <dd class="attribute"><a name="confExtensions"><span class="fixed"><Extensions></span></dd>
1035 <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>
1037 <dd class="attribute"><a name="confFederationProvider"><span class="fixed"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata" uri="<i>pathname</i>"/></span></dd>
1038 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to metadata in the form of a sites file for use by this application distributed by the federation under which it operates. This should be updated regularly; see <a href="#4.g.">section 4.g</a> for further details.</dd>
1040 <dd class="attribute"><a name="confFileResolver"><span class="fixed"><FileResolver Id="<i>string</i>"></span></dd>
1041 <dd class="value">This element defines a pair of files used to store a private key and certificate associated with a given identifier and is contained by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element. <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements will refer to these identifiers allowing multiple resolver elements to be used to specify different credential storage for different applications. 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>
1043 <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></span></dd>
1044 <dd class="value">Individual hosts that this target protects are enumerated by <span class="fixed">Host</span> elements as contained by <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element. If a request is received by Shibboleth for a URL on this host, these parameters will be applied to the handling. 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 over-ride the ones in this element; similarly, the ones within this element will over-ride the ones in the containing <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element.
1046 <li><span class="fixed">scheme</span>: This specifies the protocol that this host is responding to requests on. 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>
1047 <li class="mandatory"><span class="fixed">name</span>: This is the domain name of the host that URL's will contain. This appended to the <span class="fixed">scheme</span> must match what is contained in the URL for the request to be handled by this element.</li>
1048 <li><span class="fixed">port</span>: This is the port the host is listening on, if it's not standard.</li>
1049 <li><span class="fixed">requireSession</span>: This attribute controls whether the SHIRE will always establish a session before handing off to the application. If <span class="fixed">true</span>, Shibboleth will force session establishment before this. If <span class="fixed">false</span>, applications will be responsible for ensuring that sessions are generated if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> without a full understanding of the implications.</li>
1050 <li><span class="fixed">exportAssertion</span>: When this boolean is <span class="fixed">true</span>, the entire SAML attribute assertion received by the SHAR 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; however, it also permits an application to see attributes that may have been filtered by an AAP, or to forward the SAML assertion to a third party. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1053 <dd class="attribute"><a name="confImplementation"><span class="fixed"><Implementation></span></dd>
1054 <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 that this Shibboleth deployment serves. Multiple configurations may be specified, but only one per web server type. This element may contain the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element. <!-- NOT IMPLEMENTED: <a href="#confApache"><span class="fixed">Apache</span></a>, and <a href="#confNSAPI"><span class="fixed">NSAPI</span></a>, <a href="#confJava"><span class="fixed">Java</span></a> -->.</dd>
1056 <dd class="attribute"><a name="confISAPI"><span class="fixed"><ISAPI normalizeRequest="<i>true/false</i>"></span></dd>
1057 <dd class="value">The configuration information for Shibboleth targets deployed behind ISAPI 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 IIS IID values to the vhost name. If <span class="fixed">normalizeRequest</span> is <span class="fixed">true</span>, all redirects and computed request URLs generated by Shibboleth will be created using the virtual server name assigned to the server. If <span class="fixed">false</span>, the browser's supplied URL is sometimes used to compute the information. This sometimes has no effect, depending on the capabilities of the web server, since the correct behavior is almost always to rely on the server's API to report the hostname and ignore the browser. Contained by the <a href="#confImplementation"><span class="fixed">Implementation</span></a> element.</dd>
1059 <dd class="attribute"><a name="confKey"><span class="fixed"><Key format="<i>type</i>"></span></dd>
1060 <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> and <span class="fixed">DER</span>. Keys are supported in a variety of formats: DER, PEM, encrypted PEM, PKCS8, and encrypted PKCS8. It resides within the <a href="#confFileResolver"><span class="fixed">FileResolver</span> 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>
1062 <dd class="attribute"><a name="confKeyAlias"><span class="fixed"><KeyAlias><i>string</i></KeyAlias></span></dd>
1063 <dd class="value">Specifies the alias used for accessing the private
1064 key. Contained by the <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element.</dd>
1066 <dd class="attribute"><a name="confKeyPassword"><span class="fixed"><KeyPassword><i>string</i></KeyPassword></span></dd>
1067 <dd class="value">Specifies the password used to retrieve the private
1068 key. Contained by the <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element.</dd>
1070 <dd class="attribute"><a name="confKeyStoreKeyAlias"><span class="fixed"><KeyStoreKeyAlias><i>string</i></KeyStoreKeyAlias></span></dd>
1071 <dd class="value">Specifies the alias used for accessing the private
1072 key. Contained by the <a href="#confNameMapping"><span class="fixed">NameMapping</span></a> element when a <span class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1074 <dd class="attribute"><a name="confKeyStoreKeyPassword"><span class="fixed"><KeyStoreKeyPassword><i>string</i></KeyStoreKeyPassword></span></dd>
1075 <dd class="value">Specifies the password used to retrieve the private
1076 key. Contained by the <a href="#confNameMapping"><span class="fixed">NameMapping</span></a> element when a <span class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1078 <dd class="attribute"><a name="confKeyStorePassword"><span class="fixed"><KeyStorePassword><i>string</i></KeyStorePassword></span></dd>
1079 <dd class="value">Specifies the password to access the keystore containing the private key to be used for symmetric encryption. Contained by the <a href="#confNameMapping"><span class="fixed">NameMapping</span></a> element when a <span class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1081 <dd class="attribute"><a name="confKeyStorePath"><span class="fixed"><KeyStorePath><i>string</i></KeyStorePath></span></dd>
1082 <dd class="value">Specifies the location of the keystore containing the private key to be used for symmetric encryption to pass handles between the HS and AA. Contained by the <a href="#confNameMapping"><span class="fixed">NameMapping</span></a> element when a <span class="fixed">CryptoHandleGenerator</span> type is specified.</dd>
1084 <dd class="attribute"><a name="confKeyStoreResolver"><span class="fixed"><KeyStoreResolver Id="<i>string</i>" storeType="<i>type</i>"></span></dd>
1085 <dd class="value">This element is contained by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element and to specify a keystore that contains both the certificate and private key for a given set of credentials. Typically, this will be a Java keystore, with a corresponding type of <span class="fixed">JKS</span>. <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements will refer to the <span class="fixed">Id</span> allowing multiple resolver elements to be used to specify different credential storage for different federations or target sites. It must contain one <a href="#confPath"><span class="fixed">Path</span></a> element, one <a href="#confKeyAlias"><span class="fixed">KeyAlias</span></a> element, and one <a href="#confStorePassword"><span class="fixed">StorePassword</span></a> element; it may optionally contain a <a href="#confKeyPassword"><span class="fixed">KeyPassword</span></a> element or a <a href="#confCertAlias"><span class="fixed">CertAlias</span></a> element.</dd>
1087 <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>
1088 <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.
1089 <ul><li class="mandatory"><span class="fixed">path</span>: This designates the complete pathname to where the library is.</li>
1090 <li><span class="fixed">fatal</span>: If this boolean is set to <span class="fixed">true</span> and the library is not located or fails to load properly, the target will not start.</li>
1093 <dd class="attribute"><a name="confMemorySessionCache"><span class="fixed"><MemorySessionCache <a href="#confSessionCacheProperties">sessionCacheProperties</a>/></span></dd>
1094 <dd class="value">Shibboleth will cache sessions and received attributes in-memory if this element is part of <span class="fixed">shibboleth.xml</span>. There's actually a great number of attributes that may be specified; consult the <a href="#confSessionCacheProperties">sessionCacheAttributes</a> section for a full list and descriptions. 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> element.</dd>
1096 <dd class="attribute"><a name="confMySQLSessionCache"><span class="fixed"><MySQLSessionCache mysqlTimeout="<i>seconds</i>" <a href="#confSessionCacheProperties">sessionCacheProperties</a>/></span></dd>
1097 <dd class="value">Shibboleth will cache sessions and received attributes using a MySQL database if this element is part of <span class="fixed">shibboleth.xml</span>. Arguments may be passed directly to MySQL by populating this element with additional <span class="fixed"><a href="#confArgument">Argument</a></span> elements. There's actually a great number of attributes that may be specified; consult the <a href="#confSessionCacheProperties">sessionCacheAttributes</a> section for a full list and descriptions. 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> element.
1099 <li><span class="fixed">mysqlTimeout</span>: This specifies a duration in seconds that the target will wait before MySQL requests timeout. Defaults to 14400.</li>
1102 <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/></span></dd>
1103 <dd class="value">This attribute allows for different application identifiers and session handling to be defined iteratively for subdirectories within a host. Requests are processed on a best-match basis, with the innermost element taking precedence; for more information, consult blah. 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.
1105 <li class="mandatory"><span class="fixed">name</span>: This is the domain name of the host that URL's will contain. This appended to the <span class="fixed">scheme</span> must match what is contained in the URL for the request to be handled by this element.</li>
1106 <li><span class="fixed">requireSession</span>: This attribute controls whether the SHIRE will always establish a session before handing off to the application. If <span class="fixed">true</span>, Shibboleth will force session establishment before this. If <span class="fixed">false</span>, applications will be responsible for ensuring that sessions are generated if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> without a full understanding of the implications.</li>
1107 <li><span class="fixed">exportAssertion</span>: When this boolean is <span class="fixed">true</span>, the entire SAML attribute assertion received by the SHAR 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; however, it also permits an application to see attributes that may have been filtered by an AAP, or to forward the SAML assertion to a third party. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1110 <dd class="attribute"><a name="confPolicy"><span class="fixed"><Policy></span></dd>
1111 <dd class="value">This element is the main container for specification of policies for attributes, trust, and federation handling by an application. It must be contained by the <a href="#confApplications"><span class="fixed">Applications</span></a> and, if contained by an <a href="#confApplication"><span class="fixed">Application</span></a> element, will over-ride the main policy element 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">Audiences</span></a>.</dd>
1113 <dd class="attribute"><a name="confRequestMap"><span class="fixed"><RequestMap applicationId="<i>id</i>" requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"
1114 uri="<i>URI</i>"></span></dd>
1115 <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>
1117 <li><span class="fixed">applicationId</span>: If specified, then any queries handled by this request mapping will be considered part of the application <span class="fixed">id</span> as defined in an <a href="#confApplication"><span class="fixed">Application</span></a> element with the same identifier. If no <span class="fixed">applicationId</span> is specified, then the default specified in the <a href="#confApplications"><span class="fixed">Applications</span></a> element will apply.</li>
1118 <li><span class="fixed">requireSession</span>: This attribute controls whether the SHIRE will always establish a session before handing off to the application. If <span class="fixed">true</span>, Shibboleth will force session establishment before this. If <span class="fixed">false</span>, applications will be responsible for ensuring that sessions are generated if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> without a full understanding of the implications.</li>
1119 <li><span class="fixed">exportAssertion</span>: When this boolean is <span class="fixed">true</span>, the entire SAML attribute assertion received by the SHAR 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; however, it also permits an application to see attributes that may have been filtered by an AAP, or to forward the SAML assertion to a third party. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1121 <dd class="attribute"><a name="confRelyingParty"><span class="fixed"><RelyingParty <span class="mandatory">name="<i>URN</i>" TLS="<i>id</i> Signing="id"/</span></span></dd>
1122 <dd class="value"><p>One or more <span class="fixed">RelyingParty</span> elements may be contained by individual <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> elements to enumerate relying parties for which an individual set of credentials should be used. Each one will contain a unique URN specified in transactions conducted with that relying party and may use different credentials for different aspects of the interaction with origins within that relying party.</p>
1124 <li class="mandatory"><span class="fixed">name</span>: This URN will be sent by the target to origins that are covered by this <span class="fixed">RelyingParty</span> definition. This must match a value that is expected by the origin for proper trust and attribute release to occur. If there is no direct match, the origin uses metadata to try to find a federation that this target is a member of.</li>
1125 <li class="mandatory"><span class="fixed">TLS</span>: This specifies the <span class="fixedwidth">Id</span> of the <a href="#confFileResolver"><span class="fixedwidth">FileResolver</span></a> element pointing towards the credentials to be used to initiate the TLS connection over which the attribute request is made of origins within this relying party.</li>
1126 <li class="mandatory"><span class="fixed">Signing</span>: This specifies the <span class="fixedwidth">Id</span> of the <a href="#confFileResolver"><span class="fixedwidth">FileResolver</span></a> element pointing towards the credentials to be used to sign the attribute request for origins within this relying party.</li>
1130 <dd class="attribute"><a name="confRequestMapProvider"><span class="fixed"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></span></dd>
1131 <dd class="value"><p>This element holds one or more request mapping providers, each of which defines how Shibboleth will perform sessions and access controls for a given mapping of a URL to a path. There must be one or more <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> elements within this element, each of which represents access controls and session definitions for a URL to pathname mapping.</p><!-- Removed due to complexity:<p>Note that these mappings are only consulted by IIS deployments and Apache deployments where <span class="fixed">apacheConfig</span> in the <a href="#confApache"><span class="fixed">Apache</span></a> element is <span class="fixed">false</span>; otherwise, mappings and access controls are specified using <span class="fixed">httpd.conf</span>.</p>--></dd>
1133 <dd class="attribute"><a name="confSessions"><span class="fixed"><Sessions <span class="mandatory">wayfURL="<i>URL</i>"<br>
1134 shireURL="<i>URL</i>"</span><br>
1135 shireSSL="<i>true/false</i>"<br>
1136 <span class="mandatory">cookieName="<i>URL</i>"</span><br>
1137 cookieProps="<i>URL</i>"<br>
1138 lifetime="<i>seconds</i>"<br>
1139 timeout="<i>seconds</i>"<br>
1140 checkAddress="<i>true/false</i>"<br>/></span></dd>
1141 <dd class="value">Configuration parameters that affect the way Shibboleth handles sessions for an individual application identifier are bundled in this element, which must be contained by 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 initiate.
1143 <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.</li>
1144 <li class="mandatory"><p><span class="fixed">shireURL</span>: Specifies the URL of the SHIRE POST URL, or assertion consumer service, at which new sessions are initiated. This can be an absolute URL, or a relative path to be prefixed by the base URL of the web site. Using an absolute URL allows a virtual server to funnel SHIRE requests to a fixed location.</p><p>Note that this URL will result in the cookie named by the <span class="fixed">cookieName</span> and <span class="fixed">cookieProps</span> elements being set, and this cookie must be returned in subsequent requests, so the virtual server's domain name and port must be consistent with the SHIRE's 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><p>For Shibboleth to function 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>
1145 <li><span class="fixed">shireSSL</span>: This boolean should be <span class="fixed">true</span> when the SHIRE will <b>only</b> accept POST requests over SSL as is strongly recommended; see <a href="#2.c.">section 2.c</a> for more details.</li>
1146 <li class="mandatory"><span class="fixed">cookieName</span>: Specifies the name given to in-memory session cookies that are associated with this application.</li>
1147 <li><span class="fixed">cookieProps</span>: A string of cookie properties can be specified using this element which give the browser further instructions about their processing and use.</li>
1148 <li><span class="fixed">lifetime</span>: Specifies the duration in seconds of the Shibboleth session; this does not affect the lifetime of application sessions initiated subsequently. If none is specified, sessions are unlimited by time.</li>
1149 <li><span class="fixed">timeout</span>: If this duration in seconds elapses following the last request in a session, the session will be considered to have expired and a new session must be initiated for future requests. Defaults to no timeout.</li>
1150 <li><span class="fixed">checkAddress</span>: If <span class="fixed">true</span>, Shibboleth will check client addresses for impersonation protection. In most circumstances, this should be enabled to prevent certain attacks concerning stolen cookies, but this can cause problems for users behind proxies or NAT devices. Defaults to <span class="fixed">false</span>.
1153 <dd class="attribute"><a name="confSessionCacheProperties"><span class="fixed"><SessionCacheProperties 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>
1154 <dd class="value">These attributes may all be specified as part of either the <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element or the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element. They are all optional.
1156 <li><span class="fixed">AAConnectTimeout</span>: Specifies in seconds the duration 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>
1157 <li><span class="fixed">AATimeout</span>: Specifies in seconds the duration the target will wait before timing out on receiving attributes from the origin once the initial connection is established. Defaults to <span class="fixed">30</span>.</li>
1158 <li><span class="fixed">cacheTimeout</span>: The SHAR will make a fresh attribute request if it receives no response from the cache within this duration. Defaults to <span class="fixed">28800</span>.</li>
1159 <li><span class="fixed">cleanupInterval</span>: The cache will be purged of expired attribute sets with a frequency <span class="fixed">seconds</span>. Defaults to <span class="fixed">300</span>.</li>
1160 <li><span class="fixed">defaultLifetime</span>: If the assertion containing the attributes doesn't carry an 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>
1161 <li><span class="fixed">propagateErrors</span>: If true, then any errors that occur during the attribute query are fatal and will be presented to the user as an error. If false, any errors that occur during the query are non-fatal, and the
1162 application will get attributes returned to it based on the population of <span class="fixed">strictValidity</span>.</p><p>This should generally only be treated as false by deployments that are using real principal names as subjects because attribute retrieval may be treated as optional or omitted entirely.</p></li>
1163 <li><span class="fixed">retryInterval</span>: This is the amount of time between attempts to get 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 AA.</li>
1164 <li><span class="fixed">strictValidity</span>: If true, no expired attributes will ever be made available to the Shibboleth application; if no valid attributes can be obtained, then an empty set of attributes is provided. When false, if no fresh set of attributes can be retrieved due to failures, cached attributes are made available, regardless of whether they have expired or not. Defaults to <span class="fixed">true</span>.</li>
1167 <dd class="attribute"><a name="confSHAR"><span class="fixed"><SHAR logger="<i>pathname</i>"></span></dd>
1168 <dd class="value">This is the container element for configuration information pertaining to the SHAR, the main component of the target, which is responsible for requesting information about browser users from AA's. Its single attribute, <span class="fixed">logger</span>, points toward a Log4J logger file that can be used by the SHAR. 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><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 for this SHAR 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 store session information in a MySQL database.</dd>
1170 <dd class="attribute"><a name="confShibbolethTargetConfig"><span class="fixed"><ShibbolethTargetConfig></span></dd>
1171 <dd class="value">This is the main container element for the 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>.</dd>
1173 <dd class="attribute"><a name="confSHIRE"><span class="fixed"><SHIRE logger="<i>pathname</i>"></span></dd>
1174 <dd class="value">This is the container element for configuration information pertaining to the SHIRE, the part of the target that establishes sessions and passes on received attributes to applications. Its single attribute, <span class="fixed">logger</span>, points toward a Log4J logger file that can be used by the SHIRE. 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><p>It must contain one <a href="#confImplementation"><span class="fixed">Implementation</span></a> element, within which configuration for the SHIRE which varies by platform will be specified.</p><p>One or more <a href="#confRequestMapProvider"><span class="fixed">RequestMapProvider</span></a> elements must be contained by this element, which serves to provide protection on individual pathnames served by the webserver.</dd>
1176 <dd class="attribute"><a name="confSite"><span class="fixed"><Site <span class="mandatory">id="<i>IID</i>" host="<i>fqdn</i>"</span>/></span></dd>
1177 <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>
1179 <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>
1180 <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> element. It allows the SHAR to instead listen to the Apache module over TCP.
1181 <ul><li class="mandatory"><span class="fixed">address</span>: Specifies the address of the listener.</li>
1182 <li class="mandatory"><span class="fixed">port</span>: Specifies the TCP port on which the SHAR will listen.</li>
1183 <li><span class="fixed">acl</span>: By default, the SHAR will only listen to Apache requests from 127.0.0.1 (localhost). This should generally not be specified, but could be useful in some scenarios: if there were no way to plug a server farm into a shared session cache plugin, the server farm could all point at a networked SHAR service that writes to non-shared storage. There is no wildcarding.</li>
1186 <dd class="attribute"><a name="confTrustProvider"><span class="fixed"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust" uri="<i>pathname</i>"/></span></dd>
1187 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, provides information on signing keys and certificates for use in interactions with AA's. This should be updated regularly; see <a href="#4.g.">section 4.g</a> for further details.</dd>
1189 <dd class="attribute"><a name="confUnixListener"><span class="fixed"><UnixListener address="<i>pathname</i>"/></span></dd>
1190 <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 the SHAR should listen for Apache module requests on rather than on a TCP port. 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> element. <span class="fixed">UnixListener</span> cannot be specified for Windows-based installations.</dd>
1193 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1195 <p>Shibboleth supports the dynamic generation of information in error pages
1196 referenced by <span class="fixed">shibboleth.xml</span>. The Shib Target
1197 employs a special Markup Language Processor to insert special tags into the
1198 generated HTML. The parser will read the error file looking for any tag that
1201 <p><span class="fixed"><shibmlp tag-name /></span> </p>
1203 <p>Shibboleth will replace <span class="fixed">tag-name</span> with the
1204 appropriate markup tag from the table below:</p>
1206 <dd class="attribute"><span class="fixed">supportContact</span></dd>
1207 <dd class="value">The value of the <span class="fixed">supportContact</span>
1208 for this web site.</dd>
1209 <dd class="attribute"><span class="fixed">logoLocation</span></dd>
1210 <dd class="value">The value of the <span class="fixed">logoLocation</span>
1211 for this web site. This is used to fill in the template error page only;
1212 if a custom error page is created, then the image may be linked to
1213 statically by the page itself.</dd>
1214 <dd class="attribute"><span class="fixed">requestURL</span></dd>
1215 <dd class="value">The user's requested URL.</dd>
1216 <dd class="attribute"><span class="fixed">errorType</span></dd>
1217 <dd class="value">The type of error.</dd>
1218 <dd class="attribute"><span class="fixed">errorText</span></dd>
1219 <dd class="value">The actual error message.</dd>
1220 <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1221 <dd class="value">A textual description of the error intended for human
1223 <dd class="attribute"><span class="fixed">originContactName</span></dd>
1224 <dd class="value">The contact name for the origin site provided by that
1225 site's metadata.</dd>
1226 <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1227 <dd class="value">The contact email address for the origin site provided
1228 by that site's metadata.</dd>
1229 <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1230 <dd class="value">The URL of an error handling page for the origin site
1231 provided by that site's metadata.</dd>
1233 <p>This configuration is only for Apache servers, and is only used by
1234 resources protected by Shibboleth. See <a href="#4.d.">section 4.d.</a></p>
1235 <p>Sample error templates for different kinds of errors are included in the
1236 Shibboleth distribution, and can be triggered by anything that will cause
1237 Shibboleth to be unable to make an authorization decision, including a bad
1238 sites file, certificate verification failures, or a skewed clock between
1240 <p><b>You should edit these templates, provide or remove style sheets and
1241 images, and otherwise customize these templates to suit the user experience
1242 you want your users to have when errors occur. The defaults are not likely
1243 to meet the needs of any site.</b></p>
1245 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1247 <p>The only target component that must have a private key and certificate is
1248 the SHAR. While the target server itself should support SSL in most cases
1249 for users, it is mandatory for the SHAR to authenticate when contacting an
1250 AA, and it must therefore be given a key and an SSL client certificate. It
1251 is permissible for the SHAR to use the same keypair and certificate used by
1252 the target web server itself, provided the certificate is signed by a CA
1253 accepted by the origin sites that will be queried for attributes.</p>
1254 <p>On Unix, we require that OpenSSL be installed to use Shibboleth. On
1255 Windows, OpenSSL libraries and the command line tool are included in the
1256 package and can be used directly, if not otherwise available.</p>
1257 <p>The certificate and key file location should be based on whether they
1258 will also be used for Apache. If they will be used as a server certificate
1259 as well, they should probably be in the Apache tree in the usual
1260 <span class="fixed">mod_ssl</span>-defined locations inside the Apache
1261 configuration folder., and the SHAR can read them from there. If the SHAR is
1262 not running as <span class="fixed">root</span>, permissions might need to be
1263 changed to allow this access. If the certificate and key will only be used
1264 for the SHAR, they can be put in the same folder with the
1265 <span class="fixed">shibboleth.xml</span> file and protected appropriately.</p>
1266 <p>Other web servers like IIS do not use the raw PEM format that Apache and
1267 Shibboleth can share, and therefore the components must generally use
1268 separate copies of the key and certificate if they are to be shared. Most
1269 other servers can export and/or import keys to and from PEM format or other
1270 formats that OpenSSL can convert. Refer to your server's documentation or
1271 ask for assistance from others who use it.</p>
1272 <p>The SHAR is assigned a key and a certificate using shibboleth.xml's
1273 <span class="fixed">certFile</span>, <span class="fixed">keyFile</span> and
1274 <span class="fixed">keyPass</span> settings, described in <a href="#4.a.">
1275 section 4.a.</a> These files must currently be in PEM format. OpenSSL
1276 commands to generate a new keypair and a certificate request are shown here,
1277 assuming 2048 bit RSA keys are to be used:</p>
1279 <p><span class="fixed">$ openssl genrsa -des3 -out ssl.key 2048<br>
1280 $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1282 <p>The signed certificate file returned by the CA should be usable directly,
1283 or can be converted to PEM format using the <span class="fixed">openssl x509</span>
1285 <p>If the key is to be shared with Apache, the web server's child processes,
1286 often running as <span class="fixed">nobody</span>, must be able to read
1287 them while the server is running, which may require permission changes.</p>
1288 <p>This particularly applies when sharing the key and certificate used by
1289 mod_ssl, which are only readable by root by default. The password, if any,
1290 must be placed in the <span class="fixed">shibboleth.xml</span> file, since
1291 the Apache module cannot prompt for it during initial startup as mod_ssl
1292 can. The issues surrounding how to securely obtain a key while running as
1293 <span class="fixed">nobody</span> may be addressed in a later release. Since
1294 the password will be stored in clear text in a frequently examined file, it
1295 is suggested to use a password not used elsewhere.</p>
1296 <p>Finally, the <span class="fixed">calist</span> command provides the SHAR
1297 with a set of CA roots to trust when validating AA server certificates. In
1298 all cases, the SHAR verifies that the certificate's Subject CN equals the
1299 AA's hostname, but the CA list restricts the accepted signers to those
1300 permitted by the SHAR. The parameter can be omitted to skip such validation,
1301 but this is not secure.</p>
1303 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1305 <p>Protection of web pages is primarily achieved through "mapping"
1306 attributes provided by an AA to a localized vocabulary for authorization
1307 rules. This was formerly accomplished in Apache with the <span class="fixed">
1308 ShibMapAttribute</span> command, but this has been replaced with additional
1309 features in the AAP syntax, described in <a href="#4.e.">section 4.e.</a>
1310 This applies to both Apache and IIS.</p>
1311 <p><b><u>IIS</u></b></p>
1312 <p>The IIS RM module supports the mapping of attributes via AAP files, but
1313 it does not support rule-based policies and therefore cannot protect static
1314 content at this time. In addition, all of the configuration settings are
1315 managed globally or per-site and are pulled from the <span class="fixed">
1316 shibboleth.xml</span> file, so there are no additional commands to document
1319 <p><b><u>Apache</u></b></p>
1320 <p>The Apache RM module provided can interpret AAP settings to map
1321 attributes to HTTP request headers and to <span class="fixed">Require</span>
1322 rules, permitting protecting of both static and dynamic content. The
1323 commands described here can appear in content-specific configuration blocks
1324 or <span class="fixed">.htaccess</span> files. They determine what content
1325 is to be protected, session policies, and static access control rules.</p>
1326 <p>Any of the typical ways of protecting content may be used (.htaccess,
1327 Directory, Location, Files, etc.). There are two ways to trigger Shibboleth
1328 authentication: specifying an <span class="fixed">AuthType</span> of
1329 <span class="fixed">shibboleth</span> to use Shibboleth directly, or using
1330 <span class="fixed">ShibBasicHijack</span> to process existing .htaccess
1331 files using Shibboleth instead. Support for authorization consists of
1332 mod_auth-style require directives, as well as support for mod_auth group
1334 <p>A complete list of the directives and their values is below:</p>
1336 <dd class="attribute"><span class="fixed">AuthType <string></span></dd>
1337 <dd class="value">Use <span class="fixed">shibboleth</span> for direct
1338 invocation, or <span class="fixed">Basic</span> plus the
1339 <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1340 <dd class="attribute"><span class="fixed">ShibSSLOnly <on/off></span></dd>
1341 <dd class="value">Controls whether Shibboleth will reject non-SSL
1342 requests for resources from clients. Defaults to <span class="fixed">off</span>.</dd>
1343 <dd class="attribute"><span class="fixed">ShibBasicHijack <on/off></span></dd>
1344 <dd class="value">Controls whether Shibboleth should or should not
1345 ignore requests with <span class="fixed">AuthType Basic</span>. Defaults
1346 to <span class="fixed">off</span>.</dd>
1347 <dd class="attribute"><span class="fixed">ShibExportAssertion <on/off></span></dd>
1348 <dd class="value">Controls whether the SAML attribute assertion provided
1349 by the AA is exported in a base64-encoded HTTP header,
1350 <span class="fixed">Shib-Attributes</span>. Defaults to
1351 <span class="fixed">off</span>. While this does require parsing the raw
1352 XML, it also permits an application to see attributes that may have been
1353 filtered by an AAP, or to forward the SAML assertion to a third party.</dd>
1354 <dd class="attribute"><span class="fixed">ShibAuthLifetime <seconds></span></dd>
1355 <dd class="value">If set, sessions are always terminated after the
1356 specified number of seconds, resulting in a new redirect and request for
1357 authentication, just as if a new request without a session is received.
1358 Defaults to infinite.</dd>
1359 <dd class="attribute"><span class="fixed">ShibAuthTimeout <seconds></span></dd>
1360 <dd class="value">If set, sessions are always terminated after the
1361 specified number of seconds of inactivity (defined as no requests
1362 received in that session), resulting in a new redirect and request for
1363 authentication, just as if a new request without a session is received.
1364 Defaults to infinite.</dd>
1365 <dd class="attribute"><span class="fixed">AuthGroupFile <pathname></span></dd>
1366 <dd class="value">Same as mod_auth; collects values found in REMOTE_USER
1367 into a named group for access control. An attribute must be mapped to
1368 REMOTE_USER for this to work. Note that mod_auth will not support group
1369 files when mod_shibrm is loaded, since they share the same command.
1370 <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is
1371 implemented</a> by placing a <span class="fixed">.htaccess</span> file
1372 that references a group file stored at <span class="fixed">/pathname</span>:</p>
1374 <p><span class="fixed">AuthGroupFile /pathname<br>
1375 require group workgroup</span></p>
1378 <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1379 AuthGroupFile</a> used by Shibboleth might resemble:<br>
1380 <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1382 <dd class="attribute"><span class="fixed">Require <string></span></dd>
1383 <dd class="value">Enforce authorization using one of the following
1384 methods.<ul type="circle">
1385 <li><span class="fixed">valid-user</span><blockquote>
1386 <p>Any Shibboleth user from a trusted origin site is accepted,
1387 even if no actual attributes are received. This is a very
1388 minimal kind of policy, but is useful for testing or for
1389 deferring real policy to an application.</p>
1392 <p><span class="fixed">user</span></p>
1394 <p>A space-delimited list of values, such as from the
1395 <span class="fixed">
1396 urn:mace:dir:attribute-def:eduPersonPrincipalName</span>
1397 attribute. Actually, any attribute can be mapped to REMOTE_USER,
1398 even if this doesn't always make sense.</p>
1401 <li><span class="fixed">group</span><blockquote>
1402 <p>A space-delimited list of group names defined within
1403 <span class="fixed">AuthGroupFile</span> files, again provided
1404 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1407 <li><span class="fixed"><alias></span><blockquote>
1408 <p>An arbitrary rule name that matches an Alias defined in an
1409 AAP file. The rule value is a space-delimited list of attribute
1410 values, whose format depends on the attribute in question (e.g.
1411 an affiliation rule might look like:</p>
1412 <p><span class="fixed">require affiliation staff@osu.edu
1413 faculty@mit.edu</span></p>
1417 <p>Additionally, for <span class="fixed">user</span> and
1418 <span class="fixed"><alias></span>-based rules, if a tilde character is
1419 placed immediately following <span class="fixed">user</span> or
1420 <span class="fixed"><alias></span>, the expressions that follow are
1421 treated as regular expressions. The syntax supported is generally based
1422 on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1423 XML Schema</a>. This specification borders on unreadable, but the syntax
1424 is generally Perl-like. Expressions should generally be "anchored" with
1425 the ^ and $ symbols to insure mid-string matches don't cause false
1427 <p>For example, the rule:<br>
1428 <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1429 </span>would evaluate to allowing anyone with an <span class="fixed">
1430 affiliation</span> of <span class="fixed">member</span> from a .edu
1434 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1436 <p>Shibboleth allows a user and a site to release a varying set of
1437 attributes to a destination site, and does not impose restrictions on the
1438 kinds of attribute information provided by an AA. Target implementations
1439 must be prepared to examine the attributes they receive and filter them
1440 based on policies about what information to permit an origin site to assert
1441 about its users.</p>
1442 <p>Attribute acceptance is the process of defining acceptable attributes and
1443 filtering attribute values before passing them on to a resource manager,
1444 such as the <span class="fixed">mod_shibrm</span> module. Data blocked by
1445 AAP filters will not be passed to the CGI environment or used when enforcing
1446 <span class="fixed">.htaccess</span> rules. Note that the attribute
1447 assertion exported to the <span class="fixed">Shib-Attributes</span> header
1449 <p>The Shibboleth implementation supports Scoped and Simple attributes and
1450 filtering policies for different kinds of attributes, and is potentially
1451 extensible to more complex attributes in the future. An attribute is
1452 considered Scoped if the XML representation of its values contains a "Scope"
1453 attribute. As of 1.1, this is detected at runtime and requires no
1454 configuration in advance.</p>
1455 <p><b>An essential part of the Shibboleth trust fabric is ensuring that
1456 sites only assert attributes for domains for which they are considered
1457 authoritative by the target. Typically, this means that Brown University
1458 will be trusted to assert attributes only scoped to <span class="fixed">
1459 brown.edu</span>. Unless there are very specific circumstances requiring
1460 this restriction be removed, it is strongly encouraged that such policies be
1464 <p>Scoped attributes are a special kind of attribute whose values are a
1465 combination of a <span class="fixed">value</span> and a
1466 <span class="fixed">scope</span>, or <span class="fixed">context</span>
1467 for the value. An example is <span class="fixed">
1468 eduPersonScopedAffiliation</span>, which adds a scope to the defined set
1469 of <span class="fixed">eduPersonAffiliation</span> values, such as
1470 <span class="fixed">student</span>, <span class="fixed">member</span>,
1471 or <span class="fixed">faculty</span>. Scopes are expressed as DNS
1472 domains and subdomains.</p>
1473 <p>Any <span class="fixed">scoped</span> attribute can be scoped only to
1474 the origin site's permitted domains. These domains are listed in the
1475 site metadata that provides policy information to the system. Domains
1476 can be explicit or regular expressions, and can be changed by a target
1477 to meet its needs. Targets can also override the rules specified for the
1478 site in their own AAPs, choosing to accept additional scopes or deny
1479 scopes that would ordinarily be accepted based on metadata provided by a
1480 federation. Thus, attribute acceptance processing for
1481 <span class="fixed">scoped</span> attributes is based on site metadata
1482 and target-specified overrides in addition to the mechanism described
1483 below for <span class="fixed">simple</span> attributes.</p>
1484 <p>Scope rules specified in an AAP are additive with any domains
1485 permitted by site metadata, and the rules are applied by first looking
1486 for an applicable denial rule, and then looking at site metadata and any
1487 applicable site rules for an accept rule.</p>
1491 <p>Simple attributes are attributes whose value is expressed in XML as a
1492 Text node; that is, the value is just a string. Multiple values are
1493 permitted. <span class="fixed">eduPersonEntitlement</span>, in which the
1494 values are URIs, is one example of a simple attribute.</p>
1495 <p>Both Simple and Scoped attribute acceptance is controlled with an
1496 external policy file written in XML. The schema for the file is
1497 described by the <span class="fixed">shibboleth.xsd</span> schema, and
1498 an example file is included, <span class="fixed">AAP.xml</span>. It is
1499 mandatory to supply such a file, because attributes are recognized based
1500 on their presence in this file, and not by separate configuration
1501 processes. Only by listing an attribute in the file will it be accepted
1502 and processed by the RM.</p>
1503 <p>The policy is a default-deny algorithm that requires permissible
1504 attributes and values be listed explicitly. That is, an empty file
1505 permits nothing. Each attribute to be supported must be listed in the
1506 file by name in an <span class="fixed"><AttributeRule></span>. Each such
1507 rule is a collection of <span class="fixed"><SiteRule></span> elements
1508 along with an optional <span class="fixed"><AnySite></span> default
1509 rule. In turn each site rule is a set of <span class="fixed"><Value></span>
1510 rules that specify matches to permit, either literal or regular
1511 expressions, or a wildcarded <span class="fixed"><AnyValue></span>
1512 default rule, which is equivalent to a single regular expression rule
1513 allowing anything.</p>
1515 <p>A syntax summary follows:</p>
1517 <p><span class="fixed"><AttributeAcceptancePolicy</span></p>
1519 <p>The top level element in the file.</p>
1521 <p><span class="fixed"><AttributeRule<br>
1522 Name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"<br>
1523 Header="Shib-EP-Affiliation" Alias="affiliation"></span></p>
1525 <p>Specifies a rule for an attribute, named by its URI. The
1526 following XML attributes can be supplied:</p>
1527 <table border="1" cellpadding="5" cellspacing="5">
1529 <td><span class="fixed">Name</span></td>
1530 <td>The name of the Shibboleth attribute, usually a URI.
1531 This is the only required XML attribute.</td>
1534 <td><span class="fixed">Namespace</span></td>
1535 <td>If the attribute's name includes a SAML namespace,
1536 supply it here. Normally this is unused.</td>
1539 <td><span class="fixed">Header</span></td>
1540 <td>The HTTP request header to map the attribute's values
1544 <td><span class="fixed">Alias</span></td>
1545 <td>A short name for the attribute, determines the name of
1546 the Apache <span class="fixed">Requires</span> rule.</td>
1550 <p><span class="fixed"><AnySite></span></p>
1552 <p>Specifies a rule that always applies to the attribute, regardless
1553 of the asserting AA.</p>
1555 <p><span class="fixed"><SiteRule Name="host.domain.com"></span></p>
1557 <p>A rule that applies to the origin site AA corresponding to the
1560 <p><span class="fixed"><Scope Accept="true|false" Type="type"></span></p>
1562 <p>Specifies a value to accept or deny, either directly using
1563 <span class="fixed">type</span> <span class="fixed">literal</span>,
1564 or using a set of matching expressions as <span class="fixed">type</span>
1565 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1566 is the default if <span class="fixed">Type</span> is not specified.
1567 Accept defaults to "true">.</p>
1569 <p><span class="fixed"><AnyValue></span></p>
1571 <p>Specifies a rule that always applies to the attribute and site,
1572 regardless of the value(s).</p>
1574 <p><span class="fixed"><Value Type="type"></span></p>
1576 <p>Specifies a value to permit, either directly using
1577 <span class="fixed">type</span> <span class="fixed">literal</span>,
1578 or using a set of matching expressions as <span class="fixed">type</span>
1579 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1580 is the default if <span class="fixed">Type</span> is not specified.</p>
1583 <p>The regular expression syntax is a subset of the usual Perl and Unix
1584 syntaxes that is described in the XML Schema specification by the W3C. Most
1585 typical expressions should work. Be sure to anchor them using
1586 <span class="fixed">^</span> and <span class="fixed">$</span> to avoid
1587 unintentional matches midstring.</p>
1589 <h4><a name="4.f."></a>4.f. Using Attributes in Applications</h4>
1591 <p>Apart from the simple RM functionality provided, attribute information
1592 may be made available directly to applications via the standard practice of
1593 creating custom HTTP request headers before passing control to the
1594 application. Applications should make no assumption about the presence of
1595 specific attributes for their use unless they have intimate knowledge of the
1596 attribute release policies in place.</p>
1597 <p>The AAP metadata controls this interface, and maps a Shibboleth attribute
1598 to a header name, such as <span class="fixed">Shib-EP-Affiliation</span>.
1599 Using that example, any values of the mapped attribute will be placed in
1600 that header, delimited by semicolons. An application that uses a CGI-like
1601 syntax to access the header will find the values in the <span class="fixed">
1602 HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any
1603 header, to drive legacy applications that expect information in a particular
1605 <p>The <span class="fixed">REMOTE_USER</span> variable is a special case
1606 that is generally populated automatically by the web server based on an
1607 internal piece of data that represents the current <span class="fixed">
1608 username</span>. Unlike many authentication modules, Shibboleth does not
1609 guarantee that <span class="fixed">REMOTE_USER</span> will have any value,
1610 because users may remain anonymous in many cases. If it does have a value,
1611 it is set solely because of an AAP file that maps an attribute to that
1612 header name. For many purposes, the <span class="fixed">
1613 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be
1614 mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be
1615 provided by the AA, and <span class="fixed">REMOTE_USER</span> might still
1617 <p>The <span class="fixed">Shib-Origin-Site</span> variable will contain the
1618 unique name/identifier of the origin site of the user. Some applications may
1619 use this to lookup additional policy or application data. It normally takes
1620 the form of a URI but could be any string in some deployments.</p>
1621 <p>Finally, configuration may instruct the web server to place the entire
1622 XML message containing the SAML attribute information from the AA into a
1623 base64-encoded header called <span class="fixed">Shib-Attributes</span>.
1624 This is a raw interface that provides an application with the entire AA
1625 response, and is not a filtered view based on any attribute acceptance rules
1626 or even based on what attributes are recognized by the target. What was sent
1627 is what you see.</p>
1629 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
1631 <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span>
1632 in the <span class="fixed">/opt/shibboleth/bin</span> folder of the
1633 distribution to maintain metadata files referenced by <span class="fixed">
1634 shibboleth.xml</span>. It will return 0 on success and a negative number on
1635 failure and log errors to <span class="fixed">stderr</span>. If the data in
1636 the new metadata file is bad or the signature is invalid, the existing copy
1637 is kept. The SHAR and SHIRE stat all metadata files each time the data is
1638 used, allowing them to detect and utilize updates in real-time operation.</p>
1639 <p><span class="fixed">siterefresh</span> takes the following command-line
1642 <dd class="attribute"><span class="fixed">--url <URL></span> </dd>
1643 <dd class="value">Specifies the <span class="fixed">URL</span> of the
1644 remote metadata file with which to update the local file.</dd>
1645 <dd class="attribute"><span class="fixed">--out <pathname></span> </dd>
1646 <dd class="value">Specifies the local file to which to write the new
1648 <dd class="attributeopt"><span class="fixed">--cert <pathname></span>
1650 <dd class="valueopt">Specifies the location of a certificate stored in
1651 <span class="fixed">PEM</span> format used to validate the signature of
1652 the metadata file. Since much of Shibboleth's security flows from
1653 metadata files, this option is highly recommended, and the certificate
1654 used should be verified independently.</dd>
1655 <dd class="attributeopt"><span class="fixed">--schema <pathname></span>
1657 <dd class="valueopt">Optionally defines a base path for schemas to use
1658 when validating the file. Defaults to <span class="fixed">
1659 /opt/shibboleth/etc/shibboleth/</span>.</dd>
1661 <p>A complete command issued to <span class="fixed">siterefresh</span> might
1664 <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out sites.xml
1665 --cert internet2.pem \<br>
1666 --url http://wayf.internet2.edu/InQueue/sites.xml </span></p>
1668 <p>It is recommended that similar commands be added to a <span class="fixed">
1669 crontab</span> to keep the site and trust files refreshed. AAP files tend to
1670 be site-specific, but could be maintained and distributed centrally. If the
1671 command is invoked in a script that writes the file to a new location and
1672 compares it with the old contents before overwriting the original, the
1673 command could be run very often without impacting target operations,
1674 providing a high degree of currency in case sites become compromised.</p>
1676 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
1678 <p>Shibboleth includes a useful plugin that extends the default memory cache
1679 for storing session data in the SHAR with a backing cache using an embedded
1680 MySQL database. In most distributions, it is enabled by default. The plugin
1681 can be found in the <span class="fixed">/opt/shibboleth/libexec</span>
1682 folder, and is loaded as an extension library using the <span class="fixed">
1683 [extensions:saml]</span> section of <span class="fixed">shibboleth.xml</span>.
1684 The following configuration options are available:</p>
1686 <dd class="attributeopt"><span class="fixed">mysql-cache-timeout =
1687 <seconds> (in [shar] section)</span></dd>
1688 <dd class="valueopt">Specifies the duration in <span class="fixed">
1689 seconds</span> that must elapse between user accesses before that user's
1690 session is purged from the persistent cache. Defaults to
1691 <span class="fixed">28800</span> seconds, or 8 hours. This should
1692 generally be longer than the associated server's settings for session
1693 lifetime and timeout, and the memory cache's timeout.</dd>
1694 <dd class="attributeopt"><span class="fixed"><MySQL Arguments>
1695 (one per line in [mysql] section)</span></dd>
1696 <dd class="valueopt">To pass arguments to the MySQL engine, create
1697 argument lines in the <span class="fixed">[mysql]</span> section in the
1699 <blockquote class="fixed">
1700 <p>arg1=<argument><br>
1701 arg2=<argument><br>
1704 <p>Important arguments you'll find by default include: </p>
1705 <blockquote class="fixed">
1706 <p>arg1 = --language=/opt/shibboleth/share/english<br>
1707 arg2 = --datadir=/opt/shibboleth/data</p>
1709 <p>which set the message file path and the location of the cache's
1710 database files respectively. Make sure the data directory exists before
1711 starting the SHAR if you change this path.</dd>
1717 <h3><a name="5."></a>5. Troubleshooting</h3>
1718 <p>This section provides basic information about testing Shibboleth targets.
1719 This information is not intended to be comprehensive, but instead rudimentary
1720 guidelines for basic configuration tests and problems. For more detailed
1721 information or answers to specific problems not addressed in this section,
1722 please mail <a href="mailto:mace-shib-users@internet2.edu">
1723 mace-shib-users@internet2.edu</a> with a thorough description of errors and
1724 configurations used.</p>
1725 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
1727 <p>The target may be tested by generating a folder with very basic access
1728 controls on it, and accessing it using a web browser. Place a simple webpage
1729 such as <span class="fixed">index.html</span> in <span class="fixed">
1730 /secure/</span>. Then, add the following lines to <span class="fixed">
1731 httpd.conf</span>, which should be removed when testing is over:</p>
1733 <p><span class="fixed"># Configure a test directory<br>
1734 <Location /secure><br>
1735 AuthType shibboleth<br>
1736 require valid-user<br>
1738 # Per-directory SHIRE Configuration<br>
1739 #ShibBasicHijack On<br>
1740 #ShibSSLOnly On<br>
1741 #ShibAuthLifetime 60<br>
1742 #ShibAuthTimeout 600<br>
1744 # RM Configuration<br>
1745 #AuthGroupFile /foo<br>
1746 #ShibExportAssertion On<br>
1747 </Location><br>
1750 <p><b>For information regarding specific error messages that may be
1751 generated if the target does not work successfully, please refer to section
1752 <a href="#5.b.">5.b.</a>, or write
1753 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.</b></p>
1755 <h4><a name="5.b."></a>5.b. Common Problems</h4>
1757 <p>A knowledge base is being developed in the
1758 <a href="http://www.columbia.edu/~wassa/shib.faq/shibboleth-faq.html">
1759 Shibboleth Deployer's FAQ</a>. Please mail
1760 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>
1761 with any additional questions or problems encountered that are not answered
1762 by this basic guide.</p>