1 <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 <meta http-equiv="Content-Language" content="en-us">
6 <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
7 <meta name="ProgId" content="FrontPage.Editor.Document">
8 <title>Shibboleth Target Deployment Guide</title>
9 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
10 <style type="text/css">
14 background-color: #FFFFFF;
32 border-width:2px; background-color: #DDDDDD;
33 background-image: url('none');
41 background-color: #DDDDDD;
42 background-image: url('none');
48 background-color: #DDDDDD;
49 background-image: url('none');
58 background-color: #DDDDDD;
59 border: 1px inset black;
60 background-image: url('none');
68 background-color: #EEEEEE;
69 background-image: url('none');
71 padding-bottom: 0.5em;
74 border-bottom-width: none;
75 border-top-width: none;
76 border-left-width: 1px;
77 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
84 background-color: #BCBCEE;
85 border: 1px inset black;
86 background-image: url('none');
94 background-color: #DDDDFF;
95 background-image: url('none');
97 padding-bottom: 0.5em;
100 border-bottom-width: none;
101 border-top-width: none;
102 border-left-width: 1px;
103 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
110 background-color: #DDDDDD;
111 border: 1px inset black;
112 background-image: url('none');
121 background-color: #BCBCEE;
122 border: 1px inset black;
123 background-image: url('none');
129 background-color: #EEEEEE;
134 font-family: monospace;
146 <body link="red" vlink="red" alink="black" bgcolor="white">
149 <h2>Shibboleth Target Deployment Guide</h2>
151 <p>Shibboleth Target Deployment Guide<br>
152 Shibboleth Version 1.1<br />
155 <h3>This version of the deploy guide is for Shibboleth v1.1. For documentation
156 related to prior versions of Shibboleth, please consult the appropriate branch
157 in the Shibboleth CVS.</h3>
158 <h3>Federations have been abstracted out from the Shibboleth documentation. For
159 further information on using Shibboleth in a federation, refer to the federation
161 <p>Shibboleth v1.1 is stable and secure enough to deploy in production
162 scenarios. It is backward compatible with 1.0 in all respects, including
163 configuration, but some older commands have been deprecated or replaced.</p>
164 <p>Features and changes specific to 1.1 are marked with <span class="feature">
166 <h4>Major New Features in 1.0 and 1.1</h4>
167 <p>This new release contains several improvements and enhancements, including:
169 <h5>Federation Support</h5>
171 <li>Federation and trust support has been substantially extended. Federation
172 structures are now defined. The set of metadata collected and managed by
173 each Federation is more fully defined. The configuration values assigned by
174 a Federation are now identified. </li>
175 <li>There is some support for targets to be members of multiple federations;
176 this support will continue to evolve. When a browser user arrives, a target
177 will determine which federation their origin belongs to, and then use the
178 trust fabric associated with that Federation.</li>
179 <li>Better support for flexible and bilateral trust agreements. A key
180 specific to an origin site can be used to vallidate its signature.</li>
181 <li>This version contains a significantly more mature security
182 implementation, and should meet the security requirements of typical sites.</li>
186 <li>The Attribute Authority has a powerful new attribute resolver. Simple
187 scenarios (using a string attribute stored in ldap) can be accomplished by
188 merely editing a configuration file. Java classes may still be written for
189 more complex evaluations (eg retrieving information from multiple disparate
190 repositories, and computing the SAML attribute using business rules). This
191 should greatly simplify the process of configuring the AA to support
192 additional general attributes.</li>
193 <li>An attribute connector for JDBC data sources is now available.
194 <span class="feature">[1.1]</span></li>
195 <li>Support for a runtime-derived per-requester persistent identifier
196 attribute to support anonymous personalization by targets has been added via
197 an attribute plugin. <span class="feature">[1.1]</span></li>
198 <li>Specialized deployments without privacy needs can configure identity-based
199 handles interoperable with other SAML deployments. <span class="feature">
204 <li>Significantly more flexibility in configuring targets to ensure
205 robustness. Failover and redundant configurations are now supported.</li>
206 <li>The SHAR may now optionally store its session and attribute cache in a
207 back-end database in addition to the previously available in-memory option.
208 This would allow a site to run an apache server farm, with multiple SHARs,
209 supporting the same set of sessions.</li>
210 <li>Federation supplied files (sites.xml and trust.xml) are now refreshed in
211 a much more robust manner.</li>
212 <li>The SHAR can be configured to request specific attributes from the
214 <li>The SHAR can use TCP sockets when responding to the Apache module, for
215 specialized deployment behind firewalls. <span class="feature">[1.1]</span>
217 <li>Attribute acceptance policies have been greatly enhanced, and are now
218 used to configure all aspects of attribute handling by the target, except
219 for requesting specific attributes by sitename. Adding attributes now takes
220 place in one configuration step. <span class="feature">[1.1]</span></li>
221 <li>Support for Apache 1.3 on Windows NT/2000/XP/2003 has been added.
222 <span class="feature">[1.1]</span></li>
223 <li>Microsoft IIS web server support has been added via an ISAPI filter and
224 extension. <span class="feature">[1.1]</span></li>
226 <h5>Miscellaneous</h5>
228 <li>Origin sites can configure a value to describe the type of
229 authentication mechanism used at the origin site(e.g. password, Kerberos,
230 PKI, etc.). This value is made available on the target side as Shib-Authentication-Method.</li>
231 <li>Various improvements to error handling. Origin sites are now able to
232 supply an error URL and contact information to a federation. When a target
233 encounters an error, it can include this information in the error page.</li>
234 <li>Local time string values are now used in log files.</li>
235 <li>Internationalization support has been extended.</li>
237 <p>Before starting, please sign up for all applicable
238 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing
239 lists</a>. Announcements pertinent to Shibboleth deployments and developments
240 and resources for deployment assistance can be found here.</p>
241 <p>Please send any questions, concerns, or eventual confusion to
242 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.
243 This should include, but not be limited to, questions about the documentation,
244 undocumented problems, installation or operational issues, and anything else
245 that arises. Please ensure that you have the
246 <a href="http://shibboleth.internet2.edu/release/shib-download.html">appropriate
247 tarball</a> for your operating system.</p>
254 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
257 <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
259 <li><a href="#1.a."><font color="black">Origin</font></a></li>
260 <li><a href="#1.b."><font color="black">Target</font></a></li>
261 <li><a href="#1.c."><font color="black">WAYF</font></a></li>
262 <li><a href="#1.d."><font color="black">Federations</font></a></li>
266 <h4><a href="#2."><font color="black">Planning</font></a></h4>
268 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
269 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
270 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
271 <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
272 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
273 <li><a href="#2.f."><font color="black">Designate Contacts</font></a></li>
274 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
275 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
276 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
280 <h4><a href="#3."><font color="black">Installation</font></a></h4>
282 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
283 <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
284 <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
285 <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
286 <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
290 <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
292 <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
293 shibboleth.ini</span></font></a></li>
294 <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
295 <li><a href="#4.c."><font color="black">Key Generation and Certificate
296 Installation</font></a></li>
297 <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
298 <li><a href="#4.e."><font color="black">Defining Attributes and
299 Acceptance Policies</font></a></li>
300 <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
301 <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
302 <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
306 <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
308 <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
309 <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
318 <h3><a name="1."></a>1. Shibboleth Overview</h3>
319 <p>Shibboleth is a system designed to exchange attributes across realms for the
320 primary purpose of authorization. It provides a secure framework for one
321 organization to transmit attributes about a web-browsing individual across
322 security domains to another institution. In the primary usage case, when a user
323 attempts to access a resource at a remote domain, the user's own home security
324 domain can send certain information about that user to the target site in a
325 trusted exchange. These attributes can then be used by the resource to help
326 determine whether to grant the user access to the resource. The user may have
327 the ability to decide whether to release specific attributes to certain sites by
328 specifying personal Attribute Release Policies (ARP's), effectively preserving
329 privacy while still granting access based on trusted information.</p>
330 <p>When a user first tries to access a resource protected by Shibboleth, they
331 are redirected to a service which asks the user to specify the organization from
332 which they want to authenticate. If the user has not yet locally authenticated
333 to a WebISO service, the user will then be redirected to their home
334 institution's authentication system. After the user authenticates, the
335 Shibboleth components at the local institution will generate a temporary
336 reference to the user, known as a handle, for the individual and send this to
337 the target site. The target site can then use the handle to ask for attributes
338 about this individual. Based on these attributes, the target can decide whether
339 or not to grant access to the resource. The user may then be allowed to access
340 the requested materials.</p>
341 <p>There are several controls on privacy in Shibboleth, and mechanisms are
342 provided to allow users to determine exactly which information about them is
343 released. A user's actual identity isn't necessary for many access control
344 decisions, so privacy often is needlessly compromised. Instead, the resource
345 often utilizes other attributes such as faculty member or member of a certain
346 class. While these are commonly determined using the identity of the user,
347 Shibboleth provides a way to mutually refer to the same principal without
348 revealing that principal's identity. Because the user is initially known to the
349 target site only by a randomly generated temporary handle, if sufficient, the
350 target site might know no more about the user than that the user is a member of
351 the origin organization. This handle should never be used to decide whether or
352 not to grant access, and is intended only as a temporary reference for
353 requesting attributes.</p>
354 <h4><a name="1.a."></a>1.a. Origin</h4>
356 <p>There are four primary components to the origin side in Shibboleth: the
357 Attribute Authority (AA), the Handle Service (HS), the directory service,
358 and the local sign-on system (SSO). The AA and HS are provided with
359 Shibboleth, and an open-source WebISO solution Pubcookie is also supplied;
360 the directory is provided by the origin site. Shibboleth is able to
361 interface with a directory exporting an LDAP interface or a SQL database
362 containing user attributes, and is designed such that programming interfaces
363 to other repositories should be readily implemented. Shibboleth relies on
364 standard web server mechanisms to trigger local authentication. A .htaccess
365 file can be easily used to trigger either the local WebISO system or the web
366 server's own Basic Auth mechanism, which will likely utilize an enterprise
367 authentication system, such as Kerberos.</p>
368 <p>From the origin site's point of view, the first contact will be the
369 redirection of a user to the handle service, which will then consult the SSO
370 system to determine whether the user has already been authenticated. If not,
371 then the browser user will be asked to authenticate, and then sent back to
372 the target URL with a handle bundled in an attribute assertion. Next, a
373 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
374 which will include the previously mentioned handle. The AA then consults the
375 ARP's for the directory entry corresponding to the handle, queries the
376 directory for these attributes, and releases to the SHAR all attributes the
377 SHAR is entitled to know about that user.</p>
379 <h4><a name="1.b."></a>1.b. Target</h4>
381 <p>There are three primary components to the target side in Shibboleth: the
382 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
383 Requester (SHAR), and the resource manager (RM). An implementation of each
384 of these is included in the standard Shibboleth distribution. These
385 components are intended to run on the same web server.</p>
386 <p>From the target's point of view, a browser will hit the RM with a request
387 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
388 in, which will use the WAYF to acquire the name of a handle service to ask
389 about the user. The handle service (HS) will then reply with a SAML
390 authentication assertion containing a handle, which the SHIRE then hands off
391 to the SHAR. The SHAR uses the handle and the supplied address of the
392 corresponding attribute authority (AA) to request all attributes it is
393 allowed to know about the handle. The SHAR performs some basic validation
394 and analysis based on attribute acceptance policies (AAP's). These
395 attributes are then handed off to the RM, which is responsible for using
396 these attributes to decide whether to grant access.</p>
398 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
400 <p>The WAYF service can be either outsourced and operated by a federation or
401 deployed as part of the SHIRE. It is responsible for allowing a user to
402 associate themself with an institution of their specification, then
403 redirecting the user to the known address for the handle service of that
406 <h4><a name="1.d."></a>1.d. Federations</h4>
408 <p>A federation is one way to provide part of the underlying trust required
409 for function of the Shibboleth architecture. A federation in the context of
410 Shibboleth is a group of organizations(universities, corporations, content
411 providers, etc.) who agree to exchange attributes using the SAML/Shibboleth
412 protocols and abide by a common set of policies and practices. In so doing,
413 they must implicitly or explicitly agree to a common set of guidelines.
414 Joining a federation is not explicitly necessary for operation of
415 Shibboleth, but it dramatically expands the number of targets and origins
416 that can interact without defining bilateral agreements between all these
418 <p>A federation can be created in a variety of formats and trust models, but
419 to support Shibboleth, it must provide a certain set of services to
420 federation members. It needs to supply a registry to process applications to
421 the federation and distribute membership information to the origin and
422 target sites. This must include distribution of the PKI components necessary
423 for trust between origins and targets. There also needs to be a set of
424 agreements and best practices defined by the federation governing the
425 exchange, use, and population of attributes before and after transit, and
426 there should be a way to find information on local authentication and
427 authorization practices for federation members.</p>
430 <h3><a name="2."></a>2. Planning</h3>
431 <p>There are several essential elements that must be present in the environment
432 to ensure Shibboleth functions well, both political and technical. Shibboleth
433 currently runs on a specific range of platforms and web server environments. The
434 SHAR and SHIRE are implemented entirely in C/C++. These are the recommendations
435 and requirements for a successful implementation of a Shibboleth target.</p>
436 <h4><a name="2.a."></a>2.a. Requirements</h4>
438 <p>Shibboleth currently supports Windows NT/2000/XP/2003, Linux, and
439 Solaris. At present, Shibboleth consists of Apache (or IIS) plugins and a
440 separate SHAR process. The plugins use the ONC RPC mechanism to communicate
441 with the SHAR over Unix domain or TCP sockets. The target's web servers must
442 be running <a href="http://http://www.apache.org/dist/httpd/">Apache</a>
443 1.3.26+, or Microsoft IIS 4.0+, but not Apache 2. More precise technical
444 details are discussed in <a href="#3.a.">3.a</a>.</p>
446 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
448 <p>While it is not necessary for a target or origin to join a federation,
449 doing so greatly facilitates the implementation of multilateral trust
450 relationships. Each federation will have a different application process.</p>
451 <p>For more information on federations, refer to <a href="#1.d.">1.d</a> or
452 the Shibboleth v1.0 architectural document.</p>
453 <p>To use Shibboleth without a federation, manual configuration of target
454 and origin trust and site information will be needed to insure that sites
455 interoperate. Most identifiers, such as site names, should be URI-based, and
456 should be chosen in accordance with DNS domains under the control of the
457 parties involved, much as Java package naming is coordinated. In other
458 words, don't use a URI containing a DNS domain or hostname that you do not
461 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
463 <p>Shibboleth's protocols and software have been extensively engineered to
464 provide protection against many attacks. However, the most secure protocol
465 can be compromised if it is placed in an insecure environment. To ensure
466 Shibboleth is as secure as possible, there are several recommended security
467 precautions which should be in place at local sites.</p>
469 <li>SSL use is optional for target sites, but should be used if at all
470 possible, at least in the processing of incoming sessions (called the
471 SHIRE URL or assertion consumer service). Federation guidelines should
472 be considered when determining whether to implement SSL, and, in
473 general, SSL should be used for interactions with client machines to
474 provide the necessary authentication and encryption to ensure protection
475 from man-in-the-middle attacks. It is strongly suggested that all
476 password traffic or similarly sensitive data should be SSL-protected.
477 Assessment of the risk tradeoff against possible performance degradation
478 should be performed for all applications.</li>
479 <li>Many other attacks can be made on the several redirection steps that
480 Shibboleth takes to complete attribute transfer. The best protection
481 against this is safeguarding the WAYF service and ensuring that rogue
482 targets and origins are not used, generally by development of the trust
483 model underneath Shibboleth. Shibboleth also leverages DNS for security,
484 which is not uncommon, but attacks concerning bad domain information
485 should be considered.</li>
486 <li>Information regarding origin users is generally provided by the
487 authoritative enterprise directory, and the acceptance of requests from
488 target applications can be carefully restricted to ensure that all
489 requests the SHAR performs are authorized and all information the origin
490 provides is accurate. Use of plaintext passwords is strongly advised
492 <li>Server platforms should be properly secured, commensurate with the
493 level that would be expected for an organization's other security
494 services, and cookie stores on client machines should be well protected.</li>
497 <h4><a name="2.d."></a>2.d. Server Certs</h4>
499 <p>In the Shibboleth architecture, the SHAR, HS, and AA must all have
500 various client and/or server certificates for use in signing assertions and
501 creating SSL channels. These should be issued by a commonly accepted CA,
502 which may be stipulated by your federation. After understanding the CA's
503 acceptible to your federations, consult chapter <a href="#4.c.">4.c</a> for
504 information on certificate and key generation.</p>
506 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
508 <p>The Attribute Authority maintains a set of rules called Attribute Release
509 Policies (ARP's) that define which attributes are released to which targets.
510 When a browser user tries to access a resource, the SHAR asks the origin
511 site AA to release all the attributes it is allowed to know, possibly
512 restricted to specifically desired subset. The SHAR provides its own name
513 and an optional URL on behalf of which the attribute request is made which
514 can further refine the information the SHAR is allowed to know. The AA
515 processes this request using all applicable ARP's, determines which
516 attributes and values it will release, and then obtains the values actually
517 associated with the browser user. The AA sends these attributes and values
518 back to the SHAR.</p>
519 <p>Targets should work together with expected origin sites to ensure that
520 the sets of attributes that both sites expect to correspond using are
523 <h4><a name="2.f."></a>2.f. Designate Contacts</h4>
525 <p>Since Shibboleth deals both with daily technical and operational issues
526 and also with contractual issues, a set of contacts should be set up to
527 support the user base and to facilitate interactions with other Shibboleth
528 sites and federation members. It is recommended that at least technical and
529 administrative contacts be designated. Names, titles, e-mail addresses, and
530 phone numbers may all be useful information to provide.</p>
532 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
534 <p>A primary Shibboleth design consideration was to require very little or
535 no modification to client machines. The only requirement is that a browser
536 is used which supports cookies, redirection and SSL. Browser users will have
537 to perform an additional click to submit the authentication assertion if
538 JavaScript is not functional.</p>
540 <h4><a name="2.h."></a>2.h. Clocks</h4>
542 <p><a href="http://www.eecis.udel.edu/~ntp/">NTP</a> should be run on all
543 web servers. Shibboleth employs a short handle issuance time to protect
544 against replay attacks. Because of this, any significant degree of clock
545 skew can hinder the ability of users to access sites successfully.</p>
547 <h4><a name="2.h."></a>2.i. Other Considerations</h4>
549 <p>Especially for higher education, there are a handful of laws enacted
550 which may have important ramifications on the disclosure of personal
551 information and attributes. Since Shibboleth does not necessarily need to
552 transmit identity, it is an ideal solution for many higher education
553 situations. Nevertheless, all parties within the United States of America
554 are strongly advised to consult the
555 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
556 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
557 legislation before deploying Shibboleth.</p>
562 <h3><a name="3."></a>3. Installation</h3>
563 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
564 <p>The Shibboleth project makes binary packages available for Solaris and Linux
565 that are precompiled against recent releases of various required libraries such
566 as OpenSSL. It is highly advisable to build from source when using Shibboleth in
567 a production environment in order to permit patching or updating of packages as
568 security holes and bugs are fixed. Building from source is necessary to give you
569 complete control over your deployment platform. The binary packages represent a
570 snapshot in time only. To build from source, see the <span class="fixed">
571 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source
573 <p>The software requirements listed correspond to the binary distributions. In
574 general, source builds should work against all recent versions of the operating
575 systems and software dependencies listed below. For specific questions, inquire
576 to the support mailing list, or give it a try. Note that OpenSSL releases
577 frequent security updates; the version listed may not be the most current, but
578 most minor "letter" updates should be usable.</p>
580 <p><b>Operating System:</b> </p>
582 <li>RedHat 7.2-7.3:<ul type="disc">
583 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a><blockquote>
584 <p>Apache must be compiled with mod_so for DSO module support,
585 and must include SSL support (preferably using
586 <span class="fixed">mod_ssl</span>), and EAPI support (which
587 <span class="fixed">mod_ssl</span> requires and provides).
588 Shibboleth can coexist with <span class="fixed">mod_auth</span>,
589 which may be compiled or loaded into the server for use
590 elsewhere, but Shibboleth does not need or use it. The most
591 recent Red Hat RPM (1.3.27-2 as of this writing) is sufficient.</p>
594 <p>On Linux, Shibboleth requires that Apache and Apache-SSL be
595 built with <span class="fixed">libpthread</span>, or loading the
596 <span class="fixed">mod_shibrm</span> or <span class="fixed">
597 mod_shire</span> modules will cause Apache to stop. While
598 RedHat's Apache is compatible, Debian's Apache must be rebuilt
599 with <span class="fixed">libpthread</span>:</p>
601 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
602 $ apt-build --rebuild --reinstall install \<br>
603 apache-common apache apache-ssl</span></p>
608 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
609 Shibboleth v1.1 Target for RedHat</a></li>
610 <li><a href="http://www.openssl.org/source/">openssl-0.9.6, revision
611 <span class="fixed">i</span> or newer</a></li>
612 <li>libstdc++3-3.0.4-1.i386.rpm and libgcc-3.0.4-1.i386.rpm<blockquote>
613 <p>Shibboleth binaries are currently built with
614 <a href="http://www.gnu.org/software/gcc/gcc.html">GCC 3.04</a>,
615 and require these specific library versions. They are available
616 as RPMs and are available in the RedHat 7.2 updates directory on
618 <a href="ftp://rufus.w3.org/linux/redhat/updates/7.2/en/os/i386/">
619 RedHat mirror</a>. They can be installed alongside earlier and
620 later GCC libraries.</p>
623 <li><b>Portions of the <span class="fixed">libphp4</span> Apache
624 plugin are written in C++, as is Shibboleth. There is a known
625 conflict between the PHP extensions <span class="fixed">libpspell.so</span>
626 and <span class="fixed">libsablot.so</span> which will manifest
627 itself as segmentation faults when starting Apache. If a site wants
628 to use <span class="fixed">libphp4.so</span> and Shibboleth at once,
629 then one of the following may be done:</b><ol>
630 <li>Remove the options <span class="fixed">--with-pspell</span>
631 and <span class="fixed">--with-xslt-sablot</span> from PHP's
633 <li>Rebuild these two modules using the same version of GCC that
634 was used to compile Shibboleth.</li>
641 <li>Solaris 2.8:<ul type="disc">
642 <li><a HREF="ftp://ftp.openssl.org/source/openssl-0.9.7b.tar.gz">
645 <p>The shared library version of OpenSSL is required by
646 Shibboleth. The static libraries may be installed as well if
647 necessary for other applications, but cannot be used within
648 mod_ssl or any other Apache modules.</p>
651 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a><blockquote>
652 <p>Apache must be compiled with mod_so for DSO module support,
653 and must include SSL support (preferably using
654 <span class="fixed">mod_ssl</span>) and EAPI support (which
655 <span class="fixed">mod_ssl</span> requires and provides).
656 Shibboleth can coexist with <span class="fixed">mod_auth</span>,
657 which may be compiled or loaded into the server for use
658 elsewhere, but Shibboleth does not need or use it.</p>
659 <p><span class="fixed">mod_ssl</span>'s loadable module,
660 <span class="fixed">libssl.so</span>, must be compiled against
661 <span class="fixed">OpenSSL 0.9.7b</span>'s shared libraries.
662 Other versions or a statically linked build of
663 <span class="fixed">libssl.so</span> will cause failures such as
664 bus errors when used with Shibboleth.</p>
665 <p>To check how OpenSSL was built, run the <span class="fixed">
666 ldd</span> command against <span class="fixed">libssl.so</span>
667 in the Apache <span class="fixed">/libexec/</span> folder and
668 check the output for references to <span class="fixed">
669 libssl.so.0.9.7b</span>. If you see an earlier version
670 mentioned, or no mention of it at all, then <span class="fixed">
671 OpenSSL 0.9.7b</span> must be built with shared libraries from
672 source, and the Apache module rebuilt with it.</p>
676 <a href="ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/libgcc-3.2.2-sol8-sparc-local.gz">
677 libgcc v3.2.2+ and libstdc++ v3.2.2+</a><blockquote>
678 <p>Shibboleth binaries are currently built with
679 <a HREF="http://www.gnu.org/software/gcc/gcc.html">GCC 3.2.2</a>,
680 and require these specific library versions or newer. They are
681 available as Sun freeware packages and can be installed
682 alongside earlier and later GCC libraries.</p>
686 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
687 Shibboleth v1.1 Target for Solaris</a></li>
688 <li><b>Portions of the <span class="fixed">libphp4</span> Apache
689 plugin are written in C++, as is Shibboleth. There is a known
690 conflict with the PHP extensions <span class="fixed">libpspell.so</span>
691 and <span class="fixed">libsablot.so</span> which will manifest
692 itself as segmentation faults when starting Apache. If a site wants
693 to use <span class="fixed">libphp4.so</span> and Shibboleth at once,
694 then one of the following may be done:</b><ol>
695 <li>Remove the options <span class="fixed">--with-pspell</span>
696 and <span class="fixed">--with-xslt-sablot</span> from PHP's
698 <li>Rebuild these two modules using the same version of GCC that
699 was used to compile Shibboleth.</li>
706 <li>RedHat 8 and 9:<blockquote>
707 <p>RedHat 8 and 9 ship with Apache 2, which is not yet supported by
708 Shibboleth. To run Shibboleth under this OS,
709 <a href="http://www.apache.org/dist/httpd/">Apache 1.3.27</a> must
713 <p>Apache must be compiled with mod_so for DSO module support, and
714 must include SSL support (preferably using <span class="fixed">
715 mod_ssl</span>), and EAPI support (which <span class="fixed">mod_ssl</span>
716 requires and provides). Shibboleth can coexist with
717 <span class="fixed">mod_auth</span>, which may be compiled or loaded
718 into the server for use elsewhere, but Shibboleth does not need or
719 use it. The most recent Red Hat RPM (1.3.23-14 as of this writing)
723 <p>On Linux, Shibboleth requires that Apache and Apache-SSL be built
724 with <span class="fixed">libpthread</span>, or loading the
725 <span class="fixed">mod_shibrm</span> or <span class="fixed">
726 mod_shire</span> modules will cause Apache to stop. While RedHat's
727 Apache is compatible, Debian's Apache must be rebuilt with
728 <span class="fixed">libpthread</span>:</p>
730 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
731 $ apt-build --rebuild --reinstall install apache-common \<br>
732 apache apache-ssl</span></p>
737 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
738 Shibboleth 1.1 Target for RedHat</a></li>
739 <li><a href="http://www.openssl.org/source/">openssl-0.9.6, revision
740 <span class="fixed">i</span> or newer</a></li>
741 <li>libstdc++3-3.0.4-1.i386.rpm and libgcc-3.0.4-1.i386.rpm
743 <p>Shibboleth binaries are currently built with
744 <a href="http://www.gnu.org/software/gcc/gcc.html">GCC 3.04</a>,
745 and require these specific library versions. They are available
746 as RPMs and are available in the RedHat 7.2 updates directory on
748 <a href="ftp://rufus.w3.org/linux/redhat/updates/7.2/en/os/i386/">
749 RedHat mirror</a>. They can be installed alongside earlier and
750 later GCC libraries.</p>
753 <li><b>Portions of the <span class="fixed">libphp4</span> Apache
754 plugin are written in C++, as is Shibboleth. There is a known
755 conflict with the PHP extensions <span class="fixed">libpspell.so</span>
756 and <span class="fixed">libsablot.so</span> which will manifest
757 itself as segmentation faults when starting Apache. If a site wants
758 to use <span class="fixed">libphp4.so</span> and Shibboleth at once,
759 then one of the following may be done:</b>
761 <li>Remove the options <span class="fixed">--with-pspell</span>
762 and <span class="fixed">--with-xslt-sablot</span> from PHP's
764 <li>Rebuild these two modules using the same version of GCC that
765 was used to compile Shibboleth. </li>
772 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
774 <p>For the sake of clarity, this deployment guide assumes that standard
775 directories are used for all installations. These directories may be changed
776 for local implementations, but must be done so consistently.</p>
778 <li>Ensure that you have obtained the proper
779 <a href="http://shibboleth.internet2.edu/release/shib-download.html">
780 tarball</a> for your operating system.</li>
781 <li>On Unix, the tarballs expand into <span class="fixed">
782 /opt/shibboleth</span>, and should be expanded as <span class="fixed">
783 root</span> from <span class="fixed">/</span>. If you use a different
784 layout or location, you will need to adjust your configuration files.
785 You should see the following directory structure (date and size details
786 notwithstanding):<blockquote>
787 <p><span class="fixed">$ ls -l<br>
788 drwxr-xr-x 2 root root 4096 Oct 24 03:54 bin<br>
789 drwxr-xr-x 2 root root 4096 Oct 24 03:54 doc<br>
790 drwxr-xr-x 4 root root 4096 Oct 24 03:54 etc<br>
791 drwxr-xr-x 9 root root 4096 Oct 24 03:54 include<br>
792 drwxr-xr-x 4 root root 4096 Oct 24 03:55 lib<br>
793 drwxr-xr-x 2 root root 4096 Oct 24 03:55 libexec<br>
794 drwxr-xr-x 4 root root 4096 Oct 24 02:02 share</span></p>
796 <p>On Windows, until a real installer is available, the zip file should
797 be unpacked beneath the root of the system drive, where it will create
798 an <span class="fixed">\opt\shibboleth</span> tree that resembles the
799 Unix layout above. This will allow the standard configuration options to
800 work. <b>The <span class="fixed">C:\opt\shibboleth\lib</span> directory
801 MUST be added to the system path to enable proper operation.</b> </li>
804 <h4><a name="3.c."></a>3.c. Configure Apache 1.3.x</h4>
807 <li>Shibboleth includes configuration directives in the file
808 <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span>
809 which must be added to the httpd.conf file used locally. It is
810 recommended that these directives simply be added to the end of the
811 existing <span class="fixed">httpd.conf</span> file rather than trying
812 to merge it in-line; <a href="#3.c.2.">step 2</a> describes the
813 necessary modifications to the Apache startup script. The default
814 configuration will often work, but if customization is necessary, these
815 options may be modified:<dl>
816 <dd class="attribute"><span class="fixed">LoadModule <module>
817 <pathname></span> </dd>
818 <dd class="value">Specifies the title and location of the
819 <span class="fixed">shibrm_module</span> resource manager and
820 <span class="fixed">shire_module</span> SHIRE modules. These are
821 installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shibrm.so</span>
822 and <span class="fixed">/opt/shibboleth/libexec/mod_shire.so</span></dd>
823 <dd class="attribute"><span class="fixed">SHIREConfig <pathname></span>
825 <dd class="value">Specifies the <span class="fixed">pathname</span>
826 of the SHIRE's configuration file. Defaults to <span class="fixed">
827 /opt/shibboleth/etc/shibboleth/shibboleth.ini</span>.</dd>
828 <dd class="attribute"><span class="fixed">SHIREURL <url><br>
829 <Location <url>><br>
830 SetHandler <method><br>
831 </Location></span></dd>
832 <dd class="value">Specifies the <span class="fixed">URL</span> and
833 the <span class="fixed">method</span> the target uses to handle
834 requests for Shibboleth-protected resources. Currently,
835 <span class="fixed">shib-shire-post</span> is the only available
836 handler <span class="fixed">method</span>. <span class="fixed">
837 SHIREURL</span> is used by Shibboleth when re-directing the user to
838 the WAYF and <span class="fixed"><Location></span> by Apache; for
839 this reason, both <span class="fixed">URL</span> specifications must
840 match. Note that the configuration file itself contains <>'s, and
841 <span class="fixed">Location</span> should not be replaced.<p>The
842 referenced <span class="fixed">URL</span> can be either a partial
843 path or an absolute URL. The partial path allows each virtual server
844 to use its own hostname and port in the SHIRE for session cookie
845 purposes, while the absolute URL forces HTTP virtual servers to use
846 HTTPS for the SHIRE. Use of a full <span class="fixed">https://</span>
848 <dd class="attribute"><span class="fixed">ShibMapAttribute
849 <attribute-uri> <HTTP-header> [alias]</span> </dd>
850 <dd class="value"><b>This command has been deprecated in favor of
851 the configuration support available in the Attribute Acceptance
852 Policy file. See <a href="#4.e.">section 4.e.</a> It may be removed
853 in a future release.</b></dd>
856 <li><a name="3.c.2."></a>These modifications must be made to the Apache
857 startup script:<p>Add the following environment variable:</p>
859 <p><span class="fixed">SHIBCONFIG=/opt/shibboleth/etc/shibboleth/shibboleth.ini<br>
860 export SHIBCONFIG</span></p>
862 <p>If the OpenSSL libraries are not in the system's search path, they
863 should be added to <span class="fixed">LD_LIBRARY_PATH</span>. Generally
864 libtool's linker options will insure that the modules can locate the
865 Shibboleth libraries, but if not, you may need to add
866 <span class="fixed">/opt/shibboleth/lib</span> to <span class="fixed">
867 LD_LIBRARY_PATH</span> as well.</p>
868 <p>If the SHIBCONFIG environment variable is not specified, Shibboleth
869 will use <span class="fixed">/opt/shibboleth/etc/shibboleth/shibboleth.ini</span>
871 <li>The SHAR must be started along with Apache. Among other methods on
872 Unix, this can be done either by creating a separate SHAR startup script
873 or by modifying Apache's RC script to start/stop the <span class="fixed">
874 SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is
875 suggested that Apache's script be modified by adding:<blockquote>
876 <p><span class="fixed">/opt/shibboleth/bin/shar -f &</span> </p>
878 <p>Sample <span class="fixed">init.d</span> scripts may be included with
879 future releases. Ensure that the environment variable referenced in
880 <a href="#3.c.2">3.c.2</a> are in place.</li>
881 <li>By default, the Shibboleth modules are configured to log information
882 on behalf of Apache to the file <span class="fixed">
883 /opt/shibboleth/etc/shibboleth/shire.log</span>, though this can be
884 changed. For this log to be created, Apache must have permission to
885 write to this file, which may require that the file be manually created
886 and permissions assigned to whatever user Apache is configured to run
887 under. If the file does not appear when Apache runs with the modules
888 loaded, check for permission problems. </li>
889 <li>The options in <span class="fixed">shibboleth.ini</span> must be
890 configured as documented in <a href="#4.a.">4.a</a>. Apache content will
891 then need to be modified for Shibboleth authentication. This is
892 discussed in <a href="#4.d.">4.d</a>. It is recommended that the target
893 then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
896 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
899 <li>The package includes an ISAPI filter and bundled extension for SHIRE
900 POST processing in a single library, <span class="fixed">libexec\isapi_shib.dll</span>.
901 This filter is configured using commands in <span class="fixed">
902 C:\opt\shibboleth\etc\shibboleth\shibboleth.ini</span>. Make sure you've
903 added the library directory to the path as directed in <a href="#3.b.">
904 section 3.b.</a><p>Installing the extension into IIS is a two step
905 process:<ol type="1">
906 <li type="a">First, add the filter using the Internet Services
907 Manager MMC console. Right click on the machine icon on the left,
908 and edit the WWW Service master properties. On the "ISAPI Filters"
909 tab, add a new filter called Shibboleth and specify the DLL named
910 above. The priority should be High, and once the filter is loaded,
911 make sure it appears in the list <b>below</b> the "sspifilt" entry.
912 Restart IIS and make sure the filter shows up with a green arrow.
913 Check the Windows event log if it fails to load. The default
914 configuration options are sparse, but they should allow the filter
915 to at least initialize.</li>
916 <li type="a">Secondly, map a special file extension, such as
917 <span class="fixed">.shire</span>, to the ISAPI library so that
918 virtual URLs can be specified to invoke the SHIRE handler for each
919 web site. Right click on the machine icon on the left, and edit the
920 WWW Service master properties. On the "Home Directory" tab, add a
921 script mapping using the "Configuration" button. The "Executable"
922 box should point to the filter/extension library, and the
923 "Extension" can be set to anything unlike to conflict, but
924 <span class="fixed">.shire</span> is assumed (and the dot must be
925 included). You should select the option to limit verbs to POST, and
926 you must uncheck the "Check that file exists" box.</li>
929 <li>All other aspects of configuration are handled via the
930 <span class="fixed">shibboleth.ini</span> file and associated XML-based
931 policy files described in subsequent sections. Particular use is made of
932 the per-hostname section feature that allows global settings to be
933 overridden per-site, and this permits different IIS instances to be
934 separately configured.</li>
935 <li>A special section must be added/uncommented in the
936 <span class="fixed">shibboleth.ini</span> file to support IIS usage. The
937 <span class="fixed">[isapi]</span> section must be used to map IIS
938 Instance ID numbers to fully-qualified hostnames that correspond to
939 named sections later in the file. Instance IDs are used in the IIS
940 metabase to identify web sites. They are applied starting with the
941 number 1 and number the web sites in order in the Internet Services
942 Manager from top to bottom. In the <span class="fixed">[isapi]</span>
943 section, add lines in the following form:
944 <blockquote class="fixed">
945 <p>1=hostname.domain.com<br>
946 2=hostname2.domain.com<br>
949 <p>At least an empty configuration section named <span class="fixed">
950 hostname.domain.com</span> should then be added to the end of the file.
951 Any options specific to that web site can be added as documented in
953 <li>See the following section for information on running the SHAR
954 service on Windows.</li>
955 <li>The options in <span class="fixed">shibboleth.ini</span> must be
956 configured as documented in <a href="#4.a.">4.a</a>. It is recommended
957 that the target then be tested as detailed in section <a href="#5.a.">
961 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
963 <p>The SHAR is a console application that is primarily designed to be
964 installed as a Windows service. To run the process in console mode for
965 testing, the <span class="fixed">-console</span> parameter is used.
966 Otherwise, parameters are used to install (or remove) the SHAR from the
967 service database and subsequent control is via the Service Control Manager
968 applet. The following command line parameters can be used:</p>
970 <dd class="attribute"><span class="fixed">-console</span></dd>
971 <dd class="value">Allows the process to be started from a command
972 prompt. Since the console will exit if the desktop user logs out, this
973 is not suitable for production use, but may be useful for testing.</dd>
974 <dd class="attribute"><span class="fixed">-config <pathname></span> </dd>
975 <dd class="value">Specifies the pathname of the SHAR's configuration
976 file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.ini</span>
977 or the value of the <span class="fixed">SHIBCONFIG</span> environment
978 variable, if it is set.</dd>
979 <dd class="attribute"><span class="fixed">-install <servicename></span></dd>
980 <dd class="value">Installs the SHAR as a named service in the Windows
981 service database. A name should be provided if multiple instances of the
982 SHAR need to be run on different ports, and thus installed separately.
983 The <span class="fixed">-config</span> option can be provided to include
984 a specific configuration file on the service's command line.</dd>
985 <dd class="attribute"><span class="fixed">-remove <servicename></span></dd>
986 <dd class="value">Removes the named service instance of the SHAR from
987 the Windows service database.</dd>
993 <h3><a name="4."></a>4. Getting Running</h3>
994 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.ini</span></h4>
996 <p>Most of the configuration for the SHAR, SHIRE, and RM is stored in the
997 file <span class="fixed">shibboleth.ini</span>. This file is split into
998 several pre-defined sections. The first sections, <span class="fixed">
999 [general]</span>, <span class="fixed">[shire]</span>, and
1000 <span class="fixed">[shar]</span>, define the operational parameters for the
1001 <span class="fixed">SHIRE</span> and <span class="fixed">SHAR</span>. While
1002 not precisely accurate, the <span class="fixed">[shire]</span> section is
1003 generally associated with the web server modules and libraries that
1004 applications interface with, while the <span class="fixed">[shar]</span>
1005 section is associated with the separate SHAR process. The
1006 <span class="fixed">[general]</span> section holds global settings, used by
1007 all components. The <span class="fixed">[shire]</span> and
1008 <span class="fixed">[shar]</span> sections can override the
1009 <span class="fixed">[general]</span> tags with SHIRE- or SHAR-specific
1010 configuration. For example, if the SHAR is looking for a tag, it will look
1011 first in the <span class="fixed">shar</span> section; if it does not find
1012 the tag there, it will proceed to look in the <span class="fixed">general</span>
1014 <p>The following sections, <span class="fixed">[metadata_shire]</span>,
1015 <span class="fixed">[metadata_shar]</span>, and <span class="fixed">
1016 [policies]</span>, define the trust framework within which the entire system
1017 operates. Example configuration files are bundled with the Shibboleth
1018 distribution, currently derived from the InQueue staging federation managed
1020 <p>For Apache (but not IIS), there is also information that must be
1021 configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span>
1022 (or equivalent); for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1023 <p>Information in the logging configuration files referenced by
1024 <span class="fixed">shibboleth.ini</span> may require additional changes to
1025 meet local needs. The logging level can be raised to <span class="fixed">
1026 INFO</span> or <span class="fixed">DEBUG</span> if additional detail is
1027 needed for testing. It is recommended that after initial installation is
1028 completed, the log level in both files be left at either <span class="fixed">
1029 INFO</span> or <span class="fixed">WARN</span>.</p>
1030 <p>Fields that are purple are optional; grey fields are mandatory. If the
1031 option only applies to a specific environment, such as IIS/ISAPI only, then
1032 this is indicated.</p>
1033 <p><span class="fixed">[general]</span>:</p>
1035 <dd class="attribute"><span class="fixed">logger = <pathname></span></dd>
1036 <dd class="value">Specifies the location of the <span class="fixed">
1037 log4cpp</span> configuration file for most Shibboleth events. This
1038 element may also be optionally specified for each of the components
1039 individually (which is the default provided, so this setting is often
1040 unused). Default logging settings (using local log files) should
1041 suffice. If using a remote syslogd instead, the <span class="fixed">
1042 syslog</span> daemon must accept <span class="fixed">UDP:514</span>
1043 messages, and on Linux, <span class="fixed">SYSLOGD_OPTIONS</span> must
1044 include <span class="fixed">-r</span> to enable logging from remote
1045 machines. The logging level is also defined in the logger configuration
1046 file. The configuration format and log levels are similar to that of the
1047 <a href="http://jakarta.apache.org/log4j/docs/documentation.html">Log4j</a>
1048 package's property format.</dd>
1049 <dd class="attribute"><span class="fixed">schemadir = <pathname></span></dd>
1050 <dd class="value">Specifies the directory in which the XML schema files
1051 are located; defaults to <span class="fixed">
1052 /opt/shibboleth/etc/shibboleth/</span>. This should generally be left
1053 alone, unless a non-default installation path is used.</dd>
1054 <dd class="attribute"><span class="fixed">sharsocket = <pathname> | [IP
1055 interface:]port</span></dd>
1056 <dd class="value">Specifies the location of the socket the SHAR uses to
1057 form connections. Note that if you change this, the SHAR and Apache
1058 should both be restarted immediately, since new Apache child processes
1059 will use the changed value as soon as they start up.
1060 <p>On Unix, this is usually set to a domain socket path, often something
1061 in <span class="fixed">/tmp</span>. On Windows, this must be either a
1062 TCP port number, or a combination of an IP address and port, with a
1063 colon in between. Using an address specifies an IP interface to bind to
1064 on multi-homed servers. Using just a port number generally suffices. If
1065 this syntax is used on Unix, then the process will use a TCP socket
1066 instead of a domain socket. </p>
1067 <p><b>Security Note:</b> Using TCP, which is mandatory on Windows, can
1068 be insecure if used in certain non-default configurations. If you allow
1069 access to the service from other hosts, be sure a firewall is in place
1070 to prevent unauthorized access. The <span class="fixed">sharacl</span>
1071 setting, described later, provides some minimal filtering, but TCP is
1072 still an insecure protocol.</dd>
1074 <p>The rest of the <span class="fixed">[general]</span> configuration
1075 section defines global settings that can be overridden by server-specific
1076 tags in sections defined by the server name. This is especially applicable
1077 for non-Apache configurations. For example, if you have a web server named
1078 www.example.edu, you can define a section <span class="fixed">[www.example.edu]</span>
1079 and override global tags with tags for that server only.</p>
1080 <p>The following table lists the server-specific tags. It is broken into
1081 mandatory tags, and optional tags. Tags in the <span class="fixed">[general]</span>
1082 section correspond to all servers; to override specific tags on a per-server
1083 basis, use <span class="fixed">[<FQDN>]</span> as the header for a section (FQDN
1084 means fully-qualified domain name, and corresponds to the name you assign to
1085 a virtual host using the Apache ServerName directive, or that you map IIS
1086 instance IDs to using the <span class="fixed">[isapi]</span> section.</p>
1087 <p><span class="fixed">[<general>]</span>:</p>
1089 <dd class="attribute"><span class="fixed">wayfURL = <absolute url></span></dd>
1090 <dd class="value">Specifies the URL of the WAYF service the user is
1091 redirected to. Federations will often provide this URL in order to
1092 control the way in which sites are presented to users, but a target may
1093 provide this function, or it may be set directly to a specific site's
1094 Handle Service, effectively rendering the system internal to a single
1096 <dd class="attribute"><span class="fixed">shireURL = <absolute or
1097 relative url></span> ISAPI</dd>
1098 <dd class="value">Specifies the URL of the SHIRE POST URL, or assertion
1099 consumer service, at which new sessions are initiated. This can be an
1100 absolute URL, or a relative path to be prefixed by the base URL of the
1101 web site. Using an absolute URL allows a virtual server to funnel SHIRE
1102 requests to a fixed location, such as in the case where a non-SSL site
1103 wants to handle SHIRE requests over SSL (on a different port).
1104 <p>Note that this URL will result in a cookie being set, and this cookie
1105 must be returned in subsequent requests, so the virtual server's domain
1106 name and port must be consistent with the SHIRE's domain name and port
1107 for some browsers to properly return the cookie. If default ports are
1108 used (and thus left unspecified), browsers will generally return cookies
1109 set via SSL to a non-SSL server. If non-default ports are used, it is
1110 recommended that this be a relative URL so that each virtual host
1111 handles its own cookie operations.</p>
1112 <p>For Shibboleth to function in IIS, the file extension at the end of
1113 this URL must match the value configured into IIS and mapped to the
1114 ISAPI extension. This causes the request to be serviced properly, even
1115 though no file by that name actually exists.</dd>
1116 <dd class="attribute"><span class="fixed">cookieName = <string></span></dd>
1117 <dd class="value">Defines the name to be assigned to in-memory session
1119 <dd class="attribute"><span class="fixed">shireError = <pathname></span></dd>
1120 <dd class="value">Specifies the location of the template for the error
1121 page generated when there is an error re-directing the user to the WAYF
1122 or processing a new session sign-on.</dd>
1123 <dd class="attribute"><span class="fixed">rmError = <pathname></span></dd>
1124 <dd class="value">Specifies the location of the template for the error
1125 page generated if internal errors occur in the RM.</dd>
1126 <dd class="attribute"><span class="fixed">accessError = <pathname></span></dd>
1127 <dd class="value">Specifies the location of the template for the page
1128 displayed to users when access to a protected resource is denied by the
1129 RM. This is distinct from when errors occur during the evaluation
1130 process itself, and indicates a denial of authorization.</dd>
1131 <dd class="attributeopt"><span class="fixed">normalizeRequest = <true|false></span></dd>
1132 <dd class="valueopt">If true, all redirects and computed request URLs
1133 generated by Shibboleth will be created using the virtual server name
1134 assigned to the server. If <span class="fixed">false</span>, the
1135 browser's supplied URL is sometimes used to compute the information.
1136 This sometimes has no effect, depending on the capabilities of the web
1137 server, since the correct behavior is almost always to rely on the
1138 server's API to report the hostname and ignore the browser.</dd>
1139 <dd class="attributeopt"><span class="fixed">checkIPAddress = <true|false></span></dd>
1140 <dd class="valueopt">If <span class="fixed">true</span>, Shibboleth will
1141 check client addresses for impersonation protection. In most
1142 circumstances, this should be enabled to prevent certain attacks
1143 concerning stolen cookies, but this can cause problems for users behind
1144 proxies or NAT devices. Defaults to <span class="fixed">false</span>.</dd>
1145 <dd class="attributeopt"><span class="fixed">shireSSLOnly = <true/false></span></dd>
1146 <dd class="valueopt">If <span class="fixed">true</span>, the SHIRE will
1147 reject HTTP connections for new session sign-on that are not SSL-protected.
1148 This guards the initial session sign-on from the browser, but does not
1149 preclude non-SSL content. Use of SSL is strongly recommended; see
1150 section <a href="#2.c.">2.c</a> for more information.</dd>
1151 <dd class="attributeopt"><span class="fixed">mustContain =
1152 <string1>;<string2></span> ISAPI</dd>
1153 <dd class="valueopt">Controls what content in IIS to protect with
1154 Shibboleth. Multiple values should be separated with a semicolon. Each
1155 string is matched directly against the requested URL, and if the URL
1156 contains the string, a match is made and Shibboleth applies. No regular
1157 expressions are supported, only literal matches. Slashes are matched
1158 like other characters, so path components can be surrounded with slashes
1159 to match any requests with a particular component in the path. Defaults
1160 to protecting everything on a server or site.</dd>
1161 <dd class="attributeopt"><span class="fixed">contentSSLOnly = <true|false></span>
1163 <dd class="valueopt">If <span class="fixed">true</span>, Shibboleth will
1164 insist that any request for protected content is over an SSL connection.
1165 Defaults to <span class="fixed">false</span>.</dd>
1166 <dd class="attributeopt"><span class="fixed">authLifetime = <seconds></span>
1168 <dd class="valueopt">If set, sessions are always terminated after the
1169 specified number of seconds, resulting in a new redirect and request for
1170 authentication, just as if a new request without a session is received.
1171 Defaults to infinite.</dd>
1172 <dd class="attributeopt"><span class="fixed">authTimeout = <seconds></span>
1174 <dd class="valueopt">If set, sessions are always terminated after the
1175 specified number of seconds of inactivity (defined as no requests
1176 received in that session), resulting in a new redirect and request for
1177 authentication, just as if a new request without a session is received.
1178 Defaults to infinite.</dd>
1179 <dd class="attributeopt"><span class="fixed">requestAttributes = <attr1>
1180 <attr2> <attr3>...</span> </dd>
1181 <dd class="valueopt">Specifies a space-delimited list of attributes
1182 (named by a designated URI) that the SHAR will request when querying for
1183 attributes. By default, the SHAR will ask for and receive all attributes
1184 the AA is willing to release to it.</dd>
1185 <dd class="attributeopt"><span class="fixed">exportAssertion = <true|false></span>
1187 <dd class="valueopt">If set, the SAML attribute assertion received by
1188 the SHAR is exported to a CGI request header called Shib-Attributes,
1189 encoded in base64. Defaults to <span class="fixed">false</span>. While
1190 this does require parsing the raw XML, it also permits an application to
1191 see attributes that may have been filtered by an AAP, or to forward the
1192 SAML assertion to a third party.</dd>
1193 <dd class="attributeopt"><span class="fixed">supportContact = <e-mail></span></dd>
1194 <dd class="valueopt">Specifies the local site's support e-mail address,
1195 and is used in the generation of error pages.</dd>
1196 <dd class="attributeopt"><span class="fixed">logoLocation = <pathname></span></dd>
1197 <dd class="valueopt">Specifies the location of the logo used in the
1198 generation of error pages. This logo can be in any format that the web
1199 browser will understand, and should be a URL (absolute or relative) that
1200 will return a valid logo.</dd>
1202 <p><span class="fixed">[shire]</span>:</p>
1204 <dd class="attribute"><span class="fixed">metadata = <section tag></span></dd>
1205 <dd class="value">Specifies the tag that defines the section of
1206 <span class="fixed">shibboleth.ini</span> the SHIRE should use to
1207 acquire its metadata. The SHIRE does not need trust metadata, and so
1208 generally it will only need site metadata and attribute acceptance
1209 policy to define attributes and enforce policies like scope
1210 limitations(e.g. MIT not asserting attributes @brown.edu.)</dd>
1211 <dd class="attributeopt"><span class="fixed">logger = <pathname></span></dd>
1212 <dd class="valueopt">Specifies the location of the <span class="fixed">
1213 log4cpp</span> configuration file for Shibboleth events produced by the
1214 web server modules and libraries. Refer to the global setting for more
1216 <dd class="attributeopt"><span class="fixed">aap-uri = <uri></span>
1218 <dd class="valueopt">Specifies the URI of an attribute acceptance policy
1219 XML file. This command has been replaced with a new metadata provider
1220 type for attribute policy that should be provided to both the SHIRE and
1221 SHAR components. To replace this command, add lines to both metadata
1222 sections of this form:
1223 <blockquote class="fixed">
1224 <p>edu.internet2.middleware.shibboleth.target.AAP.XML=<uri></p>
1226 <p>For more information, refer to section <a href="#4.e.">4.e</a>. This
1227 command will be removed in future releases.</dd>
1229 <p><span class="fixed">[shar]</span>:</p>
1231 <dd class="attribute"><span class="fixed">metadata = <tag></span></dd>
1232 <dd class="value">Specifies the tag that defines the section of
1233 <span class="fixed">shibboleth.ini</span> the SHAR should use to acquire
1234 its site, trust, and attribute metadata.</dd>
1235 <dd class="attribute"><span class="fixed">cacheType = <method></span></dd>
1236 <dd class="value">Specifies the method used by the SHAR to cache
1237 sessions and attributes. The default is <span class="fixed">memory</span>,
1238 which indicates that the SHAR should store received attributes in
1239 memory. Another option is <span class="fixed">mysql</span>, which will
1240 use the MySQL Credential Cache, if it is available.</dd>
1241 <dd class="attribute"><span class="fixed">cacheClean = <seconds></span></dd>
1242 <dd class="value">Specifies the duration in seconds between cleanups of
1243 the SHAR's cached but expired sessions and attributes. Defaults to
1244 <span class="fixed">300</span>, or 5 minutes.</dd>
1245 <dd class="attribute"><span class="fixed">cacheTimeout = <seconds></span></dd>
1246 <dd class="value">Specifies the duration in <span class="fixed">seconds</span>
1247 that must elapse between user accesses before that user's session is
1248 destroyed, including the associated handle and all cached attributes.
1249 Defaults to <span class="fixed">28800</span> seconds, or 8 hours. This
1250 should generally be longer than the associated server's settings for
1251 session lifetime and timeout.</dd>
1252 <dd class="attributeopt"><span class="fixed">logger = <pathname></span></dd>
1253 <dd class="valueopt">Specifies the location of the <span class="fixed">
1254 log4cpp</span> configuration file for Shibboleth events produced by the
1255 SHAR service. Refer to the global setting for more information.</dd>
1256 <dd class="attributeopt"><span class="fixed">sharacl = <IP Address></span></dd>
1257 <dd class="valueopt">Specifies one or more space-delimited IP addresses
1258 from which a TCP-based SHAR service will accept connections. Defaults to
1259 127.0.0.1 (localhost). Should only be changed if proper precautions have
1260 been taken to protect connections from off-host.</dd>
1261 <dd class="attributeopt"><span class="fixed">certFile = <pathname></span>
1263 <dd class="valueopt">Specifies the location of the PEM-format
1264 certificate used by the SHAR to communicate in authenticated fashion
1265 with origin site Attribute Authorities.</dd>
1266 <dd class="attributeopt"><span class="fixed">keyFile = <pathname></span>
1268 <dd class="valueopt">Specifies the location of the PEM-format private
1269 key used by the SHAR to communicate in authenticated fashion with origin
1270 site Attribute Authorities.</dd>
1271 <dd class="attributeopt"><span class="fixed">keyPass = <password></span>
1273 <dd class="valueopt">Specifies the <span class="fixed">password</span>
1274 used to access the <span class="fixed">keyFile</span>, if any.</dd>
1275 <dd class="attributeopt"><span class="fixed">calist = <pathname></span>
1277 <dd class="valueopt">Specifies a single file of PEM-format certificates
1278 containing the root CAs the SHAR will consider to be valid signers of AA
1279 server certificates. Currently applies globally to all communication
1281 <dd class="attributeopt"><span class="fixed">AATimeout = <seconds></span>
1283 <dd class="valueopt">Specifies the number of seconds that the SHAR will
1284 wait for attributes to be sent from an AA. Defaults to
1285 <span class="fixed">60</span>.</dd>
1286 <dd class="attributeopt"><span class="fixed">AAConnectTimeout =
1287 <seconds></span> </dd>
1288 <dd class="valueopt">Specifies the number of seconds that the SHAR will
1289 wait for a connection to be established with an AA. Defaults to
1290 <span class="fixed">30</span>.</dd>
1292 <p><span class="fixed">[metadata]</span> sections must be created and named
1293 in accordance with the value of the <span class="fixed">metadata</span>
1294 parameter in the <span class="fixed">[shire]</span> and <span class="fixed">
1295 [shar]</span> sections. Metadata sections may be shared or defined for each
1296 component. Three XML-based providers are supported by Shibboleth, but future
1297 providers may be specified with name/value pairs consisting of
1298 <span class="fixed"><metadata provider type>=<source></span>.</p>
1299 <p>Note that any number of files of the three types may be loaded into the
1300 system, which supports aggregating policy from across federations.</p>
1301 <p>Shibboleth provides a simple utility called <span class="fixed">
1302 siterefresh</span> for updating metadata files from a central location and
1303 verifying a digital signature over them, as described in section
1304 <a href="#4.g.">4.g</a>.</p>
1305 <p><span class="fixed">[<metadata>]</span>:</p>
1307 <dd class="attribute"><span class="fixed">
1308 edu.internet2.middleware.shibboleth.metadata.XML = <pathname></span></dd>
1309 <dd class="value">Specifies the location of the file to load site
1310 metadata from. This information controls what origin sites are trusted
1311 by the target and provides contact information. This should be a file
1312 stored locally, and may be used by both the SHIRE and SHAR.</dd>
1313 <dd class="attribute"><span class="fixed">
1314 edu.internet2.middleware.shibboleth.trust.XML = <pathname></span></dd>
1315 <dd class="value">Specifies the location of the trust database of
1316 certificates and/or CA roots used by the SHAR during session initiation
1317 (but currently is not used during attribute exchange). The SHIRE
1318 component generally does not need trust data.</dd>
1319 <dd class="attribute"><span class="fixed">
1320 edu.internet2.middleware.shibboleth.target.AAP.XML = <pathname></span></dd>
1321 <dd class="value">Specifies the location of the Attribute Acceptance
1322 Policy file that defines what attributes will be visible to
1323 applications, how to filter their values based on the source, and how to
1324 make them available to applications and the RM. See <a href="#4.e.">
1325 section 4.e.</a> for detailed information on this file.<p><b>This
1326 provider has been added as of version 1.1, and supersedes the old
1327 <span class="fixed">aap-uri</span> and <span class="fixed">attributes</span>
1328 settings, as well as the Apache <span class="fixed">ShibMapAttribute</span>
1331 <p>The <span class="fixed">[extensions:saml]</span> section specifies a set
1332 of extension libraries to load that add additional functionality to the
1333 system. Examples include session cache implementations, such as the MySQL
1334 cache, or advanced metadata providers.</p>
1335 <p><span class="fixed">[extensions:saml]</span>:</p>
1337 <dd class="attribute"><span class="fixed"><name> = <library pathname></span>
1339 <dd class="value">The name of the extension is simply a unique key and
1340 is not important. The path to the library to load must be absolute and
1343 <p>The <span class="fixed">[policies]</span> section contains the policy URI
1344 values that control acceptance of assertions from origin sites. This may
1345 eventually have multiple elements associated it for targets that are members
1346 of multiple federations.</p>
1347 <p><span class="fixed">[policies]</span>:</p>
1349 <dd class="attribute"><span class="fixed"><federation> = <URI></span>
1351 <dd class="value">The name of the <span class="fixed">federation</span>
1352 and its associated policy <span class="fixed">URI</span>. This
1353 information should be provided by federations and is designed to support
1354 future work in federation deployment. For the time being, it simply
1355 insures that deployments not meant to interoperate will not do so.<p>
1356 This set of URI values is matched against the SAML <span class="fixed">
1357 Audience</span> fields of assertions received from HS's and AA's. One of
1358 the URI's specified by the origin in the <span class="fixed">
1359 edu.internet2.middleware.shibboleth.audiences</span> property must match
1360 one of these URIs or the assertion will not be accepted by design.</dd>
1363 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1365 <p>Shibboleth supports the dynamic generation of information in error pages
1366 referenced by <span class="fixed">shibboleth.ini</span>. The Shib Target
1367 employs a special Markup Language Processor to insert special tags into the
1368 generated HTML. The parser will read the error file looking for any tag that
1371 <p><span class="fixed"><shibmlp tag-name /></span> </p>
1373 <p>Shibboleth will replace <span class="fixed">tag-name</span> with the
1374 appropriate markup tag from the table below:</p>
1376 <dd class="attribute"><span class="fixed">supportContact</span></dd>
1377 <dd class="value">The value of the <span class="fixed">supportContact</span>
1378 for this web site.</dd>
1379 <dd class="attribute"><span class="fixed">logoLocation</span></dd>
1380 <dd class="value">The value of the <span class="fixed">logoLocation</span>
1381 for this web site. This is used to fill in the template error page only;
1382 if a custom error page is created, then the image may be linked to
1383 statically by the page itself.</dd>
1384 <dd class="attribute"><span class="fixed">requestURL</span></dd>
1385 <dd class="value">The user's requested URL.</dd>
1386 <dd class="attribute"><span class="fixed">errorType</span></dd>
1387 <dd class="value">The type of error.</dd>
1388 <dd class="attribute"><span class="fixed">errorText</span></dd>
1389 <dd class="value">The actual error message.</dd>
1390 <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1391 <dd class="value">A textual description of the error intended for human
1393 <dd class="attribute"><span class="fixed">originContactName</span></dd>
1394 <dd class="value">The contact name for the origin site provided by that
1395 site's metadata.</dd>
1396 <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1397 <dd class="value">The contact email address for the origin site provided
1398 by that site's metadata.</dd>
1399 <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1400 <dd class="value">The URL of an error handling page for the origin site
1401 provided by that site's metadata.</dd>
1403 <p>This configuration is only for Apache servers, and is only used by
1404 resources protected by Shibboleth. See <a href="#4.d.">section 4.d.</a></p>
1405 <p>Sample error templates for different kinds of errors are included in the
1406 Shibboleth distribution, and can be triggered by anything that will cause
1407 Shibboleth to be unable to make an authorization decision, including a bad
1408 sites file, certificate verification failures, or a skewed clock between
1410 <p><b>You should edit these templates, provide or remove style sheets and
1411 images, and otherwise customize these templates to suit the user experience
1412 you want your users to have when errors occur. The defaults are not likely
1413 to meet the needs of any site.</b></p>
1415 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1417 <p>The only target component that must have a private key and certificate is
1418 the SHAR. While the target server itself should support SSL in most cases
1419 for users, it is mandatory for the SHAR to authenticate when contacting an
1420 AA, and it must therefore be given a key and an SSL client certificate. It
1421 is permissible for the SHAR to use the same keypair and certificate used by
1422 the target server itself, provided the certificate is signed by a CA
1423 accepted by the community of sites.</p>
1424 <p>The certificate and key file location should be based on whether they
1425 will also be used for Apache. If they will be used as a server certificate
1426 as well, they should probably be in the Apache tree in the usual
1427 <span class="fixed">mod_ssl</span>-defined locations inside the Apache
1428 configuration folder., and the SHAR can read them from there. If the SHAR is
1429 not running as <span class="fixed">root</span>, permissions might need to be
1430 changed to allow this access. If the certificate and key will only be used
1431 for the SHAR, they can be put in the same folder with the
1432 <span class="fixed">shibboleth.ini</span> file and protected appropriately.</p>
1433 <p>Other web servers like IIS do not use the raw PEM format that Apache and
1434 Shibboleth can share, and therefore the components must generally use
1435 separate copies of the key and certificate if they are to be shared. Most
1436 other servers can export and/or import keys to and from PEM format or other
1437 formats that OpenSSL can convert.</p>
1438 <p>The SHAR is assigned a key and a certificate using shibboleth.ini's
1439 <span class="fixed">certFile</span>, <span class="fixed">keyFile</span> and
1440 <span class="fixed">keyPass</span> settings, described in <a href="#4.a.">
1441 section 4.a.</a> These files must currently be in PEM format. OpenSSL
1442 commands to generate a new keypair and a certificate request are shown here,
1443 assuming 2048 bit RSA keys are to be used:</p>
1445 <p><span class="fixed">$ openssl genrsa -des3 -out ssl.key 2048<br>
1446 $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1448 <p>The signed certificate file returned by the CA should be usable directly,
1449 or can be converted to PEM format using the <span class="fixed">openssl x509</span>
1451 <p>If the key is to be shared with Apache, the web server's child processes,
1452 often running as <span class="fixed">nobody</span>, must be able to read
1453 them while the server is running, which may require permission changes.</p>
1454 <p>This particularly applies when sharing the key and certificate used by
1455 mod_ssl, which are only readable by root by default. The password, if any,
1456 must be placed in the <span class="fixed">shibboleth.ini</span> file, since
1457 the Apache module cannot prompt for it during initial startup as mod_ssl
1458 can. The issues surrounding how to securely obtain a key while running as
1459 <span class="fixed">nobody</span> may be addressed in a later release. Since
1460 the password will be stored in clear text in a frequently examined file, it
1461 is suggested to use a password not used elsewhere.</p>
1462 <p>Finally, the <span class="fixed">calist</span> command provides the SHAR
1463 with a set of CA roots to trust when validating AA server certificates. In
1464 all cases, the SHAR verifies that the certificate's Subject CN equals the
1465 AA's hostname, but the CA list restricts the accepted signers to those
1466 permitted by the SHAR. The parameter can be omitted to skip such validation,
1467 but this is not secure.</p>
1469 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1471 <p>Protection of web pages is primarily achieved through "mapping"
1472 attributes provided by an AA to a localized vocabulary for authorization
1473 rules. This was formerly accomplished in Apache with the <span class="fixed">
1474 ShibMapAttribute</span> command, but this has been replaced with additional
1475 features in the AAP syntax, described in <a href="#4.e.">section 4.e.</a>
1476 This applies to both Apache and IIS.</p>
1477 <p><b><u>IIS</u></b></p>
1478 <p>The IIS RM module supports the mapping of attributes via AAP files, but
1479 it does not support rule-based policies and therefore cannot protect static
1480 content at this time. In addition, all of the configuration settings are
1481 managed globally or per-site and are pulled from the <span class="fixed">
1482 shibboleth.ini</span> file, so there are no additional commands to document
1485 <p><b><u>Apache</u></b></p>
1486 <p>The Apache RM module provided can interpret AAP settings to map
1487 attributes to HTTP request headers and to <span class="fixed">Require</span>
1488 rules, permitting protecting of both static and dynamic content. The
1489 commands described here can appear in content-specific configuration blocks
1490 or <span class="fixed">.htaccess</span> files. They determine what content
1491 is to be protected, session policies, and static access control rules.</p>
1492 <p>Any of the typical ways of protecting content may be used (.htaccess,
1493 Directory, Location, Files, etc.). There are two ways to trigger Shibboleth
1494 authentication: specifying an <span class="fixed">AuthType</span> of
1495 <span class="fixed">shibboleth</span> to use Shibboleth directly, or using
1496 <span class="fixed">ShibBasicHijack</span> to process existing .htaccess
1497 files using Shibboleth instead. Support for authorization consists of
1498 mod_auth-style require directives, as well as support for mod_auth group
1500 <p>A complete list of the directives and their values is below:</p>
1502 <dd class="attribute"><span class="fixed">AuthType <string></span></dd>
1503 <dd class="value">Use <span class="fixed">shibboleth</span> for direct
1504 invocation, or <span class="fixed">Basic</span> plus the
1505 <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1506 <dd class="attribute"><span class="fixed">ShibSSLOnly <on/off></span></dd>
1507 <dd class="value">Controls whether Shibboleth will reject non-SSL
1508 requests for resources from clients. Defaults to <span class="fixed">off</span>.</dd>
1509 <dd class="attribute"><span class="fixed">ShibBasicHijack <on/off></span></dd>
1510 <dd class="value">Controls whether Shibboleth should or should not
1511 ignore requests with <span class="fixed">AuthType Basic</span>. Defaults
1512 to <span class="fixed">off</span>.</dd>
1513 <dd class="attribute"><span class="fixed">ShibExportAssertion <on/off></span></dd>
1514 <dd class="value">Controls whether the SAML attribute assertion provided
1515 by the AA is exported in a base64-encoded HTTP header,
1516 <span class="fixed">Shib-Attributes</span>. Defaults to
1517 <span class="fixed">off</span>. While this does require parsing the raw
1518 XML, it also permits an application to see attributes that may have been
1519 filtered by an AAP, or to forward the SAML assertion to a third party.</dd>
1520 <dd class="attribute"><span class="fixed">ShibAuthLifetime <seconds></span></dd>
1521 <dd class="value">If set, sessions are always terminated after the
1522 specified number of seconds, resulting in a new redirect and request for
1523 authentication, just as if a new request without a session is received.
1524 Defaults to infinite.</dd>
1525 <dd class="attribute"><span class="fixed">ShibAuthTimeout <seconds></span></dd>
1526 <dd class="value">If set, sessions are always terminated after the
1527 specified number of seconds of inactivity (defined as no requests
1528 received in that session), resulting in a new redirect and request for
1529 authentication, just as if a new request without a session is received.
1530 Defaults to infinite.</dd>
1531 <dd class="attribute"><span class="fixed">AuthGroupFile <pathname></span></dd>
1532 <dd class="value">Same as mod_auth; collects values found in REMOTE_USER
1533 into a named group for access control. An attribute must be mapped to
1534 REMOTE_USER for this to work. Note that mod_auth will not support group
1535 files when mod_shibrm is loaded, since they share the same command.
1536 <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is
1537 implemented</a> by placing a <span class="fixed">.htaccess</span> file
1538 that references a group file stored at <span class="fixed">/pathname</span>:</p>
1540 <p><span class="fixed">AuthGroupFile /pathname<br>
1541 require group workgroup</span></p>
1544 <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1545 AuthGroupFile</a> used by Shibboleth might resemble:<br>
1546 <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1548 <dd class="attribute"><span class="fixed">Require <string></span></dd>
1549 <dd class="value">Enforce authorization using one of the following
1550 methods.<ul type="circle">
1551 <li><span class="fixed">valid-user</span><blockquote>
1552 <p>Any Shibboleth user from a trusted origin site is accepted,
1553 even if no actual attributes are received. This is a very
1554 minimal kind of policy, but is useful for testing or for
1555 deferring real policy to an application.</p>
1558 <p><span class="fixed">user</span></p>
1560 <p>A space-delimited list of values, such as from the
1561 <span class="fixed">
1562 urn:mace:dir:attribute-def:eduPersonPrincipalName</span>
1563 attribute. Actually, any attribute can be mapped to REMOTE_USER,
1564 even if this doesn't always make sense.</p>
1567 <li><span class="fixed">group</span><blockquote>
1568 <p>A space-delimited list of group names defined within
1569 <span class="fixed">AuthGroupFile</span> files, again provided
1570 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1573 <li><span class="fixed"><alias></span><blockquote>
1574 <p>An arbitrary rule name that matches an Alias defined in an
1575 AAP file. The rule value is a space-delimited list of attribute
1576 values, whose format depends on the attribute in question (e.g.
1577 an affiliation rule might look like:</p>
1578 <p><span class="fixed">require affiliation staff@osu.edu
1579 faculty@mit.edu</span></p>
1583 <p>Additionally, for <span class="fixed">user</span> and
1584 <span class="fixed"><alias></span>-based rules, if a tilde character is
1585 placed immediately following <span class="fixed">user</span> or
1586 <span class="fixed"><alias></span>, the expressions that follow are
1587 treated as regular expressions. The syntax supported is generally based
1588 on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1589 XML Schema</a>. This specification borders on unreadable, but the syntax
1590 is generally Perl-like. Expressions should generally be "anchored" with
1591 the ^ and $ symbols to insure mid-string matches don't cause false
1593 <p>For example, the rule:<br>
1594 <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1595 </span>would evaluate to allowing anyone with an <span class="fixed">
1596 affiliation</span> of <span class="fixed">member</span> from a .edu
1600 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1602 <p>Shibboleth allows a user and a site to release a varying set of
1603 attributes to a destination site, and does not impose restrictions on the
1604 kinds of attribute information provided by an AA. Target implementations
1605 must be prepared to examine the attributes they receive and filter them
1606 based on policies about what information to permit an origin site to assert
1607 about its users.</p>
1608 <p>Attribute acceptance is the process of defining acceptable attributes and
1609 filtering attribute values before passing them on to a resource manager,
1610 such as the <span class="fixed">mod_shibrm</span> module. Data blocked by
1611 AAP filters will not be passed to the CGI environment or used when enforcing
1612 <span class="fixed">.htaccess</span> rules. Note that the attribute
1613 assertion exported to the <span class="fixed">Shib-Attributes</span> header
1615 <p>The Shibboleth implementation supports Scoped and Simple attributes and
1616 filtering policies for different kinds of attributes, and is potentially
1617 extensible to more complex attributes in the future. An attribute is
1618 considered Scoped if the XML representation of its values contains a "Scope"
1619 attribute. As of 1.1, this is detected at runtime and requires no
1620 configuration in advance.</p>
1621 <p><b>An essential part of the Shibboleth trust fabric is ensuring that
1622 sites only assert attributes for domains for which they are considered
1623 authoritative by the target. Typically, this means that Brown University
1624 will be trusted to assert attributes only scoped to <span class="fixed">
1625 brown.edu</span>. Unless there are very specific circumstances requiring
1626 this restriction be removed, it is strongly encouraged that such policies be
1630 <p>Scoped attributes are a special kind of attribute whose values are a
1631 combination of a <span class="fixed">value</span> and a
1632 <span class="fixed">scope</span>, or <span class="fixed">context</span>
1633 for the value. An example is <span class="fixed">
1634 eduPersonScopedAffiliation</span>, which adds a scope to the defined set
1635 of <span class="fixed">eduPersonAffiliation</span> values, such as
1636 <span class="fixed">student</span>, <span class="fixed">member</span>,
1637 or <span class="fixed">faculty</span>. Scopes are expressed as DNS
1638 domains and subdomains.</p>
1639 <p>Any <span class="fixed">scoped</span> attribute can be scoped only to
1640 the origin site's permitted domains. These domains are listed in the
1641 site metadata that provides policy information to the system. Domains
1642 can be explicit or regular expressions, and can be changed by a target
1643 to meet its needs. Targets can also override the rules specified for the
1644 site in their own AAPs, choosing to accept additional scopes or deny scopes
1645 that would ordinarily be accepted based on metadata provided by a federation.
1646 Thus, attribute acceptance processing for <span class="fixed">scoped</span>
1647 attributes is based on site metadata and target-specified overrides
1648 in addition to the mechanism described below for <span class="fixed">
1649 simple</span> attributes.</p>
1650 <p>Scope rules specified in an AAP are additive with any domains permitted
1651 by site metadata, and the rules are applied by first looking for an applicable
1652 denial rule, and then looking at site metadata and any applicable site rules
1653 for an accept rule.</p>
1657 <p>Simple attributes are attributes whose value is expressed in XML as a
1658 Text node; that is, the value is just a string. Multiple values are
1659 permitted. <span class="fixed">eduPersonEntitlement</span>, in which the
1660 values are URIs, is one example of a simple attribute.</p>
1661 <p>Both Simple and Scoped attribute acceptance is controlled with an
1662 external policy file written in XML. The schema for the file is
1663 described by the <span class="fixed">shibboleth.xsd</span> schema, and
1664 an example file is included, <span class="fixed">AAP.xml</span>. It is
1665 mandatory to supply such a file, because attributes are recognized based
1666 on their presence in this file, and not by separate configuration
1667 processes. Only by listing an attribute in the file will it be accepted
1668 and processed by the RM.</p>
1669 <p>The policy is a default-deny algorithm that requires permissible
1670 attributes and values be listed explicitly. That is, an empty file
1671 permits nothing. Each attribute to be supported must be listed in the
1672 file by name in an <span class="fixed"><AttributeRule></span>. Each such
1673 rule is a collection of <span class="fixed"><SiteRule></span> elements
1674 along with an optional <span class="fixed"><AnySite></span> default
1675 rule. In turn each site rule is a set of <span class="fixed"><Value></span>
1676 rules that specify matches to permit, either literal or regular
1677 expressions, or a wildcarded <span class="fixed"><AnyValue></span>
1678 default rule, which is equivalent to a single regular expression rule
1679 allowing anything.</p>
1681 <p>A syntax summary follows:</p>
1683 <p><span class="fixed"><AttributeAcceptancePolicy</span></p>
1685 <p>The top level element in the file.</p>
1687 <p><span class="fixed"><AttributeRule<br>
1688 Name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"<br>
1689 Header="Shib-EP-Affiliation" Alias="affiliation"></span></p>
1691 <p>Specifies a rule for an attribute, named by its URI. The
1692 following XML attributes can be supplied:</p>
1693 <table border="1" cellpadding="5" cellspacing="5">
1695 <td><span class="fixed">Name</span></td>
1696 <td>The name of the Shibboleth attribute, usually a URI.
1697 This is the only required XML attribute.</td>
1700 <td><span class="fixed">Namespace</span></td>
1701 <td>If the attribute's name includes a SAML namespace,
1702 supply it here. Normally this is unused.</td>
1705 <td><span class="fixed">Header</span></td>
1706 <td>The HTTP request header to map the attribute's values
1710 <td><span class="fixed">Alias</span></td>
1711 <td>A short name for the attribute, determines the name of
1712 the Apache <span class="fixed">Requires</span> rule.</td>
1716 <p><span class="fixed"><AnySite></span></p>
1718 <p>Specifies a rule that always applies to the attribute, regardless
1719 of the asserting AA.</p>
1721 <p><span class="fixed"><SiteRule Name="host.domain.com"></span></p>
1723 <p>A rule that applies to the origin site AA corresponding to the
1726 <p><span class="fixed"><Scope Accept="true|false"> Type="type"></span></p>
1728 <p>Specifies a value to accept or deny, either directly using
1729 <span class="fixed">type</span> <span class="fixed">literal</span>,
1730 or using a set of matching expressions as <span class="fixed">type</span>
1731 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1732 is the default if <span class="fixed">Type</span> is not specified.
1733 Accept defaults to "true">.</p>
1735 <p><span class="fixed"><AnyValue></span></p>
1737 <p>Specifies a rule that always applies to the attribute and site,
1738 regardless of the value(s).</p>
1740 <p><span class="fixed"><Value Type="type"></span></p>
1742 <p>Specifies a value to permit, either directly using
1743 <span class="fixed">type</span> <span class="fixed">literal</span>,
1744 or using a set of matching expressions as <span class="fixed">type</span>
1745 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1746 is the default if <span class="fixed">Type</span> is not specified.</p>
1749 <p>The regular expression syntax is a subset of the usual Perl and Unix
1750 syntaxes that is described in the XML Schema specification by the W3C. Most
1751 typical expressions should work. Be sure to anchor them using
1752 <span class="fixed">^</span> and <span class="fixed">$</span> to avoid
1753 unintentional matches midstring.</p>
1755 <h4><a name="4.f."></a>4.f. Using Attributes in Applications</h4>
1757 <p>Apart from the simple RM functionality provided, attribute information
1758 may be made available directly to applications via the standard practice of
1759 creating custom HTTP request headers before passing control to the
1760 application. Applications should make no assumption about the presence of
1761 specific attributes for their use unless they have intimate knowledge of the
1762 attribute release policies in place.</p>
1763 <p>The AAP metadata controls this interface, and maps a Shibboleth attribute
1764 to a header name, such as <span class="fixed">Shib-EP-Affiliation</span>.
1765 Using that example, any values of the mapped attribute will be placed in
1766 that header, delimited by semicolons. An application that uses a CGI-like
1767 syntax to access the header will find the values in the <span class="fixed">
1768 HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any
1769 header, to drive legacy applications that expect information in a particular
1771 <p>The <span class="fixed">REMOTE_USER</span> variable is a special case
1772 that is generally populated automatically by the web server based on an
1773 internal piece of data that represents the current <span class="fixed">
1774 username</span>. Unlike many authentication modules, Shibboleth does not
1775 guarantee that <span class="fixed">REMOTE_USER</span> will have any value,
1776 because users may remain anonymous in many cases. If it does have a value,
1777 it is set solely because of an AAP file that maps an attribute to that
1778 header name. For many purposes, the <span class="fixed">
1779 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be
1780 mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be
1781 provided by the AA, and <span class="fixed">REMOTE_USER</span> might still
1783 <p>The <span class="fixed">Shib-Origin-Site</span> variable will contain the
1784 unique name/identifier of the origin site of the user. Some applications may
1785 use this to lookup additional policy or application data. It normally takes
1786 the form of a URI but could be any string in some deployments.</p>
1787 <p>Finally, configuration may instruct the web server to place the entire
1788 XML message containing the SAML attribute information from the AA into a
1789 base64-encoded header called <span class="fixed">Shib-Attributes</span>.
1790 This is a raw interface that provides an application with the entire AA
1791 response, and is not a filtered view based on any attribute acceptance rules
1792 or even based on what attributes are recognized by the target. What was sent
1793 is what you see.</p>
1795 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
1797 <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span>
1798 in the <span class="fixed">/opt/shibboleth/bin</span> folder of the
1799 distribution to maintain metadata files referenced by <span class="fixed">
1800 shibboleth.ini</span>. It will return 0 on success and a negative number on
1801 failure and log errors to <span class="fixed">stderr</span>. If the data in
1802 the new metadata file is bad or the signature is invalid, the existing copy
1803 is kept. The SHAR and SHIRE stat all metadata files each time the data is
1804 used, allowing them to detect and utilize updates in real-time operation.</p>
1805 <p><span class="fixed">siterefresh</span> takes the following command-line
1808 <dd class="attribute"><span class="fixed">--url <URL></span> </dd>
1809 <dd class="value">Specifies the <span class="fixed">URL</span> of the
1810 remote metadata file with which to update the local file.</dd>
1811 <dd class="attribute"><span class="fixed">--out <pathname></span> </dd>
1812 <dd class="value">Specifies the local file to which to write the new
1814 <dd class="attributeopt"><span class="fixed">--cert <pathname></span>
1816 <dd class="valueopt">Specifies the location of a certificate stored in
1817 <span class="fixed">PEM</span> format used to validate the signature of
1818 the metadata file. Since much of Shibboleth's security flows from
1819 metadata files, this option is highly recommended, and the certificate
1820 used should be verified independently.</dd>
1821 <dd class="attributeopt"><span class="fixed">--schema <pathname></span>
1823 <dd class="valueopt">Optionally defines a base path for schemas to use
1824 when validating the file. Defaults to <span class="fixed">
1825 /opt/shibboleth/etc/shibboleth/</span>.</dd>
1827 <p>A complete command issued to <span class="fixed">siterefresh</span> might
1830 <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out sites.xml
1831 --cert internet2.pem \<br>
1832 --url http://wayf.internet2.edu/InQueue/sites.xml </span></p>
1834 <p>It is recommended that similar commands be added to a <span class="fixed">
1835 crontab</span> to keep the site and trust files refreshed. AAP files tend to
1836 be site-specific, but could be maintained and distributed centrally. If the
1837 command is invoked in a script that writes the file to a new location and
1838 compares it with the old contents before overwriting the original, the
1839 command could be run very often without impacting target operations,
1840 providing a high degree of currency in case sites become compromised.</p>
1842 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
1844 <p>Shibboleth includes a useful plugin that extends the default memory cache
1845 for storing session data in the SHAR with a backing cache using an embedded
1846 MySQL database. In most distributions, it is enabled by default. The plugin
1847 can be found in the <span class="fixed">/opt/shibboleth/libexec</span>
1848 folder, and is loaded as an extension library using the <span class="fixed">
1849 [extensions:saml]</span> section of <span class="fixed">shibboleth.ini</span>.
1850 The following configuration options are available:</p>
1852 <dd class="attributeopt"><span class="fixed">mysql-cache-timeout =
1853 <seconds> (in [shar] section)</span></dd>
1854 <dd class="valueopt">Specifies the duration in <span class="fixed">
1855 seconds</span> that must elapse between user accesses before that user's
1856 session is purged from the persistent cache. Defaults to
1857 <span class="fixed">28800</span> seconds, or 8 hours. This should
1858 generally be longer than the associated server's settings for session
1859 lifetime and timeout, and the memory cache's timeout.</dd>
1860 <dd class="attributeopt"><span class="fixed"><MySQL Arguments>
1861 (one per line in [mysql] section)</span></dd>
1862 <dd class="valueopt">To pass arguments to the MySQL engine, create
1863 argument lines in the <span class="fixed">[mysql]</span> section in the
1865 <blockquote class="fixed">
1866 <p>arg1=<argument><br>
1867 arg2=<argument><br>
1870 <p>Important arguments you'll find by default include: </p>
1871 <blockquote class="fixed">
1872 <p>arg1 = --language=/opt/shibboleth/share/english<br>
1873 arg2 = --datadir=/opt/shibboleth/data</p>
1875 <p>which set the message file path and the location of the cache's
1876 database files respectively. Make sure the data directory exists before
1877 starting the SHAR if you change this path.</dd>
1883 <h3><a name="5."></a>5. Troubleshooting</h3>
1884 <p>This section provides basic information about testing Shibboleth targets.
1885 This information is not intended to be comprehensive, but instead rudimentary
1886 guidelines for basic configuration tests and problems. For more detailed
1887 information or answers to specific problems not addressed in this section,
1888 please mail <a href="mailto:mace-shib-users@internet2.edu">
1889 mace-shib-users@internet2.edu</a> with a thorough description of errors and
1890 configurations used.</p>
1891 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
1893 <p>The target may be tested by generating a folder with very basic access
1894 controls on it, and accessing it using a web browser. Place a simple webpage
1895 such as <span class="fixed">index.html</span> in <span class="fixed">
1896 /secure/</span>. Then, add the following lines to <span class="fixed">
1897 httpd.conf</span>, which should be removed when testing is over:</p>
1899 <p><span class="fixed"># Configure a test directory<br>
1900 <Location /secure><br>
1901 AuthType shibboleth<br>
1902 require valid-user<br>
1904 # Per-directory SHIRE Configuration<br>
1905 #ShibBasicHijack On<br>
1906 #ShibSSLOnly On<br>
1907 #ShibAuthLifetime 60<br>
1908 #ShibAuthTimeout 600<br>
1910 # RM Configuration<br>
1911 #AuthGroupFile /foo<br>
1912 #ShibExportAssertion On<br>
1913 </Location><br>
1916 <p><b>For information regarding specific error messages that may be
1917 generated if the target does not work successfully, please refer to section
1918 <a href="#5.b.">5.b.</a>, or write
1919 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.</b></p>
1921 <h4><a name="5.b."></a>5.b. Common Problems</h4>
1923 <p>A knowledge base is being developed in the
1924 <a href="http://www.columbia.edu/~wassa/shib.faq/shibboleth-faq.html">
1925 Shibboleth Deployer's FAQ</a>. Please mail
1926 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>
1927 with any additional questions or problems encountered that
1928 are not answered by this basic guide.</p>