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