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