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 used for protection of production content. The example private key bundled with the distribution is publically available, widely circulated, and well-known; also, the default federation
132 and trust metadata is for testing purposes only. For information about securing a Shibboleth deployment, please refer to the production guide. Shibboleth should only be used to protect sensitive content when deployed carefully in conjunction with proper trust settings and policies.</h3>
134 <p>Insert features here.</p>
136 <p>Before starting, please sign up for all applicable
137 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing
138 lists</a>. Announcements pertinent to Shibboleth deployments and developments
139 and resources for deployment assistance can be found here.</p>
140 <p>Please send any questions, concerns, or eventual confusion to
141 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.
142 This should include, but not be limited to, questions about the documentation,
143 undocumented problems, installation or operational issues, and anything else
144 that arises. Please ensure that you have the
145 <a href="http://shibboleth.internet2.edu/release/shib-download.html">appropriate
146 tarball</a> for your operating system.</p>
153 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
156 <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
158 <li><a href="#1.a."><font color="black">Origin</font></a></li>
159 <li><a href="#1.b."><font color="black">Target</font></a></li>
160 <li><a href="#1.c."><font color="black">WAYF</font></a></li>
161 <li><a href="#1.d."><font color="black">Federations</font></a></li>
165 <h4><a href="#2."><font color="black">Planning</font></a></h4>
167 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
168 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
169 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
170 <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
171 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
172 <li><a href="#2.f."><font color="#000000">Attribute Acceptance Policies</font></a></li>
173 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
174 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
175 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
179 <h4><a href="#3."><font color="black">Installation</font></a></h4>
181 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
182 <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
183 <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
184 <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
185 <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
189 <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
191 <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
192 shibboleth.xml</span></font></a></li>
193 <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
194 <li><a href="#4.c."><font color="black">Key Generation and Certificate
195 Installation</font></a></li>
196 <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
197 <li><a href="#4.e."><font color="black">Defining Attributes and
198 Acceptance Policies</font></a></li>
199 <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
200 <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
201 <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
205 <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
207 <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
208 <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
217 <h3><a name="1."></a>1. Shibboleth Overview</h3>
218 <p>Shibboleth is a system designed to exchange attributes across realms for the
219 primary purpose of authorization. It provides a secure framework for one
220 organization to transmit attributes about a web-browsing individual across
221 security domains to another institution. In the primary usage case, when a user
222 attempts to access a resource at a remote domain, the user's own home security
223 domain can send certain information about that user to the target site in a
224 trusted exchange. These attributes can then be used by the resource to help
225 determine whether to grant the user access to the resource. The user may have
226 the ability to decide whether to release specific attributes to certain sites by
227 specifying personal Attribute Release Policies (ARP's), effectively preserving
228 privacy while still granting access based on trusted information.</p>
229 <p>When a user first tries to access a resource protected by Shibboleth, they
230 are redirected to a service which asks the user to specify the organization from
231 which they want to authenticate. If the user has not yet locally authenticated
232 to a WebISO service, the user will then be redirected to their home
233 institution's authentication system. After the user authenticates, the
234 Shibboleth components at the local institution will generate a temporary
235 reference to the user, known as a handle, for the individual and send this to
236 the target site. The target site can then use the handle to ask for attributes
237 about this individual. Based on these attributes, the target can decide whether
238 or not to grant access to the resource. The user may then be allowed to access
239 the requested materials.</p>
240 <p>There are several controls on privacy in Shibboleth, and mechanisms are
241 provided to allow users to determine exactly which information about them is
242 released. A user's actual identity isn't necessary for many access control
243 decisions, so privacy often is needlessly compromised. Instead, the resource
244 often utilizes other attributes such as faculty member or member of a certain
245 class. While these are commonly determined using the identity of the user,
246 Shibboleth provides a way to mutually refer to the same principal without
247 revealing that principal's identity. Because the user is initially known to the
248 target site only by a randomly generated temporary handle, if sufficient, the
249 target site might know no more about the user than that the user is a member of
250 the origin organization. This handle should never be used to decide whether or
251 not to grant access, and is intended only as a temporary reference for
252 requesting attributes.</p>
253 <h4><a name="1.a."></a>1.a. Origin</h4>
255 <p>There are four primary components to the origin side in Shibboleth: the
256 Attribute Authority (AA), the Handle Service (HS), the directory service,
257 and the local sign-on system (SSO). The AA and HS are provided with
258 Shibboleth, and an open-source WebISO solution Pubcookie is also supplied;
259 the directory is provided by the origin site. Shibboleth is able to
260 interface with a directory exporting an LDAP interface or a SQL database
261 containing user attributes, and is designed such that programming interfaces
262 to other repositories should be readily implemented. Shibboleth relies on
263 standard web server mechanisms to trigger local authentication. A .htaccess
264 file can be easily used to trigger either the local WebISO system or the web
265 server's own Basic Auth mechanism, which will likely utilize an enterprise
266 authentication system, such as Kerberos.</p>
267 <p>From the origin site's point of view, the first contact will be the
268 redirection of a user to the handle service, which will then consult the SSO
269 system to determine whether the user has already been authenticated. If not,
270 then the browser user will be asked to authenticate, and then sent back to
271 the target URL with a handle bundled in an attribute assertion. Next, a
272 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
273 which will include the previously mentioned handle. The AA then consults the
274 ARP's for the directory entry corresponding to the handle, queries the
275 directory for these attributes, and releases to the SHAR all attributes the
276 SHAR is entitled to know about that user.</p>
278 <h4><a name="1.b."></a>1.b. Target</h4>
280 <p>There are three primary components to the target side in Shibboleth: the
281 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
282 Requester (SHAR), and the resource manager (RM). An implementation of each
283 of these is included in the standard Shibboleth distribution. These
284 components are intended to run on the same web server.</p>
285 <p>From the target's point of view, a browser will hit the RM with a request
286 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
287 in, which will use the WAYF to acquire the name of a handle service to ask
288 about the user. The handle service (HS) will then reply with a SAML
289 authentication assertion containing a handle, which the SHIRE then hands off
290 to the SHAR. The SHAR uses the handle and the supplied address of the
291 corresponding attribute authority (AA) to request all attributes it is
292 allowed to know about the handle. The SHAR performs some basic validation
293 and analysis based on attribute acceptance policies (AAP's). These
294 attributes are then handed off to the RM, which is responsible for using
295 these attributes to decide whether to grant access.</p>
297 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
299 <p>The WAYF service can be either outsourced and operated by a federation or
300 deployed as part of the SHIRE. It is responsible for allowing a user to
301 associate themself with an institution of their specification, then
302 redirecting the user to the known address for the handle service of that
305 <h4><a name="1.d."></a>1.d. Federations</h4>
307 <p>A federation is one way to provide part of the underlying trust required
308 for function of the Shibboleth architecture. A federation in the context of
309 Shibboleth is a group of organizations(universities, corporations, content
310 providers, etc.) who agree to exchange attributes using the SAML/Shibboleth
311 protocols and abide by a common set of policies and practices. In so doing,
312 they must implicitly or explicitly agree to a common set of guidelines.
313 Joining a federation is not explicitly necessary for operation of
314 Shibboleth, but it dramatically expands the number of targets and origins
315 that can interact without defining bilateral agreements between all these
317 <p>A federation can be created in a variety of formats and trust models, but
318 to support Shibboleth, it must provide a certain set of services to
319 federation members. It needs to supply a registry to process applications to
320 the federation and distribute membership information to the origin and
321 target sites. This must include distribution of the PKI components necessary
322 for trust between origins and targets. There also needs to be a set of
323 agreements and best practices defined by the federation governing the
324 exchange, use, and population of attributes before and after transit, and
325 there should be a way to find information on local authentication and
326 authorization practices for federation members.</p>
329 <h3><a name="2."></a>2. Planning</h3>
330 <p>There are several essential elements that must be present in the environment
331 to ensure Shibboleth functions well, both political and technical. Shibboleth
332 currently runs on a specific range of platforms and web server environments. The
333 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations
334 and requirements for a successful implementation of a Shibboleth target.</p>
335 <h4><a name="2.a."></a>2.a. Requirements</h4>
337 <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and
338 Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a
339 separate SHAR process. The plugins use the ONC RPC mechanism to communicate
340 with the SHAR over Unix domain or TCP sockets. The target's web servers must
341 be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a>
342 1.3.26+, or Microsoft IIS 4.0+, but not Apache 2. More precise technical
343 details are discussed in <a href="#3.a.">3.a</a>.</p>
345 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
347 <p>While it is not necessary for a target or origin to join a federation,
348 doing so greatly facilitates the implementation of multilateral trust
349 relationships. Each federation will have a different application process.</p>
350 <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or
351 the Shibboleth v1.0 architectural document.</p>
352 <p>To use Shibboleth without a federation, manual configuration of target
353 and origin trust and site information will be needed to insure that sites
354 interoperate. Most identifiers, such as site names, should be URI-based, and
355 should be chosen in accordance with DNS domains under the control of the
356 parties involved, much as Java package naming is coordinated. In other
357 words, don't use a URI containing a DNS domain or hostname that you do not
360 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
362 <p>Shibboleth's protocols and software have been extensively engineered to
363 provide protection against many attacks. However, the most secure protocol
364 can be compromised if it is placed in an insecure environment. To ensure
365 Shibboleth is as secure as possible, there are several recommended security
366 precautions which should be in place at local sites.</p>
368 <li>SSL use is optional for target sites, but should be used if at all
369 possible, at least in the processing of incoming sessions (called the
370 SHIRE URL or assertion consumer service). Federation guidelines should
371 be considered when determining whether to implement SSL, and, in
372 general, SSL should be used for interactions with client machines to
373 provide the necessary authentication and encryption to ensure protection
374 from man-in-the-middle attacks. It is strongly suggested that all
375 password traffic or similarly sensitive data should be SSL-protected.
376 Assessment of the risk tradeoff against possible performance degradation
377 should be performed for all applications.</li>
378 <li>Many other attacks can be made on the several redirection steps that
379 Shibboleth takes to complete attribute transfer. The best protection
380 against this is safeguarding the WAYF service and ensuring that rogue
381 targets and origins are not used, generally by development of the trust
382 model underneath Shibboleth. Shibboleth also leverages DNS for security,
383 which is not uncommon, but attacks concerning bad domain information
384 should be considered.</li>
385 <li>Information regarding origin users is generally provided by the
386 authoritative enterprise directory, and the acceptance of requests from
387 target applications can be carefully restricted to ensure that all
388 requests the SHAR performs are authorized and all information the origin
389 provides is accurate. Use of plaintext passwords is strongly advised
391 <li>Server platforms should be properly secured, commensurate with the
392 level that would be expected for an organization's other security
393 services, and cookie stores on client machines should be well protected.</li>
396 <h4><a name="2.d."></a>2.d. Server Certs</h4>
398 <p>In the Shibboleth architecture, the SHAR, HS, and AA must all have
399 various client and/or server certificates for use in signing assertions and
400 creating SSL channels. These should be issued by a commonly accepted CA,
401 which may be stipulated by your federation. After understanding the CA's
402 acceptible to your federations, consult chapter <a href="#4.c.">4.c</a> for
403 information on certificate and key generation.</p>
405 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
407 <p>The Attribute Authority maintains a set of rules called Attribute Release
408 Policies (ARP's) that define which attributes are released to which targets.
409 When a browser user tries to access a resource, the SHAR asks the origin
410 site AA to release all the attributes it is allowed to know, possibly
411 restricted to specifically desired subset. The SHAR provides its own name
412 and an optional URL on behalf of which the attribute request is made which
413 can further refine the information the SHAR is allowed to know. The AA
414 processes this request using all applicable ARP's, determines which
415 attributes and values it will release, and then obtains the values actually
416 associated with the browser user. The AA sends these attributes and values
417 back to the SHAR.</p>
418 <p>Targets should work together with expected origin sites to ensure that
419 the sets of attributes that both sites expect to correspond using are
422 <h4><a name="2.f."></a>2.f. Attribute Acceptance Policies</h4>
424 <p>When a target receives a set of attributes, it must evaluate them in the
425 context of the Attribute Authority that is providing them, to assess their
426 "reasonableness". For example, if the value of an attribute is expected to
427 be from a small set of enumerated choices, the value should be compared
428 against that list. If a particular attribute or value is only trusted when
429 asserted by specific origins, that too should be checked.</p>
430 <p>Targets are configured to accept specific attributes that they understand
431 and care about, and are also configured with the rules to apply before
432 accepting the attributes for use by the RM or an application. Attributes and
433 values that don't meet the target's requirements are filtered out. The set
434 of configuration rules to make these decisions is called an Attribute
435 Acceptance Policy (AAP).</p>
437 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
439 <p>A primary Shibboleth design consideration was to require very little or
440 no modification to client machines. The only requirement is that a browser
441 is used which supports cookies, redirection and SSL. Browser users will have
442 to perform an additional click to submit the authentication assertion if
443 JavaScript is not functional.</p>
445 <h4><a name="2.h."></a>2.h. Clocks</h4>
447 <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should be run on all
448 web servers. Shibboleth employs a short handle issuance time to protect
449 against replay attacks. Because of this, any significant degree of clock
450 skew can hinder the ability of users to access sites successfully.</p>
452 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
454 <p>Especially for higher education, there are a handful of laws enacted
455 which may have important ramifications on the disclosure of personal
456 information and attributes. Since Shibboleth does not necessarily need to
457 transmit identity, it is an ideal solution for many higher education
458 situations. Nevertheless, all parties within the United States of America
459 are strongly advised to consult the
460 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
461 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
462 legislation before deploying Shibboleth.</p>
467 <h3><a name="3."></a>3. Installation</h3>
468 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
469 <p>The Shibboleth project makes binary packages available for Solaris and Linux
470 that are precompiled against recent releases of various required libraries such
471 as OpenSSL. It is highly advisable to build from source when using Shibboleth in
472 a production environment in order to permit patching or updating of packages as
473 security holes and bugs are fixed. Building from source is necessary to give you
474 complete control over your deployment platform. The binary packages represent a
475 snapshot in time only. To build from source, see the <span class="fixed">
476 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source
478 <p>The software requirements listed correspond to the binary distributions. In
479 general, source builds should work against all recent versions of the operating
480 systems and software dependencies listed below. For specific questions, inquire
481 to the support mailing list, or give it a try. Note that OpenSSL releases
482 frequent security updates; the version listed may not be the most current, but
483 most minor "letter" updates should be usable.</p>
485 <p><b>Operating System:</b> </p>
487 <li>Windows NT/2000/XP/2003<ul type="disc">
488 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a> or
490 <p>Apache must be compiled with mod_so for DSO module support,
491 and must include SSL support (preferably using
492 <span class="fixed">mod_ssl</span>), and EAPI support (which
493 <span class="fixed">mod_ssl</span> requires and provides).
494 Shibboleth can coexist with <span class="fixed">mod_auth</span>,
495 which may be compiled or loaded into the server for use
496 elsewhere, but Shibboleth does not need or use it.</p>
497 <p>Any Apache modules used, and Apache itself, must be compiled
498 with the Microsoft DLL-based runtime, selected by compiling with
503 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
504 Shibboleth v1.1 Target for Windows</a><blockquote>
505 <p>Available in both self-installer and ZIP format, the
506 installer will prompt for an install path, change default
507 configuration files as appropriate for Windows, and set various
508 environment variables for you. A default SHAR service can also
509 be installed for you, or you can install it manually using the
510 instructions in this guide.</p>
511 <p>Note that debug/symbol versions of the libraries and software
512 are included, and may be used by appending "debug" to the
513 Shibboleth library path and using the corresponding modules and
514 binaries. If you do so, be aware that Apache and other modules
515 must also be compiled with Microsoft's debug runtime (via the /MDd
516 compiler option). In most cases, you can safely ignore or even
517 delete the debug versions.</p>
518 <p>When installing under Windows 2003, if the server is not in a
519 domain before installing IIS 6, there may be issues surrounding
520 permissions on directories.</p>
526 <li>RedHat 7.2-7.3:<ul type="disc">
527 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a><blockquote>
528 <p>Apache must be compiled with mod_so for DSO module support,
529 and must include SSL support (preferably using
530 <span class="fixed">mod_ssl</span>), and EAPI support (which
531 <span class="fixed">mod_ssl</span> requires and provides).
532 Shibboleth can coexist with <span class="fixed">mod_auth</span>,
533 which may be compiled or loaded into the server for use
534 elsewhere, but Shibboleth does not need or use it. The most
535 recent Red Hat RPM (1.3.27-2 as of this writing) is sufficient.</p>
538 <p>On Linux, Shibboleth requires that Apache and Apache-SSL be
539 built with <span class="fixed">libpthread</span>, or loading the
540 <span class="fixed">mod_shibrm</span> or <span class="fixed">
541 mod_shire</span> modules will cause Apache to stop. While
542 RedHat's Apache is compatible, Debian's Apache must be rebuilt
543 with <span class="fixed">libpthread</span>:</p>
545 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
546 $ apt-build --rebuild --reinstall install \<br>
547 apache-common apache apache-ssl</span></p>
552 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
553 Shibboleth v1.1 Target for RedHat</a></li>
554 <li><a href="http://www.openssl.org/source/">openssl-0.9.6, revision
555 <span class="fixed">i</span> or newer</a></li>
556 <li>libstdc++3-3.0.4-1.i386.rpm and libgcc-3.0.4-1.i386.rpm<blockquote>
557 <p>Shibboleth binaries are currently built with
558 <a href="http://www.gnu.org/software/gcc/gcc.html">GCC 3.04</a>,
559 and require these specific library versions. They are available
560 as RPMs and are available in the RedHat 7.2 updates directory on
562 <a href="ftp://rufus.w3.org/linux/redhat/updates/7.2/en/os/i386/">
563 RedHat mirror</a>. They can be installed alongside earlier and
564 later GCC libraries.</p>
567 <li><b>Portions of the <span class="fixed">libphp4</span> Apache
568 plugin are written in C++, as is Shibboleth. There is a known
569 conflict between the PHP extensions <span class="fixed">libpspell.so</span>
570 and <span class="fixed">libsablot.so</span> which will manifest
571 itself as segmentation faults when starting Apache. If a site wants
572 to use <span class="fixed">libphp4.so</span> and Shibboleth at once,
573 then one of the following may be done:</b><ol>
574 <li>Remove the options <span class="fixed">--with-pspell</span>
575 and <span class="fixed">--with-xslt-sablot</span> from PHP's
577 <li>Rebuild these two modules using the same version of GCC that
578 was used to compile Shibboleth.</li>
585 <li>Solaris 2.8:<ul type="disc">
586 <li><a HREF="ftp://ftp.openssl.org/source/openssl-0.9.7b.tar.gz">
589 <p>The shared library version of OpenSSL is required by
590 Shibboleth. The static libraries may be installed as well if
591 necessary for other applications, but cannot be used within
592 mod_ssl or any other Apache modules. openssl-0.9.7b, the latest
593 security fix release, has been tested, but any 0.9.7 version
597 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a><blockquote>
598 <p>Apache must be compiled with mod_so for DSO module support,
599 and must include SSL support (preferably using
600 <span class="fixed">mod_ssl</span>) and EAPI support (which
601 <span class="fixed">mod_ssl</span> requires and provides).
602 Shibboleth can coexist with <span class="fixed">mod_auth</span>,
603 which may be compiled or loaded into the server for use
604 elsewhere, but Shibboleth does not need or use it.</p>
605 <p><span class="fixed">mod_ssl</span>'s loadable module,
606 <span class="fixed">libssl.so</span>, must be compiled against
607 <span class="fixed">OpenSSL 0.9.7b</span>'s shared libraries.
608 Other versions or a statically linked build of
609 <span class="fixed">libssl.so</span> will cause failures such as
610 bus errors when used with Shibboleth.</p>
611 <p>To check how OpenSSL was built, run the <span class="fixed">
612 ldd</span> command against <span class="fixed">libssl.so</span>
613 in the Apache <span class="fixed">/libexec/</span> folder and
614 check the output for references to <span class="fixed">
615 libssl.so.0.9.7b</span>. If you see an earlier version
616 mentioned, or no mention of it at all, then <span class="fixed">
617 OpenSSL 0.9.7b</span> must be built with shared libraries from
618 source, and the Apache module rebuilt with it.</p>
622 <a href="ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/libgcc-3.2.2-sol8-sparc-local.gz">
623 libgcc v3.2.2+ and libstdc++ v3.2.2+</a><blockquote>
624 <p>Shibboleth binaries are currently built with
625 <a HREF="http://www.gnu.org/software/gcc/gcc.html">GCC 3.2.2</a>,
626 and require these specific library versions or newer. They are
627 available as Sun freeware packages and can be installed
628 alongside earlier and later GCC libraries.</p>
632 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
633 Shibboleth v1.1 Target for Solaris</a></li>
634 <li><b>Portions of the <span class="fixed">libphp4</span> Apache
635 plugin are written in C++, as is Shibboleth. There is a known
636 conflict with the PHP extensions <span class="fixed">libpspell.so</span>
637 and <span class="fixed">libsablot.so</span> which will manifest
638 itself as segmentation faults when starting Apache. If a site wants
639 to use <span class="fixed">libphp4.so</span> and Shibboleth at once,
640 then one of the following may be done:</b><ol>
641 <li>Remove the options <span class="fixed">--with-pspell</span>
642 and <span class="fixed">--with-xslt-sablot</span> from PHP's
644 <li>Rebuild these two modules using the same version of GCC that
645 was used to compile Shibboleth.</li>
652 <li>RedHat 8 and 9:<blockquote>
653 <p>RedHat 8 and 9 ship with Apache 2, which is not yet supported by
654 Shibboleth. To run Shibboleth under this OS,
655 <a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a> must
659 <p>Apache must be compiled with mod_so for DSO module support, and
660 must include SSL support (preferably using <span class="fixed">
661 mod_ssl</span>), and EAPI support (which <span class="fixed">mod_ssl</span>
662 requires and provides). Shibboleth can coexist with
663 <span class="fixed">mod_auth</span>, which may be compiled or loaded
664 into the server for use elsewhere, but Shibboleth does not need or
665 use it. The most recent Red Hat RPM (1.3.23-14 as of this writing)
669 <p>On Linux, Shibboleth requires that Apache and Apache-SSL be built
670 with <span class="fixed">libpthread</span>, or loading the
671 <span class="fixed">mod_shibrm</span> or <span class="fixed">
672 mod_shire</span> modules will cause Apache to stop. While RedHat's
673 Apache is compatible, Debian's Apache must be rebuilt with
674 <span class="fixed">libpthread</span>:</p>
676 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
677 $ apt-build --rebuild --reinstall install apache-common \<br>
678 apache apache-ssl</span></p>
683 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
684 Shibboleth 1.1 Target for RedHat</a></li>
685 <li><a href="http://www.openssl.org/source/">openssl-0.9.6, revision
686 <span class="fixed">i</span> or newer</a></li>
687 <li>libstdc++3-3.0.4-1.i386.rpm and libgcc-3.0.4-1.i386.rpm
689 <p>Shibboleth binaries are currently built with
690 <a href="http://www.gnu.org/software/gcc/gcc.html">GCC 3.04</a>,
691 and require these specific library versions. They are available
692 as RPMs and are available in the RedHat 7.2 updates directory on
694 <a href="ftp://rufus.w3.org/linux/redhat/updates/7.2/en/os/i386/">
695 RedHat mirror</a>. They can be installed alongside earlier and
696 later GCC libraries.</p>
699 <li><b>Portions of the <span class="fixed">libphp4</span> Apache
700 plugin are written in C++, as is Shibboleth. There is a known
701 conflict with the PHP extensions <span class="fixed">libpspell.so</span>
702 and <span class="fixed">libsablot.so</span> which will manifest
703 itself as segmentation faults when starting Apache. If a site wants
704 to use <span class="fixed">libphp4.so</span> and Shibboleth at once,
705 then one of the following may be done:</b>
707 <li>Remove the options <span class="fixed">--with-pspell</span>
708 and <span class="fixed">--with-xslt-sablot</span> from PHP's
710 <li>Rebuild these two modules using the same version of GCC that
711 was used to compile Shibboleth. </li>
718 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
720 <p>For the sake of clarity, this deployment guide assumes that standard
721 directories are used for all installations. These directories may be changed
722 for local implementations, but must be done so consistently.</p>
724 <li>Ensure that you have obtained the proper
725 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
726 tarball</a> or installer for your operating system.</li>
727 <li>On Unix, the tarballs expand into <span class="fixed">
728 /opt/shibboleth</span>, and should be expanded as <span class="fixed">
729 root</span> from <span class="fixed">/</span>. If you use a different
730 layout or location, you will need to adjust your configuration files.
731 You should see the following directory structure (date and size details
732 notwithstanding):<blockquote>
733 <p><span class="fixed">$ ls -l<br>
734 drwxr-xr-x 2 root root 4096 Oct 24 03:54 bin<br>
735 drwxr-xr-x 2 root root 4096 Oct 24 03:54 data<br>
736 drwxr-xr-x 2 root root 4096 Oct 24 03:54 doc<br>
737 drwxr-xr-x 4 root root 4096 Oct 24 03:54 etc<br>
738 drwxr-xr-x 9 root root 4096 Oct 24 03:54 include<br>
739 drwxr-xr-x 4 root root 4096 Oct 24 03:55 lib<br>
740 drwxr-xr-x 2 root root 4096 Oct 24 03:55 libexec<br>
741 drwxr-xr-x 4 root root 4096 Oct 24 02:02 share</span></p>
743 <p>On Windows, if the installer is not used, the zip file should be
744 unpacked beneath the root of the system drive, where it will create an
745 <span class="fixed">\opt\shibboleth</span> tree that resembles the Unix
746 layout above. This will allow the standard configuration options to
747 work. <b>The <span class="fixed">C:\opt\shibboleth\lib</span> directory
748 MUST be added to the system path to enable proper operation.</b> If you
749 use a different location, changes to various configuration files must be
750 made by hand. The installer can do this for you, and is recommended in
754 <h4><a name="3.c."></a>3.c. Configure Apache 1.3.x</h4>
757 <li>Shibboleth includes configuration directives in the file
758 <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span>
759 which must be added to the httpd.conf file used locally. It is
760 recommended that these directives simply be added to the end of the
761 existing <span class="fixed">httpd.conf</span> file rather than trying
762 to merge it in-line; <a href="#3.c.2.">step 2</a> describes the
763 necessary modifications to the Apache startup script. The default
764 configuration will often work, but if customization is necessary, these
765 options may be modified:<dl>
766 <dd class="attribute"><span class="fixed">LoadModule <module>
767 <pathname></span> </dd>
768 <dd class="value">Specifies the title and location of the
769 <span class="fixed">shibrm_module</span> resource manager and
770 <span class="fixed">shire_module</span> SHIRE modules. These are
771 installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shibrm.so</span>
772 and <span class="fixed">/opt/shibboleth/libexec/mod_shire.so</span></dd>
773 <dd class="attribute"><span class="fixed">SHIREConfig <pathname></span>
775 <dd class="value">Specifies the <span class="fixed">pathname</span>
776 of the SHIRE's configuration file. Defaults to <span class="fixed">
777 /opt/shibboleth/etc/shibboleth/shibboleth.xml</span>.</dd>
778 <dd class="attribute"><span class="fixed">SHIREURL <url><br>
779 <Location <url>><br>
780 SetHandler <method><br>
781 </Location></span></dd>
782 <dd class="value">Specifies the <span class="fixed">URL</span> and
783 the <span class="fixed">method</span> the target uses to handle
784 requests for Shibboleth-protected resources. Currently,
785 <span class="fixed">shib-shire-post</span> is the only available
786 handler <span class="fixed">method</span>. <span class="fixed">
787 SHIREURL</span> is used by Shibboleth when re-directing the user to
788 the WAYF and <span class="fixed"><Location></span> by Apache; for
789 this reason, both <span class="fixed">URL</span> specifications must
790 match. Note that the configuration file itself contains <>'s, and
791 <span class="fixed">Location</span> should not be replaced.<p>The
792 referenced <span class="fixed">URL</span> can be either a partial
793 path or an absolute URL. The partial path allows each virtual server
794 to use its own hostname and port in the SHIRE for session cookie
795 purposes, while the absolute URL forces HTTP virtual servers to use
796 HTTPS for the SHIRE. Use of a full <span class="fixed">https://</span>
798 <dd class="attribute"><span class="fixed">ShibMapAttribute
799 <attribute-uri> <HTTP-header> [alias]</span> </dd>
800 <dd class="value"><b>This command has been deprecated in favor of
801 the configuration support available in the Attribute Acceptance
802 Policy file. See <a href="#4.e.">section 4.e.</a> It may be removed
803 in a future release.</b></dd>
806 <li><a name="3.c.2."></a>These modifications must be made to the Apache
807 startup script on Unix:<p>Add the following environment variable:</p>
809 <p><span class="fixed">SHIBCONFIG=/opt/shibboleth/etc/shibboleth/shibboleth.xml<br>
810 export SHIBCONFIG</span></p>
812 <p>If the SHIBCONFIG environment variable is not specified, Shibboleth
813 will use <span class="fixed">/opt/shibboleth/etc/shibboleth/shibboleth.xml</span>
815 <p>On Windows, the installer will set the path and SHIBCONFIG variable
816 for you in the system path, enabling Apache or IIS to be used.</li>
817 <li>If the OpenSSL libraries are not in the system's search path, they
818 should be added to <span class="fixed">LD_LIBRARY_PATH</span>. Generally
819 libtool's linker options will insure that the modules can locate the
820 Shibboleth libraries, but if not, you may need to add
821 <span class="fixed">/opt/shibboleth/lib</span> to <span class="fixed">
822 LD_LIBRARY_PATH</span> as well.</li>
823 <li>The SHAR must be started along with Apache. Among other methods on
824 Unix, this can be done either by creating a separate SHAR startup script
825 or by modifying Apache's RC script to start/stop the <span class="fixed">
826 SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is
827 suggested that Apache's script be modified by adding:<blockquote>
828 <p><span class="fixed">/opt/shibboleth/bin/shar -f &</span> </p>
830 <p>Sample <span class="fixed">init.d</span> scripts may be included with
831 future releases. Ensure that the environment variable referenced in
832 <a href="#3.c.2">3.c.2</a> are in place.</p>
833 <p>On Windows, the SHAR is a service and is managed separately.</li>
834 <li>By default, the Shibboleth modules are configured to log information
835 on behalf of Apache to the file <span class="fixed">
836 /opt/shibboleth/etc/shibboleth/shire.log</span>, though this can be
837 changed. For this log to be created, Apache must have permission to
838 write to this file, which may require that the file be manually created
839 and permissions assigned to whatever user Apache is configured to run
840 under. If the file does not appear when Apache runs with the modules
841 loaded, check for permission problems. </li>
842 <li>The options in <span class="fixed">shibboleth.xml</span> must be
843 configured as documented in <a href="#4.a.">4.a</a>. Apache content will
844 then need to be modified for Shibboleth authentication. This is
845 discussed in <a href="#4.d.">4.d</a>. It is recommended that the target
846 then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
849 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
852 <li>The package includes an ISAPI filter and bundled extension for SHIRE
853 POST processing in a single library, <span class="fixed">libexec\isapi_shib.dll</span>.
854 This filter is configured using commands in <span class="fixed">
855 C:\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>. Make sure you've
856 added the library directory to the path as directed in <a href="#3.b.">
857 section 3.b.</a><p>Installing the extension into IIS is a two step
858 process:<ol type="1">
859 <li type="a">First, add the filter using the Internet Services
860 Manager MMC console. Right click on the machine icon on the left,
861 and edit the WWW Service master properties. On the "ISAPI Filters"
862 tab, add a new filter called Shibboleth and specify the DLL named
863 above. The priority should be High, and once the filter is loaded,
864 make sure it appears in the list <b>below</b> the "sspifilt" entry.
865 Restart IIS and make sure the filter shows up with a green arrow.
866 Check the Windows event log if it fails to load. The default
867 configuration options are sparse, but they should allow the filter
868 to at least initialize.</li>
869 <li type="a">Secondly, map a special file extension, such as
870 <span class="fixed">.shire</span>, to the ISAPI library so that
871 virtual URLs can be specified to invoke the SHIRE handler for each
872 web site. Right click on the machine icon on the left, and edit the
873 WWW Service master properties. On the "Home Directory" tab, add a
874 script mapping using the "Configuration" button. The "Executable"
875 box should point to <span class="fixed">isapi_shib.dll</span>, and the
876 "Extension" can be set to anything unlikely to conflict, but
877 <span class="fixed">.shire</span> is assumed (and the dot must be
878 included). You should select the option to limit verbs to POST, and
879 you must uncheck the "Check that file exists" box.</li>
880 <li type="a"><font color=#444499>(IIS 6 Only)</font> A new Web
881 Service Extension must be defined for Shibboleth; without this, the
882 mapping from <span class="fixed">*.shire</span> to <span
883 class="fixed">isapi_shib.dll</span> won't occur and a file error
884 will show. Add this extension with an arbitrary name and associate
885 it with <span class="fixed">isapi_shib.dll</span>.</li>
888 <li>All other aspects of configuration are handled via the
889 <span class="fixed">shibboleth.xml</span> file and associated XML-based
890 policy files described in subsequent sections. Particular use is made of
891 the per-hostname section feature that allows global settings to be
892 overridden per-site, and this permits different IIS instances to be
893 separately configured.</li>
894 <li>A special section must be added/uncommented in the
895 <span class="fixed">shibboleth.xml</span> file to support IIS usage. The
896 <span class="fixed">[isapi]</span> section must be used to map IIS
897 Instance ID numbers to fully-qualified hostnames that correspond to
898 named sections later in the file. Instance IDs are used in the IIS
899 metabase to identify web sites. They are applied starting with the
900 number 1 and number the web sites in order in the Internet Services
901 Manager from top to bottom. In the <span class="fixed">[isapi]</span>
902 section, add lines in the following form:
903 <blockquote class="fixed">
904 <p>1=hostname.domain.com<br>
905 2=hostname2.domain.com<br>
908 <p>At least an empty configuration section named <span class="fixed">
909 hostname.domain.com</span> should then be added to the end of the file.
910 Any options specific to that web site can be added as documented in
912 <li>See the following section for information on running the SHAR
913 service on Windows.</li>
914 <li>The options in <span class="fixed">shibboleth.xml</span> must be
915 configured as documented in <a href="#4.a.">4.a</a>. It is recommended
916 that the target then be tested as detailed in section <a href="#5.a.">
920 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
922 <p>The SHAR is a console application that is primarily designed to be
923 installed as a Windows service. To run the process in console mode for
924 testing, the <span class="fixed">-console</span> parameter is used.
925 Otherwise, parameters are used to install (or remove) the SHAR from the
926 service database and subsequent control is via the Service Control Manager
927 applet. The following command line parameters can be used:</p>
929 <dd class="attribute"><span class="fixed">-console</span></dd>
930 <dd class="value">Allows the process to be started from a command
931 prompt. Since the console will exit if the desktop user logs out, this
932 is not suitable for production use, but may be useful for testing.</dd>
933 <dd class="attribute"><span class="fixed">-config <pathname></span> </dd>
934 <dd class="value">Specifies the pathname of the SHAR's configuration
935 file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>
936 or the value of the <span class="fixed">SHIBCONFIG</span> environment
937 variable, if it is set.</dd>
938 <dd class="attribute"><span class="fixed">-install <servicename></span></dd>
939 <dd class="value">Installs the SHAR as a named service in the Windows
940 service database. A name should be provided if multiple instances of the
941 SHAR need to be run on different ports, and thus installed separately.
942 The <span class="fixed">-config</span> option can be provided to include
943 a specific configuration file on the service's command line.</dd>
944 <dd class="attribute"><span class="fixed">-remove <servicename></span></dd>
945 <dd class="value">Removes the named service instance of the SHAR from
946 the Windows service database.</dd>
952 <h3><a name="4."></a>4. Getting Running</h3>
953 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.xml</span></h4>
955 <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>
957 <blockquote><span class="fixed">
958 <a class="fixedlink" href="#confShibbolethTargetConfig"><ShibbolethTargetConfig xmlns="urn:mace:shibboleth:target:config:1.0"
959 <br> logger="/opt/local/shibboleth-1.2/etc/shibboleth/shibboleth.logger"></a>
961 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
962 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/local/shibboleth-1.2/libexec/xmlproviders.so" fatal="true"/></a>
963 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
965 <br> <a class="fixedlink" href="#confSHAR"><SHAR logger="/opt/local/shibboleth-1.2/etc/shibboleth/shar.logger"></a>
967 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
968 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/local/shibboleth-1.2/libexec/shib-mysql-ccache.so" fatal="false"/></a>
969 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
970 <br>
971 <br> <a class="fixedlink" href="#confUnixListener"><UnixListener address="/tmp/shar-socket"/></a>
973 <br> <!-- Primarily for IIS Deployments:
974 <br> <a class="fixedlink" href="#confTCPListener"><TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/></a>
975 <br> -->
976 <br>
977 <br> <a class="fixedlink" href="#confMemorySessionCache"><MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
978 <br> defaultLifetime="1800" retryInterval="300" strictValidity="true" propagateErrors="false"/></a>
979 <br>
980 <br> <a class="fixedlink" href="#confSHAR"></SHAR></a>
981 <br>
982 <br> <a class="fixedlink" href="#confSHIRE"><SHIRE logger="/opt/local/shibboleth-1.2/etc/shibboleth/shire.logger"></a>
984 <br> <a class="fixedlink" href="#confRequestMapProvider"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></a>
985 <br> <a class="fixedlink" href="#confRequestMap"><RequestMap applicationId="default"></a>
986 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="https"></a>
987 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
988 <br> <a class="fixedlink" href="#confHost"></Host></a>
989 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="http"></a>
990 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
991 <br> <a class="fixedlink" href="#confHost"></Host></a>
992 <br> <a class="fixedlink" href="#confRequestMap"></RequestMap></a>
993 <br> <a class="fixedlink" href="#confRequestMapProvider"></RequestMapProvider></a>
994 <br> <!-- IIS only:
995 <br> <a class="fixedlink" href="#confImplementation"><Implementation></a>
996 <br> <a class="fixedlink" href="#confISAPI"><ISAPI normalizeRequest="true"></a>
997 <br> <a class="fixedlink" href="#confSite"><Site id="1" host="localhost"/></a>
998 <br> <a class="fixedlink" href="#confISAPI"></ISAPI></a>
999 <br> <a class="fixedlink" href="#confImplementation"></Implementation></a>
1000 <br> -->
1001 <br> <a class="fixedlink" href="#confSHIRE"></SHIRE></a>
1003 <br> <a class="fixedlink" href="#confApplications"><Applications xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
1004 <br> applicationId="default" providerId="https://localhost/shibboleth/target"></a>
1005 <br> <a class="fixedlink" href="#confSessions"><Sessions lifetime="7200" timeout="3600" checkAddress="true"
1006 <br> shireURL="/Shibboleth.shire" shireSSL="false" cookieName="shib-default-app" cookieProps="; path=/"
1007 <br> wayfURL="https://wayf.internet2.edu/InQueue/WAYF"/></a>
1009 <br> <a class="fixedlink" href="#confErrors"><Errors shire="/opt/local/shibboleth-1.2/etc/shibboleth/shireError.html"
1010 <br> rm="/opt/local/shibboleth-1.2/etc/shibboleth/rmError.html"
1011 <br> access="/opt/local/shibboleth-1.2/etc/shibboleth/accessError.html"
1012 <br> supportContact="root@localhost"
1013 <br> logoLocation="/logo.gif"/></a>
1014 <br>
1015 <br> <a class="fixedlink" href="#confPolicy"><Policy signRequest="false" signedResponse="false" signedAssertions="false"></a>
1017 <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>
1018 <br>
1019 <br> <a class="fixedlink" href="#confFederationProvider"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"
1020 <br> uri="/opt/local/shibboleth-1.2/etc/shibboleth/sites.xml"/></a>
1021 <br>
1022 <br> <a class="fixedlink" href="#confTrustProvider"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"
1023 <br> uri="/opt/local/shibboleth-1.2/etc/shibboleth/trust.xml"/></a>
1024 <br>
1025 <br> <saml:Audience>urn:mace:inqueue</saml:Audience>
1026 <br> <a class="fixedlink" href="#confPolicy"></Policy></a>
1027 <br>
1028 <br> <a class="fixedlink" href="#confCredentialUse"><CredentialUse TLS="defcreds" Signing="defcreds"></a>
1029 <br> <a class="fixedlink" href="#confRelyingParty"><RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/></a>
1030 <br> <a class="fixedlink" href="#confCredentialUse"></CredentialUse></a>
1032 <br> <a class="fixedlink" href="#confApplications"></Applications></a>
1033 <br>
1034 <br> <a class="fixedlink" href="#confCredentialsProvider"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></a>
1035 <br> <a class="fixedlink" href="#confCredentials"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a>
1036 <br> <a class="fixedlink" href="#confFileResolver"><FileResolver Id="defcreds"></a>
1037 <br> <a class="fixedlink" href="#confKey"><Key format="PEM"></a>
1038 <br> <a class="fixedlink" href="#confPath"><Path>/opt/local/shibboleth-1.2/etc/shibboleth/shar.key</Path></a>
1039 <br> <a class="fixedlink" href="#confKey"></Key></a>
1040 <br> <a class="fixedlink" href="#confCertificate"><Certificate format="PEM"></a>
1041 <br> <a class="fixedlink" href="#confPath"><Path>/opt/local/shibboleth-1.2/etc/shibboleth/shar.crt</Path></a>
1042 <br> <a class="fixedlink" href="#confCertificate"></Certificate></a>
1043 <br> <a class="fixedlink" href="#confFileResolver"></FileResolver></a>
1044 <br> <a class="fixedlink" href="#confCredentials"></Credentials></a>
1045 <br> <a class="fixedlink" href="#confCredentialsProvider"></CredentialsProvider></a>
1047 <br><a class="fixedlink" href="#confShibbolethTargetConfig"></ShibbolethTargetConfig></a>
1049 </span></blockquote>
1051 <p>The following changes must be made to the default configuration before the target will interoperate in a federation.</p>
1054 <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>
1057 <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>
1060 <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>
1064 <p>For Apache (but not IIS), there is also information that must be
1065 configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span>
1066 (or equivalent); for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1067 <p>Information in the logging configuration files referenced by
1068 <span class="fixed">shibboleth.xml</span> may require additional changes to
1069 meet local needs. The logging level can be raised to <span class="fixed">
1070 INFO</span> or <span class="fixed">DEBUG</span> if additional detail is
1071 needed for testing. It is recommended that after initial installation is
1072 completed, the log level in both files be left at either <span class="fixed">
1073 INFO</span> or <span class="fixed">WARN</span>.</p>
1074 <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>
1075 <dd class="attribute"><a name="confAAPProvider"><span class="fixed"><AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP" uri="<i>pathname</i>"/></span></dd>
1076 <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>
1078 <!-- Removed due to complexity
1080 <dd class="attribute"><a name="confApache"><span class="fixed"><Apache apacheConfig="<i>true/false</i>"/></span></dd>
1081 <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>
1084 <dd class="attribute"><a name="confApplication"><span class="fixed"><Application <span class="mandatory">id="<i>identifier</i>"</span> providerId="<i>identifier</i>"></span></dd>
1085 <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.
1087 <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>
1088 <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>
1091 <dd class="attribute"><a name="confApplications"><span class="fixed"><Applications id="<i>identifier</i>" <span class="mandatory">providerId="<i>identifier</i>"</span>></span></dd>
1092 <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.
1094 <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>
1095 <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>
1098 <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>
1099 <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.
1101 <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>
1102 <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>
1103 <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>
1106 <dd class="attribute"><a name="confCAPath"><span class="fixed"><CAPath><i>pathname</i></CAPath></span></dd>
1107 <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>
1109 <dd class="attribute"><a name="confCertAlias"><span class="fixed"><CertAlias><i>string</i></CertAlias></span></dd>
1110 <dd class="value">Specifies the alias for the certificate
1111 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>
1113 <dd class="attribute"><a name="confCertificate"><span class="fixed"><Certificate format="<i>type</i>"></span></dd>
1114 <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>
1116 <dd class="attribute"><a name="confCredentials"><span class="fixed"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></span></dd>
1117 <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>
1119 <dd class="attribute"><a name="confCredentialsProvider"><span class="fixed"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></span></dd>
1120 <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>
1122 <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>
1123 <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>.
1125 <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>
1126 <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>
1127 <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>
1128 <li class="mandatory"><span class="fixed">supportContact</span>: Specifies a support e-mail address for the user to contact.</li>
1129 <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>
1132 <dd class="attribute"><a name="confExtensions"><span class="fixed"><Extensions></span></dd>
1133 <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>
1135 <dd class="attribute"><a name="confFederationProvider"><span class="fixed"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata" uri="<i>pathname</i>"/></span></dd>
1136 <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>
1138 <dd class="attribute"><a name="confFileResolver"><span class="fixed"><FileResolver Id="<i>string</i>"></span></dd>
1139 <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>
1141 <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>
1142 <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.
1144 <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>
1145 <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>
1146 <li><span class="fixed">port</span>: This is the port the host is listening on, if it's not standard.</li>
1147 <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>
1148 <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>
1151 <dd class="attribute"><a name="confImplementation"><span class="fixed"><Implementation></span></dd>
1152 <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>
1154 <dd class="attribute"><a name="confISAPI"><span class="fixed"><ISAPI normalizeRequest="<i>true/false</i>"></span></dd>
1155 <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>
1157 <dd class="attribute"><a name="confKey"><span class="fixed"><Key format="<i>type</i>"></span></dd>
1158 <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>
1160 <dd class="attribute"><a name="confKeyAlias"><span class="fixed"><KeyAlias><i>string</i></KeyAlias></span></dd>
1161 <dd class="value">Specifies the alias used for accessing the private
1162 key. Contained by the <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element.</dd>
1164 <dd class="attribute"><a name="confKeyPassword"><span class="fixed"><KeyPassword><i>string</i></KeyPassword></span></dd>
1165 <dd class="value">Specifies the password used to retrieve the private
1166 key. Contained by the <a href="#confKeyStoreResolver"><span class="fixed">KeyStoreResolver</span></a> element.</dd>
1168 <dd class="attribute"><a name="confKeyStoreKeyAlias"><span class="fixed"><KeyStoreKeyAlias><i>string</i></KeyStoreKeyAlias></span></dd>
1169 <dd class="value">Specifies the alias used for accessing the private
1170 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>
1172 <dd class="attribute"><a name="confKeyStoreKeyPassword"><span class="fixed"><KeyStoreKeyPassword><i>string</i></KeyStoreKeyPassword></span></dd>
1173 <dd class="value">Specifies the password used to retrieve the private
1174 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>
1176 <dd class="attribute"><a name="confKeyStorePassword"><span class="fixed"><KeyStorePassword><i>string</i></KeyStorePassword></span></dd>
1177 <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>
1179 <dd class="attribute"><a name="confKeyStorePath"><span class="fixed"><KeyStorePath><i>string</i></KeyStorePath></span></dd>
1180 <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>
1182 <dd class="attribute"><a name="confKeyStoreResolver"><span class="fixed"><KeyStoreResolver Id="<i>string</i>" storeType="<i>type</i>"></span></dd>
1183 <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>
1185 <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>
1186 <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.
1187 <ul><li class="mandatory"><span class="fixed">path</span>: This designates the complete pathname to where the library is.</li>
1188 <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>
1191 <dd class="attribute"><a name="confMemorySessionCache"><span class="fixed"><MemorySessionCache <a href="#confSessionCacheProperties">sessionCacheProperties</a>/></span></dd>
1192 <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>
1194 <dd class="attribute"><a name="confMySQLSessionCache"><span class="fixed"><MySQLSessionCache mysqlTimeout="<i>seconds</i>" <a href="#confSessionCacheProperties">sessionCacheProperties</a>/></span></dd>
1195 <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.
1197 <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>
1200 <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>
1201 <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.
1203 <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>
1204 <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>
1205 <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>
1208 <dd class="attribute"><a name="confPolicy"><span class="fixed"><Policy></span></dd>
1209 <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>
1211 <dd class="attribute"><a name="confRequestMap"><span class="fixed"><RequestMap applicationId="<i>id</i>" requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"
1212 uri="<i>URI</i>"></span></dd>
1213 <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>
1215 <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>
1216 <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>
1217 <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>
1219 <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>
1220 <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>
1222 <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>
1223 <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>
1224 <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>
1228 <dd class="attribute"><a name="confRequestMapProvider"><span class="fixed"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></span></dd>
1229 <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>
1231 <dd class="attribute"><a name="confSessions"><span class="fixed"><Sessions <span class="mandatory">wayfURL="<i>URL</i>"<br>
1232 shireURL="<i>URL</i>"</span><br>
1233 shireSSL="<i>true/false</i>"<br>
1234 <span class="mandatory">cookieName="<i>URL</i>"</span><br>
1235 cookieProps="<i>URL</i>"<br>
1236 lifetime="<i>seconds</i>"<br>
1237 timeout="<i>seconds</i>"<br>
1238 checkAddress="<i>true/false</i>"<br>/></span></dd>
1239 <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.
1241 <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>
1242 <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>
1243 <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>
1244 <li class="mandatory"><span class="fixed">cookieName</span>: Specifies the name given to in-memory session cookies that are associated with this application.</li>
1245 <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>
1246 <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>
1247 <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>
1248 <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>.
1251 <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>
1252 <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.
1254 <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>
1255 <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>
1256 <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>
1257 <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>
1258 <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>
1259 <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
1260 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>
1261 <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>
1262 <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>
1265 <dd class="attribute"><a name="confSHAR"><span class="fixed"><SHAR logger="<i>pathname</i>"></span></dd>
1266 <dd class="value">This is the container element for configuration information pertaining to the SHAR, the 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>
1268 <dd class="attribute"><a name="confShibbolethTargetConfig"><span class="fixed"><ShibbolethTargetConfig></span></dd>
1269 <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>
1271 <dd class="attribute"><a name="confSHIRE"><span class="fixed"><SHIRE logger="<i>pathname</i>"></span></dd>
1272 <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>
1274 <dd class="attribute"><a name="confSite"><span class="fixed"><Site <span class="mandatory">id="<i>IID</i>" host="<i>fqdn</i>"</span>/></span></dd>
1275 <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>
1277 <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>
1278 <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.
1279 <ul><li class="mandatory"><span class="fixed">address</span>: Specifies the address of the listener.</li>
1280 <li class="mandatory"><span class="fixed">port</span>: Specifies the TCP port on which the SHAR will listen.</li>
1281 <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>
1284 <dd class="attribute"><a name="confTrustProvider"><span class="fixed"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust" uri="<i>pathname</i>"/></span></dd>
1285 <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>
1287 <dd class="attribute"><a name="confUnixListener"><span class="fixed"><UnixListener address="<i>pathname</i>"/></span></dd>
1288 <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>
1291 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1293 <p>Shibboleth supports the dynamic generation of information in error pages
1294 referenced by <span class="fixed">shibboleth.xml</span>. The Shib Target
1295 employs a special Markup Language Processor to insert special tags into the
1296 generated HTML. The parser will read the error file looking for any tag that
1299 <p><span class="fixed"><shibmlp tag-name /></span> </p>
1301 <p>Shibboleth will replace <span class="fixed">tag-name</span> with the
1302 appropriate markup tag from the table below:</p>
1304 <dd class="attribute"><span class="fixed">supportContact</span></dd>
1305 <dd class="value">The value of the <span class="fixed">supportContact</span>
1306 for this web site.</dd>
1307 <dd class="attribute"><span class="fixed">logoLocation</span></dd>
1308 <dd class="value">The value of the <span class="fixed">logoLocation</span>
1309 for this web site. This is used to fill in the template error page only;
1310 if a custom error page is created, then the image may be linked to
1311 statically by the page itself.</dd>
1312 <dd class="attribute"><span class="fixed">requestURL</span></dd>
1313 <dd class="value">The user's requested URL.</dd>
1314 <dd class="attribute"><span class="fixed">errorType</span></dd>
1315 <dd class="value">The type of error.</dd>
1316 <dd class="attribute"><span class="fixed">errorText</span></dd>
1317 <dd class="value">The actual error message.</dd>
1318 <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1319 <dd class="value">A textual description of the error intended for human
1321 <dd class="attribute"><span class="fixed">originContactName</span></dd>
1322 <dd class="value">The contact name for the origin site provided by that
1323 site's metadata.</dd>
1324 <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1325 <dd class="value">The contact email address for the origin site provided
1326 by that site's metadata.</dd>
1327 <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1328 <dd class="value">The URL of an error handling page for the origin site
1329 provided by that site's metadata.</dd>
1331 <p>This configuration is only for Apache servers, and is only used by
1332 resources protected by Shibboleth. See <a href="#4.d.">section 4.d.</a></p>
1333 <p>Sample error templates for different kinds of errors are included in the
1334 Shibboleth distribution, and can be triggered by anything that will cause
1335 Shibboleth to be unable to make an authorization decision, including a bad
1336 sites file, certificate verification failures, or a skewed clock between
1338 <p><b>You should edit these templates, provide or remove style sheets and
1339 images, and otherwise customize these templates to suit the user experience
1340 you want your users to have when errors occur. The defaults are not likely
1341 to meet the needs of any site.</b></p>
1343 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1345 <p>The only target component that must have a private key and certificate is
1346 the SHAR. While the target server itself should support SSL in most cases
1347 for users, it is mandatory for the SHAR to authenticate when contacting an
1348 AA, and it must therefore be given a key and an SSL client certificate. It
1349 is permissible for the SHAR to use the same keypair and certificate used by
1350 the target web server itself, provided the certificate is signed by a CA
1351 accepted by the origin sites that will be queried for attributes.</p>
1352 <p>On Unix, we require that OpenSSL be installed to use Shibboleth. On
1353 Windows, OpenSSL libraries and the command line tool are included in the
1354 package and can be used directly, if not otherwise available.</p>
1355 <p>The certificate and key file location should be based on whether they
1356 will also be used for Apache. If they will be used as a server certificate
1357 as well, they should probably be in the Apache tree in the usual
1358 <span class="fixed">mod_ssl</span>-defined locations inside the Apache
1359 configuration folder., and the SHAR can read them from there. If the SHAR is
1360 not running as <span class="fixed">root</span>, permissions might need to be
1361 changed to allow this access. If the certificate and key will only be used
1362 for the SHAR, they can be put in the same folder with the
1363 <span class="fixed">shibboleth.xml</span> file and protected appropriately.</p>
1364 <p>Other web servers like IIS do not use the raw PEM format that Apache and
1365 Shibboleth can share, and therefore the components must generally use
1366 separate copies of the key and certificate if they are to be shared. Most
1367 other servers can export and/or import keys to and from PEM format or other
1368 formats that OpenSSL can convert. Refer to your server's documentation or
1369 ask for assistance from others who use it.</p>
1370 <p>The SHAR is assigned a key and a certificate using shibboleth.xml's
1371 <span class="fixed">certFile</span>, <span class="fixed">keyFile</span> and
1372 <span class="fixed">keyPass</span> settings, described in <a href="#4.a.">
1373 section 4.a.</a> These files must currently be in PEM format. OpenSSL
1374 commands to generate a new keypair and a certificate request are shown here,
1375 assuming 2048 bit RSA keys are to be used:</p>
1377 <p><span class="fixed">$ openssl genrsa -des3 -out ssl.key 2048<br>
1378 $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1380 <p>The signed certificate file returned by the CA should be usable directly,
1381 or can be converted to PEM format using the <span class="fixed">openssl x509</span>
1383 <p>If the key is to be shared with Apache, the web server's child processes,
1384 often running as <span class="fixed">nobody</span>, must be able to read
1385 them while the server is running, which may require permission changes.</p>
1386 <p>This particularly applies when sharing the key and certificate used by
1387 mod_ssl, which are only readable by root by default. The password, if any,
1388 must be placed in the <span class="fixed">shibboleth.xml</span> file, since
1389 the Apache module cannot prompt for it during initial startup as mod_ssl
1390 can. The issues surrounding how to securely obtain a key while running as
1391 <span class="fixed">nobody</span> may be addressed in a later release. Since
1392 the password will be stored in clear text in a frequently examined file, it
1393 is suggested to use a password not used elsewhere.</p>
1394 <p>Finally, the <span class="fixed">calist</span> command provides the SHAR
1395 with a set of CA roots to trust when validating AA server certificates. In
1396 all cases, the SHAR verifies that the certificate's Subject CN equals the
1397 AA's hostname, but the CA list restricts the accepted signers to those
1398 permitted by the SHAR. The parameter can be omitted to skip such validation,
1399 but this is not secure.</p>
1401 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1403 <p>Protection of web pages is primarily achieved through "mapping"
1404 attributes provided by an AA to a localized vocabulary for authorization
1405 rules. This was formerly accomplished in Apache with the <span class="fixed">
1406 ShibMapAttribute</span> command, but this has been replaced with additional
1407 features in the AAP syntax, described in <a href="#4.e.">section 4.e.</a>
1408 This applies to both Apache and IIS.</p>
1409 <p><b><u>IIS</u></b></p>
1410 <p>The IIS RM module supports the mapping of attributes via AAP files, but
1411 it does not support rule-based policies and therefore cannot protect static
1412 content at this time. In addition, all of the configuration settings are
1413 managed globally or per-site and are pulled from the <span class="fixed">
1414 shibboleth.xml</span> file, so there are no additional commands to document
1417 <p><b><u>Apache</u></b></p>
1418 <p>The Apache RM module provided can interpret AAP settings to map
1419 attributes to HTTP request headers and to <span class="fixed">Require</span>
1420 rules, permitting protecting of both static and dynamic content. The
1421 commands described here can appear in content-specific configuration blocks
1422 or <span class="fixed">.htaccess</span> files. They determine what content
1423 is to be protected, session policies, and static access control rules.</p>
1424 <p>Any of the typical ways of protecting content may be used (.htaccess,
1425 Directory, Location, Files, etc.). There are two ways to trigger Shibboleth
1426 authentication: specifying an <span class="fixed">AuthType</span> of
1427 <span class="fixed">shibboleth</span> to use Shibboleth directly, or using
1428 <span class="fixed">ShibBasicHijack</span> to process existing .htaccess
1429 files using Shibboleth instead. Support for authorization consists of
1430 mod_auth-style require directives, as well as support for mod_auth group
1432 <p>A complete list of the directives and their values is below:</p>
1434 <dd class="attribute"><span class="fixed">AuthType <string></span></dd>
1435 <dd class="value">Use <span class="fixed">shibboleth</span> for direct
1436 invocation, or <span class="fixed">Basic</span> plus the
1437 <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1438 <dd class="attribute"><span class="fixed">ShibSSLOnly <on/off></span></dd>
1439 <dd class="value">Controls whether Shibboleth will reject non-SSL
1440 requests for resources from clients. Defaults to <span class="fixed">off</span>.</dd>
1441 <dd class="attribute"><span class="fixed">ShibBasicHijack <on/off></span></dd>
1442 <dd class="value">Controls whether Shibboleth should or should not
1443 ignore requests with <span class="fixed">AuthType Basic</span>. Defaults
1444 to <span class="fixed">off</span>.</dd>
1445 <dd class="attribute"><span class="fixed">ShibExportAssertion <on/off></span></dd>
1446 <dd class="value">Controls whether the SAML attribute assertion provided
1447 by the AA is exported in a base64-encoded HTTP header,
1448 <span class="fixed">Shib-Attributes</span>. Defaults to
1449 <span class="fixed">off</span>. While this does require parsing the raw
1450 XML, it also permits an application to see attributes that may have been
1451 filtered by an AAP, or to forward the SAML assertion to a third party.</dd>
1452 <dd class="attribute"><span class="fixed">ShibAuthLifetime <seconds></span></dd>
1453 <dd class="value">If set, sessions are always terminated after the
1454 specified number of seconds, resulting in a new redirect and request for
1455 authentication, just as if a new request without a session is received.
1456 Defaults to infinite.</dd>
1457 <dd class="attribute"><span class="fixed">ShibAuthTimeout <seconds></span></dd>
1458 <dd class="value">If set, sessions are always terminated after the
1459 specified number of seconds of inactivity (defined as no requests
1460 received in that session), resulting in a new redirect and request for
1461 authentication, just as if a new request without a session is received.
1462 Defaults to infinite.</dd>
1463 <dd class="attribute"><span class="fixed">AuthGroupFile <pathname></span></dd>
1464 <dd class="value">Same as mod_auth; collects values found in REMOTE_USER
1465 into a named group for access control. An attribute must be mapped to
1466 REMOTE_USER for this to work. Note that mod_auth will not support group
1467 files when mod_shibrm is loaded, since they share the same command.
1468 <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is
1469 implemented</a> by placing a <span class="fixed">.htaccess</span> file
1470 that references a group file stored at <span class="fixed">/pathname</span>:</p>
1472 <p><span class="fixed">AuthGroupFile /pathname<br>
1473 require group workgroup</span></p>
1476 <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1477 AuthGroupFile</a> used by Shibboleth might resemble:<br>
1478 <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1480 <dd class="attribute"><span class="fixed">Require <string></span></dd>
1481 <dd class="value">Enforce authorization using one of the following
1482 methods.<ul type="circle">
1483 <li><span class="fixed">valid-user</span><blockquote>
1484 <p>Any Shibboleth user from a trusted origin site is accepted,
1485 even if no actual attributes are received. This is a very
1486 minimal kind of policy, but is useful for testing or for
1487 deferring real policy to an application.</p>
1490 <p><span class="fixed">user</span></p>
1492 <p>A space-delimited list of values, such as from the
1493 <span class="fixed">
1494 urn:mace:dir:attribute-def:eduPersonPrincipalName</span>
1495 attribute. Actually, any attribute can be mapped to REMOTE_USER,
1496 even if this doesn't always make sense.</p>
1499 <li><span class="fixed">group</span><blockquote>
1500 <p>A space-delimited list of group names defined within
1501 <span class="fixed">AuthGroupFile</span> files, again provided
1502 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1505 <li><span class="fixed"><alias></span><blockquote>
1506 <p>An arbitrary rule name that matches an Alias defined in an
1507 AAP file. The rule value is a space-delimited list of attribute
1508 values, whose format depends on the attribute in question (e.g.
1509 an affiliation rule might look like:</p>
1510 <p><span class="fixed">require affiliation staff@osu.edu
1511 faculty@mit.edu</span></p>
1515 <p>Additionally, for <span class="fixed">user</span> and
1516 <span class="fixed"><alias></span>-based rules, if a tilde character is
1517 placed immediately following <span class="fixed">user</span> or
1518 <span class="fixed"><alias></span>, the expressions that follow are
1519 treated as regular expressions. The syntax supported is generally based
1520 on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1521 XML Schema</a>. This specification borders on unreadable, but the syntax
1522 is generally Perl-like. Expressions should generally be "anchored" with
1523 the ^ and $ symbols to insure mid-string matches don't cause false
1525 <p>For example, the rule:<br>
1526 <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1527 </span>would evaluate to allowing anyone with an <span class="fixed">
1528 affiliation</span> of <span class="fixed">member</span> from a .edu
1532 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1534 <p>Shibboleth allows a user and a site to release a varying set of
1535 attributes to a destination site, and does not impose restrictions on the
1536 kinds of attribute information provided by an AA. Target implementations
1537 must be prepared to examine the attributes they receive and filter them
1538 based on policies about what information to permit an origin site to assert
1539 about its users.</p>
1540 <p>Attribute acceptance is the process of defining acceptable attributes and
1541 filtering attribute values before passing them on to a resource manager,
1542 such as the <span class="fixed">mod_shibrm</span> module. Data blocked by
1543 AAP filters will not be passed to the CGI environment or used when enforcing
1544 <span class="fixed">.htaccess</span> rules. Note that the attribute
1545 assertion exported to the <span class="fixed">Shib-Attributes</span> header
1547 <p>The Shibboleth implementation supports Scoped and Simple attributes and
1548 filtering policies for different kinds of attributes, and is potentially
1549 extensible to more complex attributes in the future. An attribute is
1550 considered Scoped if the XML representation of its values contains a "Scope"
1551 attribute. As of 1.1, this is detected at runtime and requires no
1552 configuration in advance.</p>
1553 <p><b>An essential part of the Shibboleth trust fabric is ensuring that
1554 sites only assert attributes for domains for which they are considered
1555 authoritative by the target. Typically, this means that Brown University
1556 will be trusted to assert attributes only scoped to <span class="fixed">
1557 brown.edu</span>. Unless there are very specific circumstances requiring
1558 this restriction be removed, it is strongly encouraged that such policies be
1562 <p>Scoped attributes are a special kind of attribute whose values are a
1563 combination of a <span class="fixed">value</span> and a
1564 <span class="fixed">scope</span>, or <span class="fixed">context</span>
1565 for the value. An example is <span class="fixed">
1566 eduPersonScopedAffiliation</span>, which adds a scope to the defined set
1567 of <span class="fixed">eduPersonAffiliation</span> values, such as
1568 <span class="fixed">student</span>, <span class="fixed">member</span>,
1569 or <span class="fixed">faculty</span>. Scopes are expressed as DNS
1570 domains and subdomains.</p>
1571 <p>Any <span class="fixed">scoped</span> attribute can be scoped only to
1572 the origin site's permitted domains. These domains are listed in the
1573 site metadata that provides policy information to the system. Domains
1574 can be explicit or regular expressions, and can be changed by a target
1575 to meet its needs. Targets can also override the rules specified for the
1576 site in their own AAPs, choosing to accept additional scopes or deny
1577 scopes that would ordinarily be accepted based on metadata provided by a
1578 federation. Thus, attribute acceptance processing for
1579 <span class="fixed">scoped</span> attributes is based on site metadata
1580 and target-specified overrides in addition to the mechanism described
1581 below for <span class="fixed">simple</span> attributes.</p>
1582 <p>Scope rules specified in an AAP are additive with any domains
1583 permitted by site metadata, and the rules are applied by first looking
1584 for an applicable denial rule, and then looking at site metadata and any
1585 applicable site rules for an accept rule.</p>
1589 <p>Simple attributes are attributes whose value is expressed in XML as a
1590 Text node; that is, the value is just a string. Multiple values are
1591 permitted. <span class="fixed">eduPersonEntitlement</span>, in which the
1592 values are URIs, is one example of a simple attribute.</p>
1593 <p>Both Simple and Scoped attribute acceptance is controlled with an
1594 external policy file written in XML. The schema for the file is
1595 described by the <span class="fixed">shibboleth.xsd</span> schema, and
1596 an example file is included, <span class="fixed">AAP.xml</span>. It is
1597 mandatory to supply such a file, because attributes are recognized based
1598 on their presence in this file, and not by separate configuration
1599 processes. Only by listing an attribute in the file will it be accepted
1600 and processed by the RM.</p>
1601 <p>The policy is a default-deny algorithm that requires permissible
1602 attributes and values be listed explicitly. That is, an empty file
1603 permits nothing. Each attribute to be supported must be listed in the
1604 file by name in an <span class="fixed"><AttributeRule></span>. Each such
1605 rule is a collection of <span class="fixed"><SiteRule></span> elements
1606 along with an optional <span class="fixed"><AnySite></span> default
1607 rule. In turn each site rule is a set of <span class="fixed"><Value></span>
1608 rules that specify matches to permit, either literal or regular
1609 expressions, or a wildcarded <span class="fixed"><AnyValue></span>
1610 default rule, which is equivalent to a single regular expression rule
1611 allowing anything.</p>
1613 <p>A syntax summary follows:</p>
1615 <p><span class="fixed"><AttributeAcceptancePolicy</span></p>
1617 <p>The top level element in the file.</p>
1619 <p><span class="fixed"><AttributeRule<br>
1620 Name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"<br>
1621 Header="Shib-EP-Affiliation" Alias="affiliation"></span></p>
1623 <p>Specifies a rule for an attribute, named by its URI. The
1624 following XML attributes can be supplied:</p>
1625 <table border="1" cellpadding="5" cellspacing="5">
1627 <td><span class="fixed">Name</span></td>
1628 <td>The name of the Shibboleth attribute, usually a URI.
1629 This is the only required XML attribute.</td>
1632 <td><span class="fixed">Namespace</span></td>
1633 <td>If the attribute's name includes a SAML namespace,
1634 supply it here. Normally this is unused.</td>
1637 <td><span class="fixed">Header</span></td>
1638 <td>The HTTP request header to map the attribute's values
1642 <td><span class="fixed">Alias</span></td>
1643 <td>A short name for the attribute, determines the name of
1644 the Apache <span class="fixed">Requires</span> rule.</td>
1648 <p><span class="fixed"><AnySite></span></p>
1650 <p>Specifies a rule that always applies to the attribute, regardless
1651 of the asserting AA.</p>
1653 <p><span class="fixed"><SiteRule Name="host.domain.com"></span></p>
1655 <p>A rule that applies to the origin site AA corresponding to the
1658 <p><span class="fixed"><Scope Accept="true|false" Type="type"></span></p>
1660 <p>Specifies a value to accept or deny, either directly using
1661 <span class="fixed">type</span> <span class="fixed">literal</span>,
1662 or using a set of matching expressions as <span class="fixed">type</span>
1663 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1664 is the default if <span class="fixed">Type</span> is not specified.
1665 Accept defaults to "true">.</p>
1667 <p><span class="fixed"><AnyValue></span></p>
1669 <p>Specifies a rule that always applies to the attribute and site,
1670 regardless of the value(s).</p>
1672 <p><span class="fixed"><Value Type="type"></span></p>
1674 <p>Specifies a value to permit, either directly using
1675 <span class="fixed">type</span> <span class="fixed">literal</span>,
1676 or using a set of matching expressions as <span class="fixed">type</span>
1677 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1678 is the default if <span class="fixed">Type</span> is not specified.</p>
1681 <p>The regular expression syntax is a subset of the usual Perl and Unix
1682 syntaxes that is described in the XML Schema specification by the W3C. Most
1683 typical expressions should work. Be sure to anchor them using
1684 <span class="fixed">^</span> and <span class="fixed">$</span> to avoid
1685 unintentional matches midstring.</p>
1687 <h4><a name="4.f."></a>4.f. Using Attributes in Applications</h4>
1689 <p>Apart from the simple RM functionality provided, attribute information
1690 may be made available directly to applications via the standard practice of
1691 creating custom HTTP request headers before passing control to the
1692 application. Applications should make no assumption about the presence of
1693 specific attributes for their use unless they have intimate knowledge of the
1694 attribute release policies in place.</p>
1695 <p>The AAP metadata controls this interface, and maps a Shibboleth attribute
1696 to a header name, such as <span class="fixed">Shib-EP-Affiliation</span>.
1697 Using that example, any values of the mapped attribute will be placed in
1698 that header, delimited by semicolons. An application that uses a CGI-like
1699 syntax to access the header will find the values in the <span class="fixed">
1700 HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any
1701 header, to drive legacy applications that expect information in a particular
1703 <p>The <span class="fixed">REMOTE_USER</span> variable is a special case
1704 that is generally populated automatically by the web server based on an
1705 internal piece of data that represents the current <span class="fixed">
1706 username</span>. Unlike many authentication modules, Shibboleth does not
1707 guarantee that <span class="fixed">REMOTE_USER</span> will have any value,
1708 because users may remain anonymous in many cases. If it does have a value,
1709 it is set solely because of an AAP file that maps an attribute to that
1710 header name. For many purposes, the <span class="fixed">
1711 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be
1712 mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be
1713 provided by the AA, and <span class="fixed">REMOTE_USER</span> might still
1715 <p>The <span class="fixed">Shib-Origin-Site</span> variable will contain the
1716 unique name/identifier of the origin site of the user. Some applications may
1717 use this to lookup additional policy or application data. It normally takes
1718 the form of a URI but could be any string in some deployments.</p>
1719 <p>Finally, configuration may instruct the web server to place the entire
1720 XML message containing the SAML attribute information from the AA into a
1721 base64-encoded header called <span class="fixed">Shib-Attributes</span>.
1722 This is a raw interface that provides an application with the entire AA
1723 response, and is not a filtered view based on any attribute acceptance rules
1724 or even based on what attributes are recognized by the target. What was sent
1725 is what you see.</p>
1727 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
1729 <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span>
1730 in the <span class="fixed">/opt/shibboleth/bin</span> folder of the
1731 distribution to maintain metadata files referenced by <span class="fixed">
1732 shibboleth.xml</span>. It will return 0 on success and a negative number on
1733 failure and log errors to <span class="fixed">stderr</span>. If the data in
1734 the new metadata file is bad or the signature is invalid, the existing copy
1735 is kept. The SHAR and SHIRE stat all metadata files each time the data is
1736 used, allowing them to detect and utilize updates in real-time operation.</p>
1737 <p><span class="fixed">siterefresh</span> takes the following command-line
1740 <dd class="attribute"><span class="fixed">--url <URL></span> </dd>
1741 <dd class="value">Specifies the <span class="fixed">URL</span> of the
1742 remote metadata file with which to update the local file.</dd>
1743 <dd class="attribute"><span class="fixed">--out <pathname></span> </dd>
1744 <dd class="value">Specifies the local file to which to write the new
1746 <dd class="attributeopt"><span class="fixed">--cert <pathname></span>
1748 <dd class="valueopt">Specifies the location of a certificate stored in
1749 <span class="fixed">PEM</span> format used to validate the signature of
1750 the metadata file. Since much of Shibboleth's security flows from
1751 metadata files, this option is highly recommended, and the certificate
1752 used should be verified independently.</dd>
1753 <dd class="attributeopt"><span class="fixed">--schema <pathname></span>
1755 <dd class="valueopt">Optionally defines a base path for schemas to use
1756 when validating the file. Defaults to <span class="fixed">
1757 /opt/shibboleth/etc/shibboleth/</span>.</dd>
1759 <p>A complete command issued to <span class="fixed">siterefresh</span> might
1762 <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out sites.xml
1763 --cert internet2.pem \<br>
1764 --url http://wayf.internet2.edu/InQueue/sites.xml </span></p>
1766 <p>It is recommended that similar commands be added to a <span class="fixed">
1767 crontab</span> to keep the site and trust files refreshed. AAP files tend to
1768 be site-specific, but could be maintained and distributed centrally. If the
1769 command is invoked in a script that writes the file to a new location and
1770 compares it with the old contents before overwriting the original, the
1771 command could be run very often without impacting target operations,
1772 providing a high degree of currency in case sites become compromised.</p>
1774 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
1776 <p>Shibboleth includes a useful plugin that extends the default memory cache
1777 for storing session data in the SHAR with a backing cache using an embedded
1778 MySQL database. In most distributions, it is enabled by default. The plugin
1779 can be found in the <span class="fixed">/opt/shibboleth/libexec</span>
1780 folder, and is loaded as an extension library using the <span class="fixed">
1781 [extensions:saml]</span> section of <span class="fixed">shibboleth.xml</span>.
1782 The following configuration options are available:</p>
1784 <dd class="attributeopt"><span class="fixed">mysql-cache-timeout =
1785 <seconds> (in [shar] section)</span></dd>
1786 <dd class="valueopt">Specifies the duration in <span class="fixed">
1787 seconds</span> that must elapse between user accesses before that user's
1788 session is purged from the persistent cache. Defaults to
1789 <span class="fixed">28800</span> seconds, or 8 hours. This should
1790 generally be longer than the associated server's settings for session
1791 lifetime and timeout, and the memory cache's timeout.</dd>
1792 <dd class="attributeopt"><span class="fixed"><MySQL Arguments>
1793 (one per line in [mysql] section)</span></dd>
1794 <dd class="valueopt">To pass arguments to the MySQL engine, create
1795 argument lines in the <span class="fixed">[mysql]</span> section in the
1797 <blockquote class="fixed">
1798 <p>arg1=<argument><br>
1799 arg2=<argument><br>
1802 <p>Important arguments you'll find by default include: </p>
1803 <blockquote class="fixed">
1804 <p>arg1 = --language=/opt/shibboleth/share/english<br>
1805 arg2 = --datadir=/opt/shibboleth/data</p>
1807 <p>which set the message file path and the location of the cache's
1808 database files respectively. Make sure the data directory exists before
1809 starting the SHAR if you change this path.</dd>
1815 <h3><a name="5."></a>5. Troubleshooting</h3>
1816 <p>This section provides basic information about testing Shibboleth targets.
1817 This information is not intended to be comprehensive, but instead rudimentary
1818 guidelines for basic configuration tests and problems. For more detailed
1819 information or answers to specific problems not addressed in this section,
1820 please mail <a href="mailto:mace-shib-users@internet2.edu">
1821 mace-shib-users@internet2.edu</a> with a thorough description of errors and
1822 configurations used.</p>
1823 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
1825 <p>The target may be tested by generating a folder with very basic access
1826 controls on it, and accessing it using a web browser. Place a simple webpage
1827 such as <span class="fixed">index.html</span> in <span class="fixed">
1828 /secure/</span>. Then, add the following lines to <span class="fixed">
1829 httpd.conf</span>, which should be removed when testing is over:</p>
1831 <p><span class="fixed"># Configure a test directory<br>
1832 <Location /secure><br>
1833 AuthType shibboleth<br>
1834 require valid-user<br>
1836 # Per-directory SHIRE Configuration<br>
1837 #ShibBasicHijack On<br>
1838 #ShibSSLOnly On<br>
1839 #ShibAuthLifetime 60<br>
1840 #ShibAuthTimeout 600<br>
1842 # RM Configuration<br>
1843 #AuthGroupFile /foo<br>
1844 #ShibExportAssertion On<br>
1845 </Location><br>
1848 <p><b>For information regarding specific error messages that may be
1849 generated if the target does not work successfully, please refer to section
1850 <a href="#5.b.">5.b.</a>, or write
1851 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.</b></p>
1853 <h4><a name="5.b."></a>5.b. Common Problems</h4>
1855 <p>A knowledge base is being developed in the
1856 <a href="http://www.columbia.edu/~wassa/shib.faq/shibboleth-faq.html">
1857 Shibboleth Deployer's FAQ</a>. Please mail
1858 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>
1859 with any additional questions or problems encountered that are not answered
1860 by this basic guide.</p>