1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 <title>Shibboleth Target Deployment Guide</title>
6 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
7 <style type="text/css">
11 background-color: #FFFFFF;
29 font-family: monospace;
32 text-decoration: none;
36 font-family: monospace;
39 text-decoration: none;
43 font-family: monospace;
46 text-decoration: none;
50 border-width:2px; background-color: #DDDDDD;
51 background-image: url('none');
58 background-color: #DDDDDD;
59 background-image: url('none');
65 background-color: #DDDDDD;
66 background-image: url('none');
75 background-color: #DDDDDD;
76 border: 1px inset black;
77 background-image: url('none');
85 background-color: #EEEEEE;
86 background-image: url('none');
88 padding-bottom: 0.5em;
91 border-bottom-width: none;
92 border-top-width: none;
93 border-left-width: 1px;
94 border-right-width: 1px; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-style:solid
99 background-color: #FFCCFF;
103 background-color: #EEEEEE;
108 font-family: monospace;
120 <body link="red" vlink="red" alink="black" bgcolor="white">
123 <h2>Shibboleth Target Deployment Guide</h2>
125 <p>Shibboleth Target Deployment Guide<br>
126 Shibboleth Version 1.2<br />
128 <h3>This version of the deploy guide is for Shibboleth v1.2. For documentation
129 related to prior versions of Shibboleth, please consult the appropriate branch
130 in the Shibboleth CVS.</h3>
131 <h3>The default configuration of Shibboleth is <b>not</b> secure and should not be
132 used for protection of production content. The example private key bundled with the
133 distribution is publically available, widely circulated, and well-known; also, the
134 default federation and trust metadata is for testing purposes only. For information
135 about securing a Shibboleth deployment, please refer to the production guide.
136 Shibboleth should only be used to protect sensitive content when deployed carefully
137 in conjunction with proper trust settings and policies.</h3>
139 <p>The Shibboleth target implementation has been substantially redesigned for this release. Most of the
140 configuration process has changed to accomodate more complex deployments but many of the defaults work
141 fine for testing and simpler applications. Among the new features:</p>
143 <li>New XML-based configuration system supporting runtime adjustment of many settings and better
144 integration with supplemental configuration files</li>
145 <li>Ability to partition deployment into "Applications" at the vhost, path, or document level</li>
146 <li>"Lazy" sessions allow applications to redirect browser to initiate a session, allows
147 content to decide it needs authentication or attributes at runtime</li>
148 <li>Flexible support for multilateral and bilateral trust arrangements</li>
149 <li>Support for more types of key and certificate formats</li>
150 <li>Improved pluggability for many aspects of system, including access control modules</li>
153 <p>Before starting, please sign up for all applicable
154 <a href="http://shibboleth.internet2.edu/shib-misc.html#mailinglist">mailing
155 lists</a>. Announcements pertinent to Shibboleth deployments and developments
156 and resources for deployment assistance can be found here.</p>
157 <p>Please send any questions, concerns, or eventual confusion to
158 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>.
159 This should include, but not be limited to, questions about the documentation,
160 undocumented problems, installation or operational issues, and anything else
168 <h3><a name="TOC"></a>Shibboleth Target -- Table of Contents</h3>
171 <h4><a href="#1."><font color="black">Shibboleth Overview</font></a></h4>
173 <li><a href="#1.a."><font color="black">Origin</font></a></li>
174 <li><a href="#1.b."><font color="black">Target</font></a></li>
175 <li><a href="#1.c."><font color="black">WAYF</font></a></li>
176 <li><a href="#1.d."><font color="black">Federations</font></a></li>
177 <li><a href="#1.e."><font color="black">Relying Parties</font></a></li>
178 <li><a href="#1.f."><font color="black">Applications</font></a></li>
179 <li><a href="#1.g."><font color="black">Sessions</font></a></li>
183 <h4><a href="#2."><font color="black">Planning</font></a></h4>
185 <li><a href="#2.a."><font color="black">Requirements</font></a></li>
186 <li><a href="#2.b."><font color="black">Join a Federation</font></a></li>
187 <li><a href="#2.c."><font color="black">Security Considerations</font></a></li>
188 <li><a href="#2.d."><font color="black">Server Certificates</font></a></li>
189 <li><a href="#2.e."><font color="black">Attribute Release Policies</font></a></li>
190 <li><a href="#2.f."><font color="#000000">Attribute Acceptance Policies</font></a></li>
191 <li><a href="#2.g."><font color="black">Browser Requirements</font></a></li>
192 <li><a href="#2.h."><font color="black">Clocks</font></a></li>
193 <li><a href="#2.i."><font color="black">Other Considerations</font></a></li>
197 <h4><a href="#3."><font color="black">Installation</font></a></h4>
199 <li><a href="#3.a."><font color="black">Software Requirements</font></a></li>
200 <li><a href="#3.b."><font color="black">Deploy the Shibboleth Package</font></a></li>
201 <li><a href="#3.c."><font color="black">Configuring Apache 1.3.x</font></a></li>
202 <li><a href="#3.d."><font color="black">Configuring IIS</font></a></li>
203 <li><a href="#3.e."><font color="black">Running the SHAR on Windows</font></a></li>
207 <h4><a href="#4."><font color="black">Getting Running</font></a></h4>
209 <li><a href="#4.a."><font color="black">Configuring <span class="fixed">
210 shibboleth.xml</span></font></a></li>
211 <li><a href="#4.b."><font color="black">Dynamic Error Page Generation</font></a></li>
212 <li><a href="#4.c."><font color="black">Key Generation and Certificate
213 Installation</font></a></li>
214 <li><a href="#4.d."><font color="black">Protecting Web Pages</font></a></li>
215 <li><a href="#4.e."><font color="black">Defining Attributes and
216 Acceptance Policies</font></a></li>
217 <li><a href="#4.f."><font color="black">Using Attributes in Applications</font></a></li>
218 <li><a href="#4.g."><font color="black"><span class="fixed">siterefresh</span></font></a></li>
219 <li><a href="#4.h."><font color="black">MySQL Session Cache</font></a></li>
223 <h4><a href="#5."><font color="black">Troubleshooting</font></a></h4>
225 <li><a href="#5.a."><font color="black">Basic Testing</font></a></li>
226 <li><a href="#5.b."><font color="black">Common Problems</font></a></li>
235 <h3><a name="1."></a>1. Shibboleth Overview</h3>
236 <p>Shibboleth is a system designed to exchange attributes across realms for the
237 primary purpose of authorization. It provides a secure framework for one
238 organization to transmit attributes about a web-browsing individual across
239 security domains to another institution. In the primary usage case, when a user
240 attempts to access a resource at a remote domain, the user's own home security
241 domain can send certain information about that user to the target site in a
242 trusted exchange. These attributes can then be used by the resource to help
243 determine whether to grant the user access to the resource. The user may have
244 the ability to decide whether to release specific attributes to certain sites by
245 specifying personal Attribute Release Policies (ARP's), effectively preserving
246 privacy while still granting access based on trusted information.</p>
247 <p>When a user first tries to access a resource protected by Shibboleth, they
248 are redirected to a service which asks the user to specify the organization from
249 which they want to authenticate. If the user has not yet locally authenticated
250 to a WebISO service, the user will then be redirected to their home
251 institution's authentication system. After the user authenticates, the
252 Shibboleth components at the local institution will generate a temporary
253 reference to the user, known as a handle, for the individual and send this to
254 the target site. The target site can then use the handle to ask for attributes
255 about this individual. Based on these attributes, the target can decide whether
256 or not to grant access to the resource. The user may then be allowed to access
257 the requested materials.</p>
258 <p>There are several controls on privacy in Shibboleth, and mechanisms are
259 provided to allow users to determine exactly which information about them is
260 released. A user's actual identity isn't necessary for many access control
261 decisions, so privacy often is needlessly compromised. Instead, the resource
262 often utilizes other attributes such as faculty member or member of a certain
263 class. While these are commonly determined using the identity of the user,
264 Shibboleth provides a way to mutually refer to the same principal without
265 revealing that principal's identity. Because the user is initially known to the
266 target site only by a randomly generated temporary handle, if sufficient, the
267 target site might know no more about the user than that the user is a member of
268 the origin organization. This handle should never be used to decide whether or
269 not to grant access, and is intended only as a temporary reference for
270 requesting attributes.</p>
271 <h4><a name="1.a."></a>1.a. Origin</h4>
273 <p>There are four primary components to the origin side in Shibboleth: the
274 Attribute Authority (AA), the Handle Service (HS), the directory service,
275 and the local sign-on system (SSO). The AA and HS are provided with
276 Shibboleth, and an open-source WebISO solution Pubcookie is also supplied;
277 the directory is provided by the origin site. Shibboleth is able to
278 interface with a directory exporting an LDAP interface or a SQL database
279 containing user attributes, and is designed such that programming interfaces
280 to other repositories should be readily implemented. Shibboleth relies on
281 standard web server mechanisms to trigger local authentication. A .htaccess
282 file can be easily used to trigger either the local WebISO system or the web
283 server's own Basic Auth mechanism, which will likely utilize an enterprise
284 authentication system, such as Kerberos.</p>
285 <p>From the origin site's point of view, the first contact will be the
286 redirection of a user to the handle service, which will then consult the SSO
287 system to determine whether the user has already been authenticated. If not,
288 then the browser user will be asked to authenticate, and then sent back to
289 the target URL with a handle bundled in an attribute assertion. Next, a
290 request from the Shibboleth Attribute Requester (SHAR) will arrive at the AA
291 which will include the previously mentioned handle. The AA then consults the
292 ARP's for the directory entry corresponding to the handle, queries the
293 directory for these attributes, and releases to the SHAR all attributes the
294 SHAR is entitled to know about that user.</p>
296 <h4><a name="1.b."></a>1.b. Target</h4>
298 <p>There are three primary components to the target side in Shibboleth: the
299 Shibboleth Indexical Reference Establisher (SHIRE), the Shibboleth Attribute
300 Requester (SHAR), and the resource manager (RM). An implementation of each
301 of these is included in the standard Shibboleth distribution. These
302 components are intended to run on the same web server.</p>
303 <p>From the target's point of view, a browser will hit the RM with a request
304 for a Shibboleth-protected resource. The RM then allows the SHIRE to step
305 in, which will use the WAYF to acquire the name of a handle service to ask
306 about the user. The handle service (HS) will then reply with a SAML
307 authentication assertion containing a handle, which the SHIRE then hands off
308 to the SHAR. The SHAR uses the handle and the supplied address of the
309 corresponding attribute authority (AA) to request all attributes it is
310 allowed to know about the handle. The SHAR performs some basic validation
311 and analysis based on attribute acceptance policies (AAP's). These
312 attributes are then handed off to the RM, which is responsible for using
313 these attributes to decide whether to grant access.</p>
315 <h4><a name="1.c."></a>1.c. Where are you from? (WAYF)</h4>
317 <p>The WAYF service can be either outsourced and operated by a federation or
318 deployed as part of the SHIRE. It is responsible for allowing a user to
319 associate themself with an institution of their specification, then
320 redirecting the user to the known address for the handle service of that
323 <h4><a name="1.d."></a>1.d. Federations</h4>
325 <p>A federation is one way to provide part of the underlying trust required
326 for function of the Shibboleth architecture. A federation in the context of
327 Shibboleth is a group of organizations(universities, corporations, content
328 providers, etc.) who agree to exchange attributes using the SAML/Shibboleth
329 protocols and abide by a common set of policies and practices. In so doing,
330 they must implicitly or explicitly agree to a common set of guidelines.
331 Joining a federation is not explicitly necessary for operation of
332 Shibboleth, but it dramatically expands the number of targets and origins
333 that can interact without defining bilateral agreements between all these
335 <p>A federation can be created in a variety of formats and trust models, but
336 to support Shibboleth, it must provide a certain set of services to
337 federation members. It needs to supply a registry to process applications to
338 the federation and distribute membership information to the origin and
339 target sites. This must include distribution of the PKI components necessary
340 for trust between origins and targets. There also needs to be a set of
341 agreements and best practices defined by the federation governing the
342 exchange, use, and population of attributes before and after transit, and
343 there should be a way to find information on local authentication and
344 authorization practices for federation members.</p>
346 <h4><a name="1.e."></a>1.e. Relying Parties</h4>
348 <p>Some aspects of both origin and target configuration can vary and be
349 expressed in terms of the "relying party". To an origin, a target
350 is a relying party, while targets consider origins to be relying
351 parties (it's a matter of perspective). Certificates, policies, and
352 other aspects of an interaction are specified on the basis of the relying
353 party, and may or may not vary between relying parties depending on the
354 deployment's needs.</p>
355 <p>Each origin and target is assigned a URI, a unique identifier to enable
356 control over configuration down to the level of an individual partner (a single
357 relying party). By convention, this is termed a "providerId". More
358 frequently, an entire federation will be viewed by an origin or target as a
359 single relying party to simplify management. An individual origin or target
360 with which this deployment exchanges information may sometimes be part of
361 multiple relying parties if there are multiple trust agreements
362 under which these transactions are performed. Care should be taken to avoid
363 conflicting or inconsistent configuration in such cases.</p>
365 <h4><a name="1.f."></a>1.f. Applications</h4>
367 <p>Shibboleth "applications" are the primary unit of target
368 configuration. Applications as viewed by the target implementation
369 are not necessarily defined by the same metrics as in other contexts. An
370 individual application represents a set of web resources that operates
371 using the same attribute handling and trust configuration and shares a common
372 <a href="#1.g.">session</a> with the browser user. As a user navigates between
373 resources on a server that cross an application boundary, a new session is
374 established, though user interaction may not be required. As a consequence of
375 the relationship between applications and sessions (which are tracked with
376 a cookie), an application usually does not span more than one virtual host.
377 Apart from cookie-based constraints, web resources can be aggregated into
378 applications in arbitrary ways.</p>
379 <p>A single target deployment may support a large number of applications,
380 but it need not register or publish information about each one with the
381 origins it accepts information from. Instead it can communicate using a
382 more limited set of distinct "providerId" values (often just a
383 single one). This allows targets with a complex internal configuration
384 to be treated as a single entity by origins for the purposes of attribute
387 <h4><a name="1.g."></a>1.g. Sessions</h4>
389 <p>Much of the target implementation is concerned with establishing, and
390 subsequently maintaining, sessions with the browser user on behalf of the
391 <a href="#1.f.">applications</a> at the target. A session consists of a
392 cookie passed between the browser and web server, associated with a
393 security context. The context contains the user's authentication information,
394 and generally a set of attributes that make up the user's identity. Each
395 application maintains distinct sessions with the browser by means of separate
396 cookies. It is important to note that all such sessions are independent and
397 distinct: any session can exist with or without any other session, and the
398 expiration of any one session does not imply the expiration of any other
399 session. Shibboleth also does not support any logout functionality beyond the
400 termination of individual application sessions by deletion of respective
401 cookies; also, there is no way for the target to cause origin-side sessions,
402 such as a user's SSO login, to expire.</p>
403 <p>A browser user accessing a Shibboleth-protected resource may have two
404 outcomes: standard session establishment, and lazy session
405 establishment. The standard session establishment mechanism in which
406 Shibboleth protects the resource in all circumstances results in the
407 establishment of a cookie-based browser session and a set of attributes
408 cached for that application. Shibboleth 1.2 also supports so-called lazy
409 session establishment, in which the resource may be accessed without prior
410 authentication. This means the application must be intelligent enough to
411 determine whether authentication is necessary, and then construct the proper URL
412 to initiate a browser redirect to request authentication; if the
413 application determines none is necessary or uses other authorization
414 mechanisms, then the request for authentication may not need to be triggered.
415 This complex functionality is mostly useful to protect a single URL with
416 different access mechanisms, or to require authenticated access only in
417 instances where the application deems it necessary.</p>
418 <p>Independently of this, a web-based application protected by Shibboleth
419 may have a need to establish its own session with the user. This session
420 may persist well beyond the Shibboleth session, and logouts from this
421 session, if supported, will not terminate a Shibboleth session initiated to
422 access the resource. Application administrators should carefully evaluate
423 the expiration of all sessions to limit vulnerability to attacks or user
424 negligence. Logging out of the entire desktop session is usually the
425 only (relatively) foolproof logout mechanism on the web.</p>
428 <h3><a name="2."></a>2. Planning</h3>
429 <p>There are several essential elements that must be present in the environment
430 to ensure Shibboleth functions well, both political and technical. Shibboleth is
431 entirely written in Java on the origin side. These are the recommendations and
432 requirements for a successful implementation of a Shibboleth origin.</p>
433 <h4><a name="2.a."></a>2.a. Requirements</h4>
435 <li>A common institutional directory service should be operational;
436 Shibboleth comes with LDAP and SQL capabilities built in, and the Attribute
437 Authority has a Java API which will allow specification of interfaces with
438 legacy directories. This is discussed further in <a href="#4.d.">section 4.d</a>.</li>
439 <li>A method to authenticate browser users must be in place, preferably in
440 the form of an enterprise authentication service. Some form of an SSO or a
441 WebISO service is not explicitly necessary for Shibboleth; however, it is
442 highly recommended. Implementation details of this are discussed in
443 <a href="#4.c.">section 4.c</a>.</li>
444 <li>Shibboleth is known to work on Windows, Linux, and Solaris, but should
445 function on any platform that has a Tomcat implementation.</li>
446 <li>A Java servlet container; Shibboleth has been tested extensively with
448 <li>It is recommended that a web server such as Apache be deployed in front
449 of Tomcat to provide authentication services and to control the flow of
450 requests to Tomcat. There may be issues surrounding the number of maximum
451 connections to the web server and to the servlet container.</li>
453 <h4><a name="2.b."></a>2.b. Join a Federation</h4>
455 <p>While it is not necessary for a target or origin to join a federation,
456 doing so greatly facilitates the implementation of multilateral trust
457 relationships. Each federation will have a different application process.
458 When an origin is accepted into a federation, its information is added to
459 the sites file used by the WAYF and target sites.</p>
460 <p>Attribute release and acceptance policies, the use and caching of
461 attributes, and definition of commonly traded attributes are examples of
462 specifications a federation may make. <b>The default configuration that
463 ships with Shibboleth is intended for use in testing against a <span
464 class="fixed">localhost</span> target. In order to interoperate with other
465 relying parties, such as a federation, consult the steps provided by the
466 guidelines of that relying party.</b></p>
468 <h4><a name="2.c."></a>2.c. Security Considerations</h4>
470 <p>Shibboleth's protocols and software have been extensively engineered to
471 provide protection against many attacks. However, the most secure protocol
472 can be compromised if it is placed in an insecure environment. To ensure
473 Shibboleth is as secure as possible, there are several recommended security
474 precautions which should be in place at local sites.</p>
476 <li>SSL use is optional for origin sites. 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. Proper security measures should also be in place
496 on directory access and population(see
497 <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/#AccessControl">
498 Access Control</a> in the
499 <a href="http://www.georgetown.edu/giia/internet2/ldap-recipe/">LDAP
500 recipe</a> for more information). Use of plaintext passwords is strongly
501 advised against.</li>
502 <li>Server platforms should be properly secured, commensurate with the
503 level that would be expected for a campus' other security services, and
504 cookie stores on client machines should be well protected.</li>
507 <h4><a name="2.d."></a>2.d. Server Certs</h4>
509 <p>In the Shibboleth architecture, the origin and target must each have
510 various client and/or server certificates for use in signing assertions and
511 creating SSL channels. These should be issued by a commonly accepted CA,
512 which may be stipulated by some Federation rules. Different federations may
513 require the use of different CA's.</p>
515 <h4><a name="2.e."></a>2.e. Attribute Release Policies</h4>
517 <p>The Attribute Authority maintains a set of policies called Attribute
518 Release Policies (or ARP's) that govern the sharing of user attributes with
519 Shibboleth target sites. When a user attempts to access a
520 Shibboleth-protected resource, that resource's SHAR queries the user's AA
521 for all attributes to which it is entitled. The SHAR provides its own name
522 and the URI of the requesting application. The
523 AA finds the attributes associated with the browser user, determines an
524 "Effective ARP" for this user, and then sends to the SHAR only the
525 attribute-value pairs allowed in this policy.</p>
526 <p>An ARP may be thought of as a sort of filter for outbound attributes; it
527 cannot create attributes or data that aren't originally present, but it can
528 limit the attributes released and the values those attributes may have when
529 released. It does not change the information in the data sources in any way.</p>
530 <p>Each ARP is comprised of one or more rules that specify which attributes
531 and values may be released to a given application and that SHAR. The
532 assignment of rules to various targets is quite flexible and includes
533 mechanisms for specifying: that a rule should affect all targets (default
534 rule), exact SHAR names for which a rule is applicable, regular expressions
535 against which SHAR names should be matched to determine if a rule is
536 applicable, and individual applications that may span hosts and URL's as
538 <p>For each request, an Effective ARP is determined by locating all ARP's
539 applicable to the designated user and extracting each rule that matches the
540 querying SHAR and resource. Attributes and values that are specified for
541 release are included in the effective ARP, while those specified for denial
542 are blocked from release. See section <a href="#5.b.i.">5.b.i</a> for
543 details on how ARP's are processed.</p>
544 <p>Various ARP's may be combined in forming the Effective ARP. For instance,
545 the Site ARP is administratively maintained and applies to all users for
546 which the AA is answerable. User ARP's apply to a specific user only, and
547 can be maintained either administratively or by the users themselves. All
548 ARP's are specified using the same syntax and semantics.</p>
550 <h4><a name="2.f."></a>2.f. Designate Contacts</h4>
552 <p>Since Shibboleth deals both with daily technical and operational issues
553 and also with contractual issues, a set of contacts should be set up to
554 support the user base and to facilitate interactions with other Shibboleth
555 sites and federation members. It is recommended that at least technical and
556 administrative contacts be designated. These contacts are then supplied to
557 the federation and optionally to relying parties individually to facilitate
558 communications and troubleshooting.</p>
560 <h4><a name="2.g."></a>2.g. Browser Requirements</h4>
562 <p>A primary Shibboleth design consideration was to require very little or
563 no modification to client machines. The only requirement is that a browser
564 is used which supports cookies, redirection and SSL. Browser users will have
565 to perform an additional click to submit the authentication assertion if
566 JavaScript is not functional.</p>
568 <h4><a name="2.h."></a>2.h. Clocks</h4>
570 <p><a href="http://www.ntp.org/">NTP</a> should be run on all
571 web servers. Shibboleth employs a short handle issuance time to protect
572 against replay attacks. Because of this, any significant degree of clock
573 skew can hinder the ability of users to access sites successfully.</p>
575 <h4><a name="2.i."></a>2.i. Other Considerations</h4>
577 <p>Especially for higher education, there are a handful of laws enacted
578 which may have important ramifications on the disclosure of personal
579 information and attributes. Since Shibboleth does not necessarily need to
580 transmit identity, it is an ideal solution for many higher education
581 situations. Nevertheless, all parties within the United States of America
582 are strongly advised to consult the
583 <a href="http://www.ed.gov/offices/OM/fpco/ferpa/">Family Educational Rights
584 and Privacy Act of 1974(FERPA)</a>, and all other relevant state and federal
585 legislation before deploying Shibboleth.</p>
588 <h3><a name="3."></a>3. Installation</h3>
589 <h4><a name="3.a."></a>3.a. Software Requirements</h4>
590 <p>The Shibboleth project makes binary packages available only for Windows,
591 that are precompiled against recent releases of various required libraries such
592 as OpenSSL. Binaries for other platforms may be available on a limited or ad hoc
593 basis. It is highly advisable to build from source when using Shibboleth in
594 a production environment in order to permit patching or updating of packages as
595 security holes and bugs are fixed. Building from source is necessary to give you
596 complete control over your deployment platform. The binary packages represent a
597 snapshot in time only. To build from source, see the <span class="fixed">
598 INSTALL.txt</span> files in the doc folder of the OpenSAML and Shibboleth source
600 <p>The software requirements listed correspond to the binary distribution. In
601 general, source builds should work against all recent versions of the operating
602 systems and software dependencies listed below. For specific questions, inquire
603 to the support mailing list, or give it a try. Note that OpenSSL releases
604 frequent security updates; the version listed may not be the most current, but
605 most minor "letter" updates should be usable.</p>
607 <p><b>General Requirements and Notes:</b></p>
609 <li><a href="http://www.apache.org/dist/httpd/">Apache 1.3.x</a>
611 <p>Apache 1.3.x must be compiled with mod_so for DSO module support, and
612 should include SSL support (preferably using <span class="fixed">mod_ssl</span>),
613 and EAPI support (which <span class="fixed">mod_ssl</span> requires and provides).</p>
614 <p><b>Portions of the <span class="fixed">libphp4</span> Apache
615 module are written in C++, as is Shibboleth. There is a known
616 conflict between the PHP extensions <span class="fixed">libpspell.so</span>
617 and <span class="fixed">libsablot.so</span> which will manifest
618 itself as segmentation faults when starting Apache. If a site wants
619 to use <span class="fixed">libphp4.so</span> and Shibboleth at the same time,
620 then one of the following may be done:</b>
622 <li>Remove the options <span class="fixed">--with-pspell</span>
623 and <span class="fixed">--with-xslt-sablot</span> from PHP's
625 <li>Rebuild these two modules using the same version of GCC that
626 was used to compile Shibboleth.</li>
630 <li><a href="http://www.apache.org/dist/httpd/">Apache 2.0.x</a>
632 <p>Apache 2.0.x must be compiled with mod_so for DSO module support, and
633 should include SSL support which is available but not included by default.
634 See also the note about PHP above.</p>
639 <p>When installing under Windows 2003, if the server is not in a
640 domain before installing IIS 6, there may be issues surrounding
641 permissions on directories because of new restrictions on IIS
642 extensions accessing files.</p>
645 <li><a href="http://www.openssl.org">OpenSSL</a>
647 <p>Verions 0.9.6 and 0.9.7 are both supported, but 0.9.7 should be used
648 if possible, as support for 0.9.6 may be dropped in a future release.
649 Support for threads and shared libraries <b>must</b> be included during
650 configuration using the <i>threads</i> and <i>shared</i> options.</p>
653 <p>Most other required libraries are either easy to update or not found
654 on typical systems. See the <span class="fixed">INSTALL.txt</span> files
655 in the OpenSAML and Shibboleth source distributions for specific requirements
656 of a given release. The important requirements are for pthreads support and
657 shared libraries on Unix platforms. Without both, building will be hard and
658 stability unlikely.</p>
660 <p><b>Operating System Specific Notes:</b></p>
662 <li>Windows NT/2000/XP/2003
665 <p>Any Apache modules used, and Apache itself, must be compiled
666 with the Microsoft DLL-based runtime, selected by compiling with
670 <p>The installer will prompt for an install path, change default
671 configuration files as appropriate for Windows, and set various
672 environment variables for you. A default SHAR service can also
673 be installed, or you can install it manually using the
674 instructions in this guide.</p>
675 <p>Note that debug/symbol versions of the libraries and software
676 are included, and may be used by appending "debug" to the
677 Shibboleth library path and using the corresponding modules and
678 binaries. If you do so, be aware that Apache and other modules
679 must also be compiled with Microsoft's debug runtime (via the /MDd
680 compiler option). In most cases, you can safely ignore or even
681 delete the debug versions.</p>
685 <li>RedHat Linux 7.2,7.3:
688 <p>The most recent Red Hat RPM (1.3.27-2 as of this writing) is sufficient for
689 use with Shibboleth. You can use the older version of OpenSSL included, for this
690 release, but be advised this may change in the future.</p>
693 <p>The version of GCC that comes with this system is too old to build Shibboleth.
694 Special update RPMs are available for GCC 3.04 that will work provided you
695 configure packages with CC and CXX set to gcc3 and g++3 respectively. Newer
696 GCC versions also work but may require a glibc upgrade and necessitate a lot
697 of unrelated package updates.</p>
701 <li>RedHat Linux 9 / Fedora
704 <p>Apache 2.0 is included as the default version in this release.</p>
708 <li>RedHat Enterprise Linux
711 <p>Apache 2.0 is included as the default version in this release.</p>
718 <p>Shibboleth requires that Apache and Apache-SSL be built with
719 <span class="fixed">libpthread</span>, or loading the
720 <span class="fixed">mod_shib_13</span> or <span class="fixed">mod_shib_20</span>
721 modules will cause Apache to fail. While RedHat's Apache is compatible,
722 Debian's Apache must be rebuilt with <span class="fixed">libpthread</span>:</p>
724 <p><span class="fixed">$ export LDFLAGS=-lpthread<br>
725 $ apt-build --rebuild --reinstall install \<br>
726 apache-common apache apache-ssl</span></p>
734 <p>The shared library version of OpenSSL is required by
735 Shibboleth. The static libraries may be installed as well if
736 necessary for other applications, but cannot be used within
737 mod_ssl or any other Apache modules. If mod_ssl's libssl.so
738 module is linked against the static version, bus errors will
740 <p>To check how mod_ssl was built, run the <span class="fixed">
741 ldd</span> command against <span class="fixed">libssl.so</span>
742 in the Apache <span class="fixed">libexec/</span> folder and
743 check the output for references to <span class="fixed">
744 libssl.so.0.9.7</span>. If you see an earlier version
745 mentioned, or no mention of it at all, then OpenSSL 0.9.7 must be
746 built with shared libraries from source, and the Apache module rebuilt with it.</p>
747 <p>openssl-0.9.7d, the latest security fix release, has been tested,
748 but any 0.9.7 version should work.</p>
751 <p>Solaris does not come with GCC 3, but various versions can be obtained
752 from <a href="http://www.sunfreeware.com">http://www.sunfreeware.com</a>.
753 If building your own, GCC must be configured to use Sun's linker. Note that
754 you should use a consistent version of GCC across any other C++ libraries
755 in use within Apache, but other C++ code can freely use a different version
756 as long as the necessary <span class="fixed">libstdc++.so</span> for a given
757 version is available</p>
760 <p>Use of GCC is recommended, but new releases of Sun's Forte compiler have
761 been used successfully with some tinkering with configuration scripts.</p>
767 <h4><a name="3.b."></a>3.b. Deploy the Shibboleth Package</h4>
769 <p>For the sake of clarity, this deployment guide assumes that standard
770 directories are used for all installations. These directories may be changed
771 for local implementations, but must be done so consistently.</p>
772 <p>On Unix, the build documentation suggests building into
773 <span class="fixed">/opt/shibboleth</span>. If you use a different layout or
774 location, most of the essential configuration files will be tweaked for you,
775 but watch for any exceptions.</p>
776 <p>On Windows, use of the installer is recommended. Visual Studio 6.0
777 project files are included with the OpenSAML and Shibboleth source
778 distributions for source builds if maximum flexibility to deal with
779 security issues is desired.</p>
781 <h4><a name="3.c."></a>3.c. Configure Apache</h4>
784 <li>Shibboleth includes configuration directives in the files
785 <span class="fixed">/opt/shibboleth/etc/shibboleth/apache.config</span>
786 and <span class="fixed">/opt/shibboleth/etc/shibboleth/apache2.config</span>
787 which must be added to the <span class="fixed">httpd.conf</span> file used
788 locally. It is recommended that these directives simply be added to the end of the
789 existing <span class="fixed">httpd.conf</span> file rather than trying
790 to merge it in-line; <a href="#3.c.2.">step 2</a> describes the
791 necessary modifications to the Apache startup script. The default
792 configuration will often work, but if customization is necessary, these
793 options may be modified:<dl>
794 <dd class="attribute"><span class="fixed">LoadModule <module> <pathname></span></dd>
795 <dd class="value">Specifies the name and location of the module,
796 installed by default at <span class="fixed">/opt/shibboleth/libexec/mod_shib_13.so</span>
797 or <span class="fixed">/opt/shibboleth/libexec/mod_shib_20.so</span></dd>
799 <dd class="attribute"><span class="fixed">ShibConfig <pathname></span></dd>
800 <dd class="value">Specifies the <span class="fixed">pathname</span>
801 of the Shibboleth configuration file. Defaults to <span class="fixed">
802 /opt/shibboleth/etc/shibboleth/shibboleth.xml</span>.</dd>
804 <dd class="attribute"><span class="fixed">ShibSchemaDir <path></span></dd>
805 <dd class="value">Specifies the <span class="fixed">path</span>
806 of the Shibboleth schema folder. Defaults to <span class="fixed">
807 /opt/shibboleth/etc/shibboleth</span>.</dd>
809 <dd class="attribute"><span class="fixed"><Location <i>url</i>><br>
810 SetHandler <method><br>
811 </Location></span></dd>
812 <dd class="value"><p>(Apache 1.3 only) Specifies the relative <span class="fixed">path</span>
813 and the <span class="fixed">handler</span> the target uses to process
814 incoming sessions and lazy session startup for Shibboleth-protected
815 resources. This works in concert with the <span class="fixed">shireURL</span>
816 settings in the XML configuration file. Any virtual locations that are to be
817 used for this purpose should be defined to Apache here.</p></dd>
820 <li>If the OpenSSL libraries are not in the system's search path, they
821 should be added to the <span class="fixed">LD_LIBRARY_PATH</span> used by
822 Apache. Generally libtool's linker options will insure that the modules
823 can locate the Shibboleth libraries, but if not, you may need to add
824 <span class="fixed">/opt/shibboleth/lib</span> to <span class="fixed">
825 LD_LIBRARY_PATH</span> as well.</li>
826 <li>The SHAR must be started along with Apache. Among other methods on
827 Unix, this can be done either by creating a separate SHAR startup script
828 or by modifying Apache's RC script to start/stop the <span class="fixed">
829 SHAR</span> <b>before</b> <span class="fixed">httpd</span>. It is
830 suggested that Apache's script be modified by adding:<blockquote>
831 <p><span class="fixed">/opt/shibboleth/bin/shar -f &</span> </p>
833 <p>In most cases, the build process insures that the SHAR can locate
834 the configuration file and schemas, but the SHIBCONFIG and SHIBSCHEMAS
835 environment variables may be used as well. Command line options can also
836 be used to specify them.</p>
837 <p>On Windows, the SHAR is a service and is managed separately.</li>
838 <li>By default, the Shibboleth modules are configured to log information
839 on behalf of Apache to the file <span class="fixed">
840 /opt/shibboleth/var/log/shibboleth/shire.log</span>, though this can be
841 changed by modifying the <span class="fixed">.logger</span> files
842 pointed to by <a href="#4.a.">configuration elements</a>. For this log
843 to be created, Apache must have permission to write to this file, which
844 may require that the file be manually created and permissions assigned
845 to whatever user Apache is configured to run under. If the file does not
846 appear when Apache runs with the modules loaded, check for permission
848 <li>The options in <span class="fixed">shibboleth.xml</span> must be
849 configured as documented in <a href="#4.a.">4.a</a>. Apache content may
850 then need to be modified for Shibboleth authentication. This is
851 discussed in <a href="#4.d.">4.d</a>. It is recommended that the target
852 then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
855 <h4><a name="3.d."></a>3.d. Configure Microsoft IIS</h4>
858 <li>The package includes an ISAPI filter and bundled extension for
859 session processing in a single library, <span class="fixed">libexec\isapi_shib.dll</span>.
860 This filter is configured using commands in <span class="fixed">
861 C:\opt\shibboleth\etc\shibboleth\shibboleth.xml</span> (or wherever you've
862 installed the software). Make sure you or the installer has added the lib
863 directory to the path as directed in <a href="#3.b.">section 3.b.</a>
864 <p>Installing the extension into IIS is a two step process:
866 <li type="a">First, add the filter using the Internet Services
867 Manager MMC console. Right click on the machine icon on the left,
868 and edit the WWW Service master properties. On the "ISAPI Filters"
869 tab, add a new filter called Shibboleth and specify the DLL named
870 above. The priority should be High, and once the filter is loaded,
871 make sure it appears in the list <b>below</b> the "sspifilt" entry.
872 Restart IIS and make sure the filter shows up with a green arrow.
873 Check the Windows event log if it fails to load.</li>
874 <li type="a">Secondly, map a special file extension, such as
875 <span class="fixed">.shire</span>, to the ISAPI library so that
876 virtual URLs can be specified to invoke the SHIRE handler for each
877 web site. Right click on the machine icon on the left, and edit the
878 WWW Service master properties. On the "Home Directory" tab, add a
879 script mapping using the "Configuration" button. The "Executable"
880 box should point to <span class="fixed">isapi_shib.dll</span>, and the
881 "Extension" can be set to anything unlikely to conflict, but
882 <span class="fixed">.shire</span> is assumed (and the dot must be
883 included). You should NOT select the option to limit verbs, and
884 you MUST uncheck the "Check that file exists" box.</li>
885 <li type="a"><font color=#444499>(IIS 6 Only)</font> A new Web
886 Service Extension must be defined for Shibboleth; without this, the
887 mapping from <span class="fixed">*.shire</span> to <span
888 class="fixed">isapi_shib.dll</span> won't occur and a file error
889 will appear Add this extension with an arbitrary name and associate
890 it with <span class="fixed">isapi_shib.dll</span>.</li>
893 <li>All other aspects of configuration are handled via the
894 <span class="fixed">shibboleth.xml</span> file and associated XML
895 files described in subsequent sections. Particular use is made of
896 the <span class="fixed">/SHIRE/Implementation/ISAPI</span> element that allows the
897 IIS sites to be mapped to fully-qualified hostnames for proper request mapping.</li>
898 <li>Instance IDs are used in the IIS metabase to identify web sites. In older versions,
899 they are applied starting with 1(one) and number the web sites in order in the
900 Internet Services Manager from top to bottom. Newer versions appear to assign
901 some IID values with strange ASCII formulas applied to the site name. A simple
902 ASP or CGI script can be run within a site to dump the INSTANCE_ID header.</li>
903 <li>See the following section for information on running the SHAR
904 service on Windows.</li>
905 <li>The options in <span class="fixed">shibboleth.xml</span> must be
906 configured as documented in <a href="#4.a.">4.a</a>. It is recommended
907 that the target then be tested as detailed in section <a href="#5.a.">5.a</a>.</li>
910 <h4><a name="3.e."></a>3.e. Running the SHAR on Windows</h4>
912 <p>The SHAR is a console application that is primarily designed to be
913 installed as a Windows service. To run the process in console mode for
914 testing or to diagnose major problems, the <span class="fixed">-console</span>
915 parameter is used. Otherwise, parameters are used to install (or remove) the SHAR from the
916 service database and subsequent control is via the Service Control Manager
917 applet. The following command line parameters can be used:</p>
919 <dd class="attribute"><span class="fixed">-console</span></dd>
920 <dd class="value">Allows the process to be started from a command
921 prompt. Since the console will exit if the desktop user logs out, this
922 is not suitable for production use, but may be useful for testing.</dd>
923 <dd class="attribute"><span class="fixed">-check</span></dd>
924 <dd class="value">Validates the general correctness of the configuration.
925 Not all problems can be detected this way, but the chance of successful startup
926 is high if the checking process does not log any errors.</dd>
927 <dd class="attribute"><span class="fixed">-config <pathname></span> </dd>
928 <dd class="value">Specifies the pathname of the SHAR's configuration
929 file. Defaults to <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>
930 or the value of the <span class="fixed">SHIBCONFIG</span> environment
931 variable, if it is set.</dd>
932 <dd class="attribute"><span class="fixed">-schemadir <path></span> </dd>
933 <dd class="value">Specifies the path to the XML schema files. Defaults to
934 <span class="fixed">\opt\shibboleth\etc\shibboleth</span> or the value of the
935 <span class="fixed">SHIBSCHEMAS</span> environment variable, if it is set.</dd>
936 <dd class="attribute"><span class="fixed">-install <servicename></span></dd>
937 <dd class="value">Installs the SHAR as a named service in the Windows
938 service database. A name should be provided if multiple instances of the
939 SHAR need to be run on different ports, and thus installed separately.
940 The <span class="fixed">-config</span> option can be provided to include
941 a specific configuration file on the service's command line.</dd>
942 <dd class="attribute"><span class="fixed">-remove <servicename></span></dd>
943 <dd class="value">Removes the named service instance of the SHAR from
944 the Windows service database.</dd>
950 <h3><a name="4."></a>4. Getting Running</h3>
951 <h4><a name="4.a."></a>4.a. Configuring <span class="fixed">shibboleth.xml</span></h4>
953 <p>The configuration for the target is mostly contained within <span class="fixed">shibboleth.xml</span>, located by default at <span class="fixed">\opt\shibboleth\etc\shibboleth\shibboleth.xml</span>. The target comes pre-configured with certificates and settings that will work against a test origin running on the same server; however, there are several values that must later be changed to interoperate with other sites securely and effectively.</p><p>The following is a hyperlinked version of a basic configuration file, followed by a list of elements and attributes that must be modified. The actual example shipped with Shibboleth includes many more options that are commented out and other elements necessary to support test functionality. Click on any attribute or element for more information on its population and definition.</p>
955 <blockquote><span class="fixed">
956 <a class="fixedlink" href="#confShibbolethTargetConfig"><ShibbolethTargetConfig xmlns="urn:mace:shibboleth:target:config:1.0"
957 <br> logger="/opt/shibboleth/etc/shibboleth/shibboleth.logger" clockSkew="180"></a>
959 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
960 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/shibboleth/libexec/xmlproviders.so" fatal="true"/></a>
961 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
963 <br> <a class="fixedlink" href="#confSHAR"><SHAR logger="/opt/shibboleth/etc/shibboleth/shar.logger"></a>
965 <br> <a class="fixedlink" href="#confExtensions"><Extensions></a>
966 <br> <a class="fixedlink" href="#confLibrary"><Library path="/opt/shibboleth/libexec/shib-mysql-ccache.so" fatal="false"/></a>
967 <br> <a class="fixedlink" href="#confExtensions"></Extensions></a>
968 <br>
969 <br> <a class="fixedlink" href="#confUnixListener"><UnixListener address="/tmp/shar-socket"/></a>
971 <br> <!-- Primarily for IIS Deployments:
972 <br> <a class="fixedlink" href="#confTCPListener"><TCPListener address="127.0.0.1" port="12345" acl="127.0.0.1"/></a>
973 <br> -->
974 <br>
975 <br> <a class="fixedlink" href="#confMemorySessionCache"><MemorySessionCache cleanupInterval="300" cacheTimeout="3600" AATimeout="30" AAConnectTimeout="15"
976 <br> defaultLifetime="1800" retryInterval="300" strictValidity="true" propagateErrors="true"/></a>
977 <br>
978 <br> <a class="fixedlink" href="#confSHAR"></SHAR></a>
979 <br>
980 <br> <a class="fixedlink" href="#confSHIRE"><SHIRE logger="/opt/shibboleth/etc/shibboleth/shire.logger"></a>
982 <br> <a class="fixedlink" href="#confRequestMapProvider"><RequestMapProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"></a>
983 <br> <a class="fixedlink" href="#confRequestMap"><RequestMap applicationId="default"></a>
984 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="https"></a>
985 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
986 <br> <a class="fixedlink" href="#confHost"></Host></a>
987 <br> <a class="fixedlink" href="#confHost"><Host name="localhost" scheme="http"></a>
988 <br> <a class="fixedlink" href="#confPath"><Path name="secure" requireSession="true" exportAssertion="true"/></a>
989 <br> <a class="fixedlink" href="#confHost"></Host></a>
990 <br> <a class="fixedlink" href="#confRequestMap"></RequestMap></a>
991 <br> <a class="fixedlink" href="#confRequestMapProvider"></RequestMapProvider></a>
992 <br> <!-- IIS only:
993 <br> <a class="fixedlink" href="#confImplementation"><Implementation></a>
994 <br> <a class="fixedlink" href="#confISAPI"><ISAPI normalizeRequest="true"></a>
995 <br> <a class="fixedlink" href="#confSite"><Site id="1" host="localhost"/></a>
996 <br> <a class="fixedlink" href="#confISAPI"></ISAPI></a>
997 <br> <a class="fixedlink" href="#confImplementation"></Implementation></a>
998 <br> -->
999 <br> <a class="fixedlink" href="#confSHIRE"></SHIRE></a>
1001 <br> <a class="fixedlink" href="#confApplications"><Applications xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion"
1002 <br> applicationId="default" providerId="https://localhost/shibboleth/target"></a>
1003 <br> <a class="fixedlink" href="#confSessions"><Sessions lifetime="7200" timeout="3600" checkAddress="true"
1004 <br> shireURL="/Shibboleth.shire" shireSSL="false" cookieName="_shibsession_default" cookieProps="; path=/"
1005 <br> wayfURL="https://wayf.internet2.edu/InQueue/WAYF"/></a>
1007 <br> <a class="fixedlink" href="#confErrors"><Errors shire="/opt/shibboleth/etc/shibboleth/shireError.html"
1008 <br> rm="/opt/shibboleth/etc/shibboleth/rmError.html"
1009 <br> access="/opt/shibboleth/etc/shibboleth/accessError.html"
1010 <br> supportContact="root@localhost"
1011 <br> logoLocation="/shibtarget/logo.jpg"
1012 <br> styleSheet="/shibtarget/main.css"/></a>
1014 <br> <a class="fixedlink" href="#confPolicy"><Policy signRequest="false" signedResponse="false" signedAssertions="false"></a>
1015 <br> <!--
1016 <br> <a class="fixedlink" href="#confAttributeDesignator"><AttributeDesignator AttributeName="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"
1017 <br> AttributeNamespace="urn:mace:shibboleth:1.0:attributeNamespace:uri"/></a>
1018 <br> -->
1020 <br> <a class="fixedlink" href="#confAAPProvider"><AAPProvider type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP" uri="/opt/shibboleth/etc/shibboleth/AAP.xml"/></a>
1022 <br> <a class="fixedlink" href="#confFederationProvider"><FederationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"
1023 <br> uri="/opt/shibboleth/etc/shibboleth/sites.xml"/></a>
1025 <br> <a class="fixedlink" href="#confTrustProvider"><TrustProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"
1026 <br> uri="/opt/shibboleth/etc/shibboleth/trust.xml"/></a>
1028 <br> <!--
1029 <br> <a class="fixedlink" href="#confRevocationProvider"><RevocationProvider type="edu.internet2.middleware.shibboleth.common.provider.XMLRevocation"
1030 <br> uri="/opt/shibboleth/etc/shibboleth/trust.xml"/></a>
1031 <br> -->
1033 <br> <a class="fixedlink" href="confAudience"><saml:Audience>urn:mace:inqueue</saml:Audience></a>
1034 <br> <a class="fixedlink" href="#confPolicy"></Policy></a>
1036 <br> <a class="fixedlink" href="#confCredentialUse"><CredentialUse TLS="defcreds" Signing="defcreds"></a>
1037 <br> <a class="fixedlink" href="#confRelyingParty"><RelyingParty Name="urn:mace:inqueue" TLS="inqueuecreds" Signing="inqueuecreds"/></a>
1038 <br> <a class="fixedlink" href="#confCredentialUse"></CredentialUse></a>
1040 <br> <a class="fixedlink" href="#confApplications"></Applications></a>
1042 <br> <a class="fixedlink" href="#confCredentialsProvider"><CredentialsProvider type="edu.internet2.middleware.shibboleth.common.Credentials"></a>
1043 <br> <a class="fixedlink" href="#confCredentials"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></a>
1044 <br> <a class="fixedlink" href="#confFileResolver"><FileResolver Id="defcreds"></a>
1045 <br> <a class="fixedlink" href="#confKey"><Key format="PEM"></a>
1046 <br> <a class="fixedlink" href="#confPath"><Path>/opt/shibboleth/etc/shibboleth/shar.key</Path></a>
1047 <br> <a class="fixedlink" href="#confKey"></Key></a>
1048 <br> <a class="fixedlink" href="#confCertificate"><Certificate format="PEM"></a>
1049 <br> <a class="fixedlink" href="#confPath"><Path>/opt/shibboleth/etc/shibboleth/shar.crt</Path></a>
1050 <br> <a class="fixedlink" href="#confCertificate"></Certificate></a>
1051 <br> <a class="fixedlink" href="#confFileResolver"></FileResolver></a>
1052 <br> <a class="fixedlink" href="#confCredentials"></Credentials></a>
1053 <br> <a class="fixedlink" href="#confCredentialsProvider"></CredentialsProvider></a>
1055 <br><a class="fixedlink" href="#confShibbolethTargetConfig"></ShibbolethTargetConfig></a>
1057 </span></blockquote>
1059 <p>The following changes must be made to the default configuration before the target will interoperate in a federation.</p>
1062 <p>The main <a href="#confApplications"><span class="fixed">Applications</span></a> element's <span class="fixed">providerId</span> attribute must be changed to reflect the URI this target will use to identify itself to origins by default. This will often be approved or supplied by a federation.</p>
1065 <p>The <span class="fixed">supportContact</span> and error templates for the target found in the <a href="#confErrors"><span class="fixed">Errors</span></a> element should be changed to ensure that users have a proper support mechanism.</p>
1068 <p>Proper credentials for this target signed by an authority that the federation recognizes must be referenced by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element. The default configuration points at flat files with widely-available, insecure keys and certificates. Note that keys are supported in a variety of formats: DER, PEM, encrypted PEM, PKCS8, and encrypted PKCS8.</p>
1071 <p><a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a> and
1072 <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a> elements must be added or
1073 changed as needed to reflect the arrangements required. This information is often provided by
1074 federations to their members.</p>
1078 <p>For Apache (but not IIS), there is also information that must be
1079 configured in <span class="fixed">/usr/local/apache/conf/httpd.conf</span>
1080 (or equivalent); for more information, refer to <a href="#3.c.2.">3.c</a>.</p>
1081 <p>Information in the logging configuration files referenced by
1082 <span class="fixed">shibboleth.xml</span> may require additional changes to
1083 meet local needs. The logging level can be raised to <span class="fixed">
1084 DEBUG</span> if extremely detailed information is needed for testing.
1085 It is recommended that after initial installation is
1086 completed, the log level in both files be left at either <span class="fixed">
1087 INFO</span> or <span class="fixed">WARN</span>.</p>
1088 <p>All elements are optional unless otherwise specified. All attributes of an element are optional unless designated <span class="mandatory">mandatory</span> by a purple background.</p>
1090 <dd class="attribute"><a name="confAAPProvider"><span class="fixed"><AAPProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.target.provider.XMLAAP"</span> uri="<i>pathname</i>"/></span></dd>
1091 <dd class="value">This element is used to specify individual attribute acceptance policies that will apply to this application and may appear zero or more times within the <a href="#confPolicy"><span class="fixed">Policy</span></a> element. For information about these policies and their format, refer to <a href="#4.e.">section 4.e</a>.
1092 <p>The default set of AAP providers can be overridden within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements.</p></dd>
1094 <dd class="attribute"><a name="confApplication"><span class="fixed"><Application <span class="mandatory">id="<i>identifier</i>"</span> providerId="<i>identifier</i>"></span></dd>
1095 <dd class="value">Individual applications that require different attributes, session settings, policies, etc. can be differentiated from the default configuration as specified in the <a href="#confApplications"><span class="fixed">Applications</span></a> element, which contains this element. It must contain a <a href="#confSessions"><span class="fixed">Sessions</span></a> element, but overriding the default <a href="#confErrors"><span class="fixed">Errors</span></a>, <a href="#confPolicy"><span class="fixed">Policy</span></a>, and <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> elements is optional.
1097 <li class="mandatory"><span class="fixed">id</span>: This attribute defines an internal identifier allowing individual <span class="fixed">applicationId</span> attributes as part of <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a> elements to point to this <span class="fixed">Application</span> to handle requests.</li>
1098 <li><span class="fixed">providerId</span>: Distinct from the internal identifier, the <span class="fixed">providerId</span> is the unique identifier that will be used when communicating with origin sites to request authentication or attributes. This value is referenced by origins when creating rules for the release of attributes to targets and will often provided to federations to facilitate transactions. If none is specified, the default <a href="#confApplications><span class="fixed">Applications</span></a> element's <span class="fixed">providerId</span> applies.</li>
1101 <dd class="attribute"><a name="confApplications"><span class="fixed"><Applications id="<i>default</i>" <span class="mandatory">providerId="<i>identifier</i>"</span>></span></dd>
1102 <dd class="value">The <span class="fixed">Applications</span> element must appear once and contains default settings for requests handled by the target whose applicable request mapping using matching <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a> elements has no declared <span class="fixed">applicationId</span> attribute. These values are also used as defaults if individual <a href="#confApplication"><span class="fixed">Application</span></a> elements do not specify some settings. It must contain at least one each of the <a href="#confSessions"><span class="fixed">Sessions</span></a>, <a href="#confErrors"><span class="fixed">Errors</span></a>, <a href="#confPolicy"><span class="fixed">Policy</span></a>, and <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> elements, and may contain individual <a href="#confApplication"><span class="fixed">Application</span></a> elements. Contained by the main <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element.
1104 <li><span class="fixed">id</span>: This attribute has a fixed value of "default" and should not be changed.</li>
1105 <li class="mandatory"><span class="fixed">providerId</span>: Distinct from the internal identifier, the <span class="fixed">providerId</span> is the unique identifier that will be used when communicating with origin sites to request authentication or attributes. This value is referenced by origins when creating rules for the release of attributes to targets and will often provided to federations to facilitate transactions.</li>
1108 <dd class="attribute"><a name="confArgument"><span class="fixed"><Argument><i>value</i></Argument></span></dd>
1109 <dd class="value">The <span class="fixed">Argument</span> element is used in the <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to specify one or more arguments to pass to the MySQL database engine.</dd>
1111 <dd class="attribute"><a name="confAttributeDesignator"><span class="fixed"><saml:AttributeDesignator <span class="mandatory">AttributeName="<i>name</i>" AttributeNamespace="<i>namespace</i>"</span>></span></dd>
1112 <dd class="value">The <span class="fixed">AttributeDesignator</span> element is used in the <a href="#confPolicy"><span class="fixed">Policy</span></a> element to name an attribute to specifically request from origins on behalf of an application. If none are specified, the application will be given anything the origin allows it to see.
1114 <li class="mandatory"><span class="fixed">AttributeName</span>: Specifies the name of a SAML attribute, generally a URI.</li>
1115 <li class="mandatory"><span class="fixed">AttributeNamespace</span>: Specifies the attribute's SAML namespace, which Shibboleth by convention sets to "urn:mace:shibboleth:1.0:attributeNamespace:uri".</li>
1117 <p>The default set of designators can be overridden within individual <a href="#confApplication"><span class="fixed">Application</span></a> elements, but if defaults are specified, it isn't possible to "remove" them and revert to none.</p>
1120 <dd class="attribute"><a name="confAudience"><span class="fixed"><saml:Audience><i>value</i></saml:Audience></span></dd>
1121 <dd class="value">The <span class="fixed">Audience</span> element is used in the <a href="#confPolicy"><span class="fixed">Policy</span></a> element to specify one or more SAML audience URIs to treat as valid while processing assertions. A target application always includes its own <span class="fixed">providerId</span> as an audience value.
1122 <p>Within an <a href="#confApplication"><span class="fixed">Application</span></a> element, this setting is not inherited from the <a href="#confApplications"><span class="fixed">Applications</span></a> element. All values desired must be specified.</p></dd>
1124 <dd class="attribute"><a name="confCAPath"><span class="fixed"><CAPath><i>pathname</i></CAPath></span></dd>
1125 <dd class="value">Paired with a <a href="#confPath"><span class="fixed">Path</span></a> element and contained by a <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, this element allows for the specification of additional certificates in the chain up to the trust anchor. As many <span class="fixed">CAPath</span> elements as necessary to complete the chain may be specified. May be needed if the relying party does not possess the entire CA chain already.</dd>
1127 <dd class="attribute"><a name="confCertificate"><span class="fixed"><Certificate format="<i>type</i>"></span></dd>
1128 <dd class="value">This specifies the certificate corresponding to this set of credentials. The certificate itself must be referred to using a <a href="#confPath"><span class="fixed">Path</span></a> element contained by this element. If this certificate isn't self-signed or signed by a root familiar to the relying party, the files of certificates in the path to the root may be specified using one or more <a href="#confPath"><span class="fixed">CAPath</span></a> elements. Valid encodings are <span class="fixed">PEM</span>, <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>. It resides within the <a href="#confFileResolver"><span class="fixed">FileResolver</span> element and must be paired with the corresponding private key using the <a href="#confKey"><span class="fixed">Key</span></a> element.</dd>
1130 <dd class="attribute"><a name="confCredentials"><span class="fixed"><Credentials xmlns="urn:mace:shibboleth:credentials:1.0"></span></dd>
1131 <dd class="value">This element is the container for credentials used by the XML-based credentials provider with type "edu.internet2.middleware.shibboleth.common.Credentials". These credentials are used by the target to authenticate itself in SSL sessions or sign attribute requests, depending on configuration. It must contain one or more <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> elements.</dd>
1133 <dd class="attribute"><a name="confCredentialsProvider"><span class="fixed"><CredentialsProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.Credentials"</span>></span></dd>
1134 <dd class="value">This element is the container for providers of credentials used by the target and is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element. The supplied provider of type "edu.internet2.middleware.shibboleth.common.Credentials" must contain one <a href="#confCredentials"><span class="fixed">Credentials</span></a> element detailing the individual credentials to be used by the target. Other provider types might require different content.</dd>
1136 <dd class="attribute"><a name="confCredentialUse"><span class="fixed"><CredentialUse <span class="mandatory">TLS="<i>string</i>" Signing="<i>string</i>"</span>></span></dd>
1137 <dd class="value">Required in the <a href="#confApplications"><span class="fixed">Applications</span></a> element or used in <a href="#confApplication"><span class="fixed">Application</span></a> elements to override the defaults, this specifies the credentials used by the target for signing and TLS/SSL. The <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attribute values reference the identifiers of credential resolvers defined in <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements. May also contain <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements that specify the credentials to use for specific origins or federations.</dd>
1139 <dd class="attribute"><a name="confErrors"><span class="fixed"><Errors <span class="mandatory">shire="<i>pathname</i>" rm="<i>pathname</i>" access="<i>pathname</i>"</span> supportContact="<i>e-mail</i>" logoLocation="<i>URL</i>"/></span></dd>
1140 <dd class="value">Shibboleth is capable of displaying customized error pages based on templates and special resources provided by additional attributes in this element. These should all be customized to fit the requirements of the target application. For more information on configuration of error page generation, please see <a href="#4.b.">section 4.b</a>.
1142 <li class="mandatory"><span class="fixed">shire</span>: Specifies the location of the template for the error page generated when there is an error re-directing the user to the WAYF or processing a new session sign-on.</li>
1143 <li class="mandatory"><span class="fixed">rm</span>: Specifies the location of the template for the error page generated if internal errors occur when supplying attributes to the application.</li>
1144 <li class="mandatory"><span class="fixed">accessError</span>: Specifies the location of the template for the page displayed to users when access to a protected resource is denied based on access control. This is distinct from when errors occur during the evaluation process itself, and indicates a denial of authorization.</li>
1145 <li><span class="fixed">supportContact</span>: Specifies a support e-mail address for the user to contact.</li>
1146 <li><span class="fixed">logoLocation</span>: Specifies the location of the logo used in the generation of error pages. This logo can be in any format that the web browser will understand, and should be a URL (absolute or relative) that will return a valid logo.</li>
1148 The last two attributes are examples of tags that can be inserted at runtime into the templates. Arbitrary attributes may be specified in this element simply by adding them; no additional configuration is necessary. If there is a matching ShibMLP tag in the error page template as designed in <a href="#4.b.">4.b</a>, Shibboleth will insert the value of that attribute.
1151 <dd class="attribute"><a name="confExtensions"><span class="fixed"><Extensions></span></dd>
1152 <dd class="value">Extension libraries for one of the Shibboleth components or the entire target can be specified using this element depending on where it's present. It may be contained by any of the <a href="#confSHAR"><span class="fixed">SHAR</span></a>, <a href="#confSHIRE"><span class="fixed">SHIRE</span></a>, or <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> elements. It should always contain one or more <a href="#confLibrary"><span class="fixed">Library</span></a> elements.</dd>
1154 <dd class="attribute"><a name="confFederationProvider"><span class="fixed"><FederationProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.provider.XMLMetadata"</span> uri="<i>pathname</i>"></span></dd>
1155 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to operational metadata either inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.
1156 <p>If an <a href="#confApplication"><span class="fixed">Application</span></a> does not include any <span class="fixed">FederationProvider</span> elements, the default set is used.</p>
1159 <dd class="attribute"><a name="confFileResolver"><span class="fixed"><FileResolver <span class="mandatory">Id="<i>string</i>"</span>></span></dd>
1160 <dd class="value">This element defines the files used to store a private key, certificate, and certificate authorities and associates the set with an identifier. Contained by the <a href="#confCredentials"><span class="fixed">Credentials</span></a> element. <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> and <a href="#confRelyingParty"><span class="fixed">RelyingParty</span></a> elements will refer to these identifiers in their <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attributes, allowing different credentials to be used for different applications and relying parties. It must contain one <a href="#confKey"><span class="fixed">Key</span></a> element and should contain one <a href="#confCertificate"><span class="fixed">Certificate</span></a> element.</dd>
1162 <dd class="attribute"><a name="confHost"><span class="fixed"><Host scheme="<i>protocol</i>" <span class="mandatory">name="<i>fqdn</i>"</span> port="<i>integer</i>" applicationId="<i>id</i>" requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"></span></dd>
1163 <dd class="value">Individual (real or virtual) hosts that this target protects are enumerated by <span class="fixed">Host</span> elements in the <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element. If a request is processed by Shibboleth for a URL on this host, these parameters will be applied to it. If there are <a href="#confPath"><span class="fixed">Path</span></a> elements within this element that match the URL and contain the <span class="fixed">applicationId</span>, <span class="fixed">requireSession</span>, or <span class="fixed">exportAssertion</span> attributes, they will override those in this element; similarly, the ones within this element will override those in the containing <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element.
1165 <li><span class="fixed">scheme</span>: This specifies the protocol on which this host responds. Valid choices are <span class="fixed">http</span>, <span class="fixed">https</span>, <span class="fixed">ftp</span>, <span class="fixed">ldap</span>, and <span class="fixed">ldaps</span>.</li>
1166 <li class="mandatory"><span class="fixed">name</span>: This is the fully-qualified domain name of the host. This appended to the <span class="fixed">scheme</span> must match what is contained in the URL for the element's settings to apply to the request.</li>
1167 <li><span class="fixed">port</span>: This is the port the host is listening on, if not the standard port for the scheme.</li>
1168 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish an authenticated session with the user before handing off the request to the web server or application. If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span> (the default), applications are responsible for ensuring that a session exists if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> for protected content without a full understanding of the implications.</li>
1169 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute assertion received from the origin is exported to a CGI request header called <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1172 <dd class="attribute"><a name="confImplementation"><span class="fixed"><Implementation></span></dd>
1173 <dd class="value">A container element placed inside the <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element, the contents of this element will vary depending on the web server or environment that this Shibboleth deployment serves. Multiple configurations may be specified, but only one per implementation type. This element may contain the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element. <!-- NOT IMPLEMENTED: and <a href="#confNSAPI"><span class="fixed">NSAPI</span></a>, <a href="#confJava"><span class="fixed">Java</span></a> -->.</dd>
1175 <dd class="attribute"><a name="confISAPI"><span class="fixed"><ISAPI normalizeRequest="<i>true/false</i>"></span></dd>
1176 <dd class="value">The configuration information for Shibboleth targets deployed on Microsoft IIS is stored inside this container element. This element must contain one or more <a href="#confSite"><span class="fixed">Site</span></a> elements, each of which maps an INSTANCE ID value to a hostname. If <span class="fixed">normalizeRequest</span> is <span class="fixed">true</span> (the default), all redirects and computed request URLs generated by Shibboleth will be created using the hostname assigned to the site instance handling the request. If <span class="fixed">false</span>, the browser's supplied URL is sometimes used to compute the information. Contained by the <a href="#confImplementation"><span class="fixed">Implementation</span></a> element.</dd>
1178 <dd class="attribute"><a name="confKey"><span class="fixed"><Key format="<i>type</i>"></span></dd>
1179 <dd class="value">This specifies the file containing a private key to be used by a set of credentials. Valid encodings are <span class="fixed">PEM</span> (the default), <span class="fixed">DER</span>, and <span class="fixed">PKCS12</span>. Keys are supported in a variety of formats: DER, PEM, encrypted PEM, and encrypted PKCS12. It resides within the <a href="#confFileResolver"><span class="fixed">FileResolver</span></a> element, should be paired with a <a href="#confCertificate"><span class="fixed">Certificate</span></a> element, and contain a <a href="#confPath"><span class="fixed">Path</span></a> element.</dd>
1181 <dd class="attribute"><a name="confLibrary"><span class="fixed"><Library <span class="mandatory">path="<i>pathname</i>"</span> fatal="<i>true/false</i>"/></span></dd>
1182 <dd class="value">This element defines an extension library for one of Shibboleth's components when specified within an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.
1183 <ul><li class="mandatory"><span class="fixed">path</span>: This designates the complete pathname to where the library is.</li>
1184 <li><span class="fixed">fatal</span>: If set to <span class="fixed">true</span> and the library is not located or fails to load properly, the target will not start. The default is false.</li>
1187 <dd class="attribute"><a name="confListener"><span class="fixed"><Listener <span class="mandatory">type="<i>string</i>"</span>></span></dd>
1188 <dd class="value">Specifies a pluggable implementation of a mechanism for communication between the web server and SHAR, specified in the <span class="fixed">type</span> attribute. This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> elements.</dd>
1190 <dd class="attribute"><a name="confMemorySessionCache"><span class="fixed"><MemorySessionCache AAConnectTimeout="<i>seconds</i>" AATimeout="<i>seconds</i>" cacheTimeout="<i>seconds</i>" cleanupInterval="<i>seconds</i>" defaultLifetime="<i>seconds</i>" propagateErrors="<i>true/false</i>" retryInterval="<i>seconds</i>" strictValidity="<i>true/false</i>"/></span></dd>
1191 <dd class="value">Shibboleth will cache sessions and received attributes in memory if this element is placed in the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. This element is mutually exclusive with the <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> and <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.
1193 <li><span class="fixed">AAConnectTimeout</span>: Time in seconds the target will wait before timing out on the initial connection to an origin to request attributes. Defaults to <span class="fixed">15</span>.</li>
1194 <li><span class="fixed">AATimeout</span>: Time in seconds the target will wait before timing out while waiting for attributes from an origin once the initial connection is established. Defaults to <span class="fixed">30</span>.</li>
1195 <li><span class="fixed">cacheTimeout</span>: Time in seconds to permit a session to stay in the cache before being purged. Defaults to <span class="fixed">28800</span>.</li>
1196 <li><span class="fixed">cleanupInterval</span>: Seconds between runs of the background thread that purges expired sessions. Defaults to <span class="fixed">300</span>.</li>
1197 <li><span class="fixed">defaultLifetime</span>: If the attribute assertion doesn't carry an explicit expiration time, the assertion will expire after this time in <span class="fixed">seconds</span> has elapsed. Defaults to <span class="fixed">1800</span>.</li>
1198 <li><span class="fixed">propagateErrors</span>: If true, then any errors that occur during the attribute query stage are fatal and will be presented to the user as an error, terminating their session. If false, any errors that occur during the query are non-fatal, and the
1199 application will be given older, expired attributes based on the <span class="fixed">strictValidity</span> setting.</p>
1200 <p>This should generally only be left to false (the default) by deployments that are using real principal names as subjects because attribute retrieval is treated as an optional process.</p></li>
1201 <li><span class="fixed">retryInterval</span>: Time in seconds between attempts to obtain fresh attributes. If a query fails, a timer is set, and once the interval elapses, the next user request causes another query. This prevents pointless repeated attempts to query a failed origin. Defaults to <span class="fixed">300</span>.</li>
1202 <li><span class="fixed">strictValidity</span>: If true, expired attributes will never be made available to the Shibboleth application; if no valid attributes can be obtained, then an empty set is provided. When false, if a fresh set of attributes cannot be retrieved due to failures, any cached, expired attributes are made available. Defaults to <span class="fixed">true</span>.</li>
1205 <dd class="attribute"><a name="confMySQLSessionCache"><span class="fixed"><MySQLSessionCache mysqlTimeout="<i>seconds</i>"/></span></dd>
1206 <dd class="value">Shibboleth will back the memory cache of sessions using an embedded MySQL database if this element is placed in the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element. Arguments may be passed directly to MySQL by populating this element with <span class="fixed"><a href="#confArgument">Argument</a></span> elements. The element may also specify any of the attributes defined for the <a href="#confMemorySessionCache">MemorySessionCache</a> element. Mutually exclusive with the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> and <a href="#confSessionCache"><span class="fixed">SessionCache</span></a> elements.
1208 <li><span class="fixed">mysqlTimeout</span>: Time in seconds to permit a session to stay in the persistent cache before being purged. Defaults to <span class="fixed">28800</span>.</li>
1211 <dd class="attribute"><a name="confPath"><span class="fixed"><Path <span class="mandatory">name="<i>pathname</i>"</span> applicationId="<i>id</i>" requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"></span></dd>
1212 <dd class="value">This element allows for different application identifiers and session handling to be defined iteratively for subdirectories or documents within a host. Requests are processed on a best-match basis, with the innermost element taking precedence. Path elements may be contained by <a href="#confHost"><span class="fixed">Host</span></a> elements or other <a href="#confPath"><span class="fixed">Path</span></a> elements.
1214 <li class="mandatory"><span class="fixed">name</span>: This is the name of the path component or filename to match against the request.</li>
1215 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish an authenticated session with the user before handing off the request to the web server or application. If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span> (the default), applications are responsible for ensuring that a session exists if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> for protected content without a full understanding of the implications.</li>
1216 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute assertion received from the origin is exported to a CGI request header called <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1219 <dd class="attribute"><a name="confPolicy"><span class="fixed"><Policy signRequest="<i>true/false</i>" signedResponse="<i>true/false</i>" signedAssertions="<i>true/false</i>"></span></dd>
1220 <dd class="value">This element is the main container for specifying policies for attributes, trust, and operational metadata by an application. It must be contained by the <a href="#confApplications"><span class="fixed">Applications</span></a> element and, if contained by an <a href="#confApplication"><span class="fixed">Application</span></a> element, may override portions of the policies which would have been inherited by default. The configuration for policy is defined by these elements, each of which is optional: <a href="#confAttributes"><span class="fixed">Attributes</span></a>, <a href="#confFederationProvider"><span class="fixed">FederationProvider</span></a>, <a href="#confTrustProvider"><span class="fixed">TrustProvider</span></a>, <a href="#confRevocationProvider"><span class="fixed">RevocationProvider</span></a>, and <a href="#confAudiences"><span class="fixed">saml:Audiences</span></a>.
1222 <li><span class="fixed">signRequest</span>: If <span class="fixed">true</span>, the target will sign attribute requests that it sends to origins from this application. This is usually unnecessary, as the TLS/SSL transport can provide authentication more efficiently.</li>
1223 <li><span class="fixed">signedResponse</span>: If <span class="fixed">true</span>, the target will require that all SAML attribute responses it receives for this application be signed.</li>
1224 <li><span class="fixed">signedAssertions</span>: If <span class="fixed">true</span>, the target will require that individual SAML assertions it receives for this application be signed. This may be particularly useful if the application is forwarding the assertion, but requires a liberal (or no) AAP to avoid corrupting the signature.</li>
1227 <dd class="attribute"><a name="confRequestMap"><span class="fixed"><RequestMap <span class="mandatory">applicationId="<i>default</i>"</span> requireSession="<i>true/false</i>" exportAssertion="<i>true/false</i>"
1228 uri="<i>URI</i>"></span></dd>
1229 <dd class="value"><p><b>For a general description of how the target handles incoming requests, please refer to <a href="#1.f.">section 1.f</a>.</b></p><p>The <span class="Fixed">RequestMap</span> element is a container holding <a href="#confHost"><span class="fixed">Host</span></a> and <a href="#confPath"><span class="fixed">Path</span></a> elements. The requested URL is parsed and matched against this set of elements in order to determine how to process the request. Attributes on the RequestMap, Host, and Path elements specify whether to require a Shibboleth session, and how to locate the associated Application element. If session requirement or assertion handling conditions varies across that granularity, additional <span class="fixed">RequestMap</span> elements may be specified for them. Alternatively, these conditions may be specified on <a href="#confPath"><span class="fixed">Path</span></a> and <a href="#confHost"><span class="fixed">Host</span></a> elements within this element which will override these settings.</p>
1231 <li><span class="fixed">applicationId</span>: Contains a fixed value of "default" to reference the default <a href="#confApplications"><span class="fixed">Applications</span></a> element.</li>
1232 <li><span class="fixed">requireSession</span>: This attribute controls whether Shibboleth will forcibly establish an authenticated session with the user before handing off the request to the web server or application. If <span class="fixed">true</span>, Shibboleth will force session establishment. If <span class="fixed">false</span> (the default), applications are responsible for ensuring that a session exists if necessary, so-called <a href="#1.f.">lazy session establishment</a>. Most deployments should not specify <span class="fixed">false</span> for protected content without a full understanding of the implications.</li>
1233 <li><span class="fixed">exportAssertion</span>: When <span class="fixed">true</span>, the entire SAML attribute assertion received from the origin is exported to a CGI request header called <span class="fixed">Shib-Attributes</span>, encoded in <span class="fixed">base64</span>. This requires an application to be able to parse the raw XML. Defaults to <span class="fixed">false</span>, which most deployments should use.</li>
1234 <li><span class="fixed">uri</span>: If the request mapping configuration information is stored in a separate XML file that is referred by this file, it may be pointed to using this attribute.</li>
1237 <dd class="attribute"><a name="confRelyingParty"><span class="fixed"><RelyingParty <span class="mandatory">name="<i>string</i>" TLS="<i>string</i>" Signing="<i>string</i>"</span></span>></dd>
1238 <dd class="value"><p>One or more <span class="fixed">RelyingParty</span> elements may be contained by a <a href="#confCredentialUse"><span class="fixed">CredentialUse</span></a> element to enumerate relying parties for which a distinct set of credentials should be used. The <span class="fixed">TLS</span> and <span class="fixed">Signing</span> attribute values reference the identifiers of credential resolvers defined in <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements.</p>
1240 <li class="mandatory"><span class="fixed">name</span>: Identifies the origin site or group of sites to which the credentials specified in the element apply. This is used to match the providerId sent within attribute assertions from origin sites against a set of "groups" based on metadata.</li>
1244 <dd class="attribute"><a name="confRequestMapProvider"><span class="fixed"><RequestMapProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap"</span> uri="<i>pathname</i>"></span></dd>
1245 <dd class="value"><p>This element specifies a request mapper that defines how Shibboleth will handle sessions and access control for a given request. For the built-in type "edu.internet2.middleware.shibboleth.target.provider.XMLRequestMap", there must be a <a href="#confRequestMap"><span class="fixed">RequestMap</span></a> element within this element, or the <span class="fixed">uri</span> attribute must contain the local pathname of an XML file containing one.</p></dd>
1247 <dd class="attribute"><a name="confRevocationProvider"><span class="fixed"><RevocationProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.provider.XMLRevocation"</span> uri="<i>pathname</i>"></span></dd>
1248 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to revocation metadata either inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download periodically. This should be updated regularly; see <a href="#4.g.">section 4.g</a> for further details.
1249 <p>If an <a href="#confApplication"><span class="fixed">Application</span></a> does not include any <span class="fixed">RevocationProvider</span> elements, the default set is used.</p>
1251 <dd class="attribute"><a name="confSessionCache"><span class="fixed"><SessionCache <span class="mandatory">type="<i>string</i>"</span>></span></dd>
1252 <dd class="value">Use this element to specify a pluggable session cache implementation of the specified <span class="fixed">type</span> This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> and <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> elements.
1253 <p>Any plugin should support the basic attributes defined by the <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element.</p></dd>
1255 <dd class="attribute"><a name="confSessions"><span class="fixed"><Sessions
1256 <span class="mandatory">wayfURL="<i>URL</i>"
1257 shireURL="<i>URL</i>"</span>
1258 shireSSL="<i>true/false</i>"
1259 cookieName="<i>URL</i>"
1260 cookieProps="<i>URL</i>"
1261 lifetime="<i>seconds</i>"
1262 timeout="<i>seconds</i>"
1263 checkAddress="<i>true/false</i>"></span></dd>
1264 <dd class="value">Configuration parameters that affect the way Shibboleth handles sessions for an individual application are bundled in this element, which must be included in each <a href="#confApplication"><span class="fixed">Application</span></a> and <a href="#confApplications"><span class="fixed">Applications</span></a> element. Note that these parameters only apply to Shibboleth sessions, and not any sessions applications manage on their own behalf.
1266 <li class="mandatory"><span class="fixed">wayfURL</span>: The URL of the <a href="#1.c.">WAYF service</a> responsible for redirecting users accessing this application to their identity provider (origin).</li>
1267 <li class="mandatory"><p><span class="fixed">shireURL</span>: Specifies the SHIRE URL, or assertion consumer service, at which new sessions are initiated or lazy sessions are triggered. This can be an absolute URL, or a relative path to be prefixed by the base URL of the virtual host. Using an absolute URL allows a virtual server to funnel requests to a fixed location, to force use of SSL, for example.</p>
1268 <p>Note that this URL issues the session cookie set on behalf of the application, and this cookie must be returned in subsequent requests, so the virtual host's domain name and port must be consistent with this domain name and port for some browsers to properly return the cookie. If default ports are used (and thus left unspecified), browsers will generally return cookies set via SSL to a non-SSL port. If non-default ports are used, it is recommended that this be a relative URL so that each virtual host handles its own cookie operations.</p>
1269 <p>For Shibboleth to function properly in IIS, the file extension at the end of this URL must match the value configured into IIS and mapped to the ISAPI extension. This causes the request to be serviced properly, even though no file by that name actually exists.</p></li>
1270 <li><span class="fixed">shireSSL</span>: If <span class="fixed">true</span> (the default), the application will <b>only</b> accept new session requests over SSL, as is strongly recommended; see <a href="#2.c.">section 2.c</a> for more details.</li>
1271 <li><span class="fixed">cookieName</span>: Optionally specifies the name given to in-memory session cookies that are associated with this application. If omitted, Shibboleth will generate a cookie name for you of the form _shibsession_<Application ID></li>
1272 <li><span class="fixed">cookieProps</span>: A string of additional Set-Cookie properties can be specified using this element which give the browser further instructions about cookie processing and use. Always begin with a semicolon to delineate from the session ID value.</li>
1273 <li><span class="fixed">lifetime</span>: Duration in seconds of the Shibboleth session; this does not affect the lifetime of application sessions initiated independently of Shibboleth. Defaults to 3600. If 0 is specified, sessions are infinite, subject to purging by the cache.</li>
1274 <li><span class="fixed">timeout</span>: If the duration in seconds elapses following the last request in a session, the session will be expired for inactivity and a new session must be initiated upon the next request. Defaults to 1800. If 0 is specified, there is no inactivity timeout</li>
1275 <li><span class="fixed">checkAddress</span>: If <span class="fixed">true</span> (the default), Shibboleth will check the browser's client address to insure that session cookies are issued and used by a consistent client address. In most circumstances, this should be enabled to help prevent attacks using stolen cookies, but this can cause problems for users behind proxies or NAT devices.</li>
1278 <dd class="attribute"><a name="confSHAR"><span class="fixed"><SHAR logger="<i>pathname</i>"></span></dd>
1279 <dd class="value">This is the container element for configuration information pertaining to the SHAR, the target component responsible for most attribute and session processing. Its single attribute, <span class="fixed">logger</span>, points to a Log4J-format property configuration file that controls SHAR logging behavior. It is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1280 <p>It must contain either a <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> element to listen to the Apache module on a UNIX domain socket or a <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> element to listen on a TCP port. Session caching must also be specified using a <a href="#confMemorySessionCache"><span class="fixed">MemorySessionCache</span></a> element to use in-memory session caching or a <a href="#confMySQLSessionCache"><span class="fixed">MySQLSessionCache</span></a> element to backup session information in a MySQL database.</p></dd>
1282 <dd class="attribute"><a name="confShibbolethTargetConfig"><span class="fixed"><ShibbolethTargetConfig clockSkew="integer"></span></dd>
1283 <dd class="value">This is the root element for target configuration and must be present once and only once. It must always contain a <a href="#confSHAR"><span class="fixed">SHAR</span></a> element, a <a href="#confSHIRE"><span class="fixed">SHIRE</span></a> element, an <a href="#confApplications"><span class="fixed">Applications</span></a> element, one or more <a href="#confCredentialsProvider"><span class="fixed">CredentialsProvider</span></a> elements, and optionally an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element.
1284 <ul><li><span class="fixed">clockSkew</span>: Controls allowed clock skew in seconds between target and origin servers when evaluating times sent in messages. Defaults to 180, and should be as small as practical.</li>
1287 <dd class="attribute"><a name="confSHIRE"><span class="fixed"><SHIRE logger="<i>pathname</i>"></span></dd>
1288 <dd class="value">This is the container element for configuration information pertaining to the SHIRE, the part of the target that integrates into the web server environment. Its single attribute, <span class="fixed">logger</span>, points to a Log4J-format property configuration file that controls SHIRE logging behavior. It is contained by the <a href="#confShibbolethTargetConfig"><span class="fixed">ShibbolethTargetConfig</span></a> element and may contain an <a href="#confExtensions"><span class="fixed">Extensions</span></a> element specifying additional libraries.</p>
1289 <p>It may contain an <a href="#confImplementation"><span class="fixed">Implementation</span></a> element, within which configuration for the SHIRE which varies by platform will be specified.</p>
1290 <p>It may contain a <a href="#confRequestMapProvider"><span class="fixed">RequestMapProvider</span></a> element, which provides fine-grained control over aspects of target behavior at a host, path, or document level.</dd>
1292 <dd class="attribute"><a name="confSite"><span class="fixed"><Site <span class="mandatory">id="<i>INSTANCE_ID</i>" host="<i>fqdn</i>"</span>/></span></dd>
1293 <dd class="value">This element is placed in the <a href="#confISAPI"><span class="fixed">ISAPI</span></a> element to specify a mapping from individual instance ID's to respective vhost domain names.</dd>
1295 <dd class="attribute"><a name="confTCPListener"><span class="fixed"><TCPListener <span class="mandatory">address="<i>pathname</i>" port="<i>integer</i>"</span> acl="<i>ip</i>"></span></dd>
1296 <dd class="value">This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confUnixListener"><span class="fixed">UnixListener</span></a> and <a href="#confListener"><span class="fixed">Listener</span></a> elements. It allows the SHAR to communicate with the web-server component using TCP.
1297 <ul><li class="mandatory"><span class="fixed">address</span>: Specifies the IP address of the listener.</li>
1298 <li class="mandatory"><span class="fixed">port</span>: Specifies the TCP port on which the SHAR will listen.</li>
1299 <li><span class="fixed">acl</span>: By default, the SHAR will only listen to requests from 127.0.0.1 (localhost). This should generally not be specified except in test environments.</li>
1302 <dd class="attribute"><a name="confTrustProvider"><span class="fixed"><TrustProvider <span class="mandatory">type="edu.internet2.middleware.shibboleth.common.provider.XMLTrust"</span> uri="<i>pathname</i>"></span></dd>
1303 <dd class="value">This element, when specified within a <a href="#confPolicy"><span class="fixed">Policy</span></a> element, points to trust metadata either inline within the element or in a local XML file. Federations will often publish signed XML files for targets to download periodically. This should be refreshed regularly; see <a href="#4.g.">section 4.g</a> for further details.
1304 <p>If an <a href="#confApplication"><span class="fixed">Application</span></a> does not include any <span class="fixed">TrustProvider</span> elements, the default set is used.</p>
1306 <dd class="attribute"><a name="confUnixListener"><span class="fixed"><UnixListener address="<i>pathname</i>"></span></dd>
1307 <dd class="value">Use this element to specify a UNIX domain socket located at the <span class="fixed">pathname</span> specified in the <span class="fixed">address</span> attribute at which the SHAR should listen for requests. This element must be contained by the <a href="#confSHAR"><span class="fixed">SHAR</span></a> element and is mutually exclusive with the <a href="#confTCPListener"><span class="fixed">TCPListener</span></a> and <a href="#confListener"><span class="fixed">Listener</span></a> elements. <span class="fixed">UnixListener</span> cannot be specified for Windows-based installations.</dd>
1310 <h4><a name="4.b."></a>4.b. Dynamic Error Page Generation</h4>
1312 <p>Shibboleth supports the dynamic generation of information in error pages
1313 referenced by <span class="fixed">shibboleth.xml</span>. The Shib Target
1314 employs a special Markup Language Processor to insert special tags into the
1315 generated HTML. The parser will read the error file looking for any tag that
1318 <p><span class="fixed"><shibmlp tag-name /></span> </p>
1320 <p>Shibboleth will replace <span class="fixed">tag-name</span> with the
1321 appropriate markup tag from the table below:</p>
1323 <dd class="attribute"><span class="fixed">supportContact</span></dd>
1324 <dd class="value">The value of the <span class="fixed">supportContact</span>
1325 for this web site.</dd>
1326 <dd class="attribute"><span class="fixed">logoLocation</span></dd>
1327 <dd class="value">This attribute provides a means to specify a dynamic
1328 <span class="fixed">logoLocation</span> in order to fill in the template
1329 error page only; if a custom error page is created, then the image may
1330 be linked to statically by the page itself.</dd>
1331 <dd class="attribute"><span class="fixed">requestURL</span></dd>
1332 <dd class="value">The user's requested URL.</dd>
1333 <dd class="attribute"><span class="fixed">errorType</span></dd>
1334 <dd class="value">The type of error.</dd>
1335 <dd class="attribute"><span class="fixed">errorText</span></dd>
1336 <dd class="value">The actual error message.</dd>
1337 <dd class="attribute"><span class="fixed">errorDesc</span></dd>
1338 <dd class="value">A textual description of the error intended for human
1340 <dd class="attribute"><span class="fixed">originContactName</span></dd>
1341 <dd class="value">The contact name for the origin site provided by that
1342 site's metadata.</dd>
1343 <dd class="attribute"><span class="fixed">originContactEmail</span></dd>
1344 <dd class="value">The contact email address for the origin site provided
1345 by that site's metadata.</dd>
1346 <dd class="attribute"><span class="fixed">originErrorURL</span></dd>
1347 <dd class="value">The URL of an error handling page for the origin site
1348 provided by that site's metadata.</dd>
1350 <p>This configuration is only for Apache servers, and is only used by
1351 resources protected by Shibboleth. See <a href="#4.d.">section 4.d.</a></p>
1352 <p>Sample error templates for different kinds of errors are included in the
1353 Shibboleth distribution, and can be triggered by anything that will cause
1354 Shibboleth to be unable to make an authorization decision, including a bad
1355 sites file, certificate verification failures, or a skewed clock between
1357 <p><b>You should edit these templates, provide or remove style sheets and
1358 images, and otherwise customize these templates to suit the user experience
1359 you want your users to have when errors occur. The defaults are not likely
1360 to meet the needs of any site.</b></p>
1362 <h4><a name="4.c."></a>4.c. Key Generation and Certificate Installation</h4>
1364 <p>The only target component that must have a private key and certificate is
1365 the SHAR. While the target server itself should support SSL in most cases
1366 for users, it is mandatory for the SHAR to authenticate when contacting an
1367 AA, and it must therefore be given a key and an SSL client certificate. It
1368 is permissible for the SHAR to use the same keypair and certificate used by
1369 the target web server itself, provided the certificate is signed by a CA
1370 accepted by the origin sites that will be queried for attributes.</p>
1371 <p>On Unix, we require that OpenSSL be installed to use Shibboleth. On
1372 Windows, OpenSSL libraries and the command line tool are included in the
1373 package and can be used directly, if not otherwise available.</p>
1374 <p>The certificate and key file location should be based on whether they
1375 will also be used for Apache. If they will be used as a server certificate
1376 as well, they should probably be in the Apache tree in the usual
1377 <span class="fixed">mod_ssl</span>-defined locations inside the Apache
1378 configuration folder., and the SHAR can read them from there. If the SHAR is
1379 not running as <span class="fixed">root</span>, permissions might need to be
1380 changed to allow this access. If the certificate and key will only be used
1381 for the SHAR, they can be put in the same folder with the
1382 <span class="fixed">shibboleth.xml</span> file and protected appropriately.</p>
1383 <p>Other web servers like IIS do not use the raw PEM format that Apache and
1384 Shibboleth can share, and therefore the components must generally use
1385 separate copies of the key and certificate if they are to be shared. Most
1386 other servers can export and/or import keys to and from PEM format or other
1387 formats that OpenSSL can convert. Refer to your server's documentation or
1388 ask for assistance from others who use it.</p>
1389 <p>The SHAR is assigned a key and a certificate using shibboleth.xml's
1390 <span class="fixed">certFile</span>, <span class="fixed">keyFile</span> and
1391 <span class="fixed">keyPass</span> settings, described in <a href="#4.a.">
1392 section 4.a.</a> These files must currently be in PEM format. OpenSSL
1393 commands to generate a new keypair and a certificate request are shown here,
1394 assuming 2048 bit RSA keys are to be used:</p>
1396 <p><span class="fixed">$ openssl genrsa -des3 -out ssl.key 2048<br>
1397 $ openssl req -new -key ssl.key -out ssl.csr</span> </p>
1399 <p>The signed certificate file returned by the CA should be usable directly,
1400 or can be converted to PEM format using the <span class="fixed">openssl x509</span>
1402 <p>If the key is to be shared with Apache, the web server's child processes,
1403 often running as <span class="fixed">nobody</span>, must be able to read
1404 them while the server is running, which may require permission changes.</p>
1405 <p>This particularly applies when sharing the key and certificate used by
1406 mod_ssl, which are only readable by root by default. The password, if any,
1407 must be placed in the <span class="fixed">shibboleth.xml</span> file, since
1408 the Apache module cannot prompt for it during initial startup as mod_ssl
1409 can. The issues surrounding how to securely obtain a key while running as
1410 <span class="fixed">nobody</span> may be addressed in a later release. Since
1411 the password will be stored in clear text in a frequently examined file, it
1412 is suggested to use a password not used elsewhere.</p>
1415 <h4><a name="4.d."></a>4.d. Protecting Web Pages</h4>
1417 <p>Protection of web pages is primarily achieved through "mapping"
1418 attributes provided by an AA to a localized vocabulary for authorization
1419 rules. This was formerly accomplished in Apache using features in the AAP
1420 syntax, described in <a href="#4.e.">section 4.e.</a> This applies to both
1422 <p><b><u>IIS</u></b></p>
1423 <p>The IIS RM module supports the mapping of attributes via AAP files, but
1424 it does not support rule-based policies and therefore cannot protect static
1425 content at this time. In addition, all of the configuration settings are
1426 managed globally or per-site and are pulled from the <span class="fixed">
1427 shibboleth.xml</span> file, so there are no additional commands to document
1430 <p><b><u>Apache</u></b></p>
1431 <p>The Apache RM module provided can interpret AAP settings to map
1432 attributes to HTTP request headers and to <span class="fixed">Require</span>
1433 rules, permitting protection of both static and dynamic content. Any of the
1434 typical ways of protecting content may be used (.htaccess, Directory,
1435 Location, Files, etc.). They define what content is to be protected and
1436 static access control rules.</p>
1437 <p>There are two ways to trigger Shibboleth authentication: specifying an
1438 <span class="fixed">AuthType</span> of <span class="fixed">shibboleth</span>
1439 to use Shibboleth directly, or using <span
1440 class="fixed">ShibBasicHijack</span> to process existing .htaccess files
1441 using Shibboleth instead. Support for authorization consists of
1442 mod_auth-style require directives, as well as support for mod_auth group
1444 <p>A complete list of the directives and their values is below:</p>
1446 <dd class="attribute"><span class="fixed">AuthType <string></span></dd>
1447 <dd class="value">Use <span class="fixed">shibboleth</span> for direct
1448 invocation, or <span class="fixed">Basic</span> plus the
1449 <span class="fixed">ShibBasicHijack</span> option described below.</dd>
1450 <dd class="attribute"><span class="fixed">ShibSSLOnly <on/off></span></dd>
1451 <dd class="value">Controls whether Shibboleth will reject non-SSL
1452 requests for resources from clients. Defaults to <span class="fixed">off</span>.</dd>
1453 <dd class="attribute"><span class="fixed">ShibBasicHijack <on/off></span></dd>
1454 <dd class="value">Controls whether Shibboleth should or should not
1455 ignore requests with <span class="fixed">AuthType Basic</span>. Defaults
1456 to <span class="fixed">off</span>.</dd>
1457 <dd class="attribute"><span class="fixed">ShibExportAssertion <on/off></span></dd>
1458 <dd class="value">Controls whether the SAML attribute assertion provided
1459 by the AA is exported in a base64-encoded HTTP header,
1460 <span class="fixed">Shib-Attributes</span>. Defaults to
1461 <span class="fixed">off</span>. While this does require parsing the raw
1462 XML, it also permits an application to see attributes that may have been
1463 filtered by an AAP, or to forward the SAML assertion to a third party.</dd>
1464 <dd class="attribute"><span class="fixed">ShibAuthLifetime <seconds></span></dd>
1465 <dd class="value">If set, sessions are always terminated after the
1466 specified number of seconds, resulting in a new redirect and request for
1467 authentication, just as if a new request without a session is received.
1468 Defaults to infinite.</dd>
1469 <dd class="attribute"><span class="fixed">ShibAuthTimeout <seconds></span></dd>
1470 <dd class="value">If set, sessions are always terminated after the
1471 specified number of seconds of inactivity (defined as no requests
1472 received in that session), resulting in a new redirect and request for
1473 authentication, just as if a new request without a session is received.
1474 Defaults to infinite.</dd>
1475 <dd class="attribute"><span class="fixed">AuthGroupFile <pathname></span></dd>
1476 <dd class="value">Same as mod_auth; collects values found in REMOTE_USER
1477 into a named group for access control. An attribute must be mapped to
1478 REMOTE_USER for this to work. Note that mod_auth will not support group
1479 files when mod_shibrm is loaded, since they share the same command.
1480 <p><a href="http://httpd.apache.org/docs/mod/core.html#require">This is
1481 implemented</a> by placing a <span class="fixed">.htaccess</span> file
1482 that references a group file stored at <span class="fixed">/pathname</span>:</p>
1484 <p><span class="fixed">AuthGroupFile /pathname<br>
1485 require group workgroup</span></p>
1488 <a href="http://httpd.apache.org/docs/mod/mod_auth.html#authgroupfile">
1489 AuthGroupFile</a> used by Shibboleth might resemble:<br>
1490 <span class="fixed">workgroup: joe@example.edu, jane@demo.edu, jim@sample.edu</span>
1492 <dd class="attribute"><span class="fixed">Require <string></span></dd>
1493 <dd class="value">Enforce authorization using one of the following
1494 methods.<ul type="circle">
1495 <li><span class="fixed">valid-user</span><blockquote>
1496 <p>Any Shibboleth user from a trusted origin site is accepted,
1497 even if no actual attributes are received. This is a very
1498 minimal kind of policy, but is useful for testing or for
1499 deferring real policy to an application.</p>
1502 <p><span class="fixed">user</span></p>
1504 <p>A space-delimited list of values, such as from the
1505 <span class="fixed">
1506 urn:mace:dir:attribute-def:eduPersonPrincipalName</span>
1507 attribute. Actually, any attribute can be mapped to REMOTE_USER,
1508 even if this doesn't always make sense.</p>
1511 <li><span class="fixed">group</span><blockquote>
1512 <p>A space-delimited list of group names defined within
1513 <span class="fixed">AuthGroupFile</span> files, again provided
1514 that a mapping to <span class="fixed">REMOTE_USER</span> exists.</p>
1517 <li><span class="fixed"><alias></span><blockquote>
1518 <p>An arbitrary rule name that matches an Alias defined in an
1519 AAP file. The rule value is a space-delimited list of attribute
1520 values, whose format depends on the attribute in question (e.g.
1521 an affiliation rule might look like:</p>
1522 <p><span class="fixed">require affiliation staff@osu.edu
1523 faculty@mit.edu</span></p>
1527 <p>Additionally, for <span class="fixed">user</span> and
1528 <span class="fixed"><alias></span>-based rules, if a tilde character is
1529 placed immediately following <span class="fixed">user</span> or
1530 <span class="fixed"><alias></span>, the expressions that follow are
1531 treated as regular expressions. The syntax supported is generally based
1532 on the one defined by <a href="http://www.w3.org/TR/xmlschema-2/#regexs">
1533 XML Schema</a>. This specification borders on unreadable, but the syntax
1534 is generally Perl-like. Expressions should generally be "anchored" with
1535 the ^ and $ symbols to insure mid-string matches don't cause false
1537 <p>For example, the rule:<br>
1538 <span class="fixed">require affiliation ~ ^member@.+\.edu$<br>
1539 </span>would evaluate to allowing anyone with an <span class="fixed">
1540 affiliation</span> of <span class="fixed">member</span> from a .edu
1544 <h4><a name="4.e."></a>4.e. Defining Attributes and Acceptance Policies</h4>
1546 <p>Shibboleth allows a user and a site to release a varying set of
1547 attributes to a destination site, and does not impose restrictions on the
1548 kinds of attribute information provided by an AA. Target implementations
1549 must be prepared to examine the attributes they receive and filter them
1550 based on policies about what information to permit an origin site to assert
1551 about its users.</p>
1552 <p>Attribute acceptance is the process of defining acceptable attributes and
1553 filtering attribute values before passing them on to a resource manager,
1554 such as the <span class="fixed">mod_shibrm</span> module. Data blocked by
1555 AAP filters will not be passed to the CGI environment or used when enforcing
1556 <span class="fixed">.htaccess</span> rules. Note that the attribute
1557 assertion exported to the <span class="fixed">Shib-Attributes</span> header
1559 <p>The Shibboleth implementation supports Scoped and Simple attributes and
1560 filtering policies for different kinds of attributes, and is potentially
1561 extensible to more complex attributes in the future. An attribute is
1562 considered Scoped if the XML representation of its values contains a "Scope"
1563 attribute. As of 1.1, this is detected at runtime and requires no
1564 configuration in advance.</p>
1565 <p><b>An essential part of the Shibboleth trust fabric is ensuring that
1566 sites only assert attributes for domains for which they are considered
1567 authoritative by the target. Typically, this means that Brown University
1568 will be trusted to assert attributes only scoped to <span class="fixed">
1569 brown.edu</span>. Unless there are very specific circumstances requiring
1570 this restriction be removed, it is strongly encouraged that such policies be
1574 <p>Scoped attributes are a special kind of attribute whose values are a
1575 combination of a <span class="fixed">value</span> and a
1576 <span class="fixed">scope</span>, or <span class="fixed">context</span>
1577 for the value. An example is <span class="fixed">
1578 eduPersonScopedAffiliation</span>, which adds a scope to the defined set
1579 of <span class="fixed">eduPersonAffiliation</span> values, such as
1580 <span class="fixed">student</span>, <span class="fixed">member</span>,
1581 or <span class="fixed">faculty</span>. Scopes are expressed as DNS
1582 domains and subdomains.</p>
1583 <p>Any <span class="fixed">scoped</span> attribute can be scoped only to
1584 the origin site's permitted domains. These domains are listed in the
1585 site metadata that provides policy information to the system. Domains
1586 can be explicit or regular expressions, and can be changed by a target
1587 to meet its needs. Targets can also override the rules specified for the
1588 site in their own AAPs, choosing to accept additional scopes or deny
1589 scopes that would ordinarily be accepted based on metadata provided by a
1590 federation. Thus, attribute acceptance processing for
1591 <span class="fixed">scoped</span> attributes is based on site metadata
1592 and target-specified overrides in addition to the mechanism described
1593 below for <span class="fixed">simple</span> attributes.</p>
1594 <p>Scope rules specified in an AAP are additive with any domains
1595 permitted by site metadata, and the rules are applied by first looking
1596 for an applicable denial rule, and then looking at site metadata and any
1597 applicable site rules for an accept rule.</p>
1601 <p>Simple attributes are attributes whose value is expressed in XML as a
1602 Text node; that is, the value is just a string. Multiple values are
1603 permitted. <span class="fixed">eduPersonEntitlement</span>, in which the
1604 values are URIs, is one example of a simple attribute.</p>
1605 <p>Both Simple and Scoped attribute acceptance is controlled with an
1606 external policy file written in XML. The schema for the file is
1607 described by the <span class="fixed">shibboleth.xsd</span> schema, and
1608 an example file is included, <span class="fixed">AAP.xml</span>. It is
1609 mandatory to supply such a file, because attributes are recognized based
1610 on their presence in this file, and not by separate configuration
1611 processes. Only by listing an attribute in the file will it be accepted
1612 and processed by the RM.</p>
1613 <p>The policy is a default-deny algorithm that requires permissible
1614 attributes and values be listed explicitly. That is, an empty file
1615 permits nothing. Each attribute to be supported must be listed in the
1616 file by name in an <span class="fixed"><AttributeRule></span>. Each such
1617 rule is a collection of <span class="fixed"><SiteRule></span> elements
1618 along with an optional <span class="fixed"><AnySite></span> default
1619 rule. In turn each site rule is a set of <span class="fixed"><Value></span>
1620 rules that specify matches to permit, either literal or regular
1621 expressions, or a wildcarded <span class="fixed"><AnyValue></span>
1622 default rule, which is equivalent to a single regular expression rule
1623 allowing anything.</p>
1625 <p>A syntax summary follows:</p>
1627 <p><span class="fixed"><AttributeAcceptancePolicy</span></p>
1629 <p>The top level element in the file.</p>
1631 <p><span class="fixed"><AttributeRule<br>
1632 Name="urn:mace:dir:attribute-def:eduPersonScopedAffiliation"<br>
1633 Header="Shib-EP-Affiliation" Alias="affiliation"></span></p>
1635 <p>Specifies a rule for an attribute, named by its URI. The
1636 following XML attributes can be supplied:</p>
1637 <table border="1" cellpadding="5" cellspacing="5">
1639 <td><span class="fixed">Name</span></td>
1640 <td>The name of the Shibboleth attribute, usually a URI.
1641 This is the only required XML attribute.</td>
1644 <td><span class="fixed">Namespace</span></td>
1645 <td>If the attribute's name includes a SAML namespace,
1646 supply it here. Normally this is unused.</td>
1649 <td><span class="fixed">Header</span></td>
1650 <td>The HTTP request header to map the attribute's values
1654 <td><span class="fixed">Alias</span></td>
1655 <td>A short name for the attribute, determines the name of
1656 the Apache <span class="fixed">Requires</span> rule.</td>
1660 <p><span class="fixed"><AnySite></span></p>
1662 <p>Specifies a rule that always applies to the attribute, regardless
1663 of the asserting AA.</p>
1665 <p><span class="fixed"><SiteRule Name="host.domain.com"></span></p>
1667 <p>A rule that applies to the origin site AA corresponding to the
1670 <p><span class="fixed"><Scope Accept="true|false" Type="type"></span></p>
1672 <p>Specifies a value to accept or deny, either directly using
1673 <span class="fixed">type</span> <span class="fixed">literal</span>,
1674 or using a set of matching expressions as <span class="fixed">type</span>
1675 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1676 is the default if <span class="fixed">Type</span> is not specified.
1677 Accept defaults to "true">.</p>
1679 <p><span class="fixed"><AnyValue></span></p>
1681 <p>Specifies a rule that always applies to the attribute and site,
1682 regardless of the value(s).</p>
1684 <p><span class="fixed"><Value Type="type"></span></p>
1686 <p>Specifies a value to permit, either directly using
1687 <span class="fixed">type</span> <span class="fixed">literal</span>,
1688 or using a set of matching expressions as <span class="fixed">type</span>
1689 <span class="fixed">regexp</span>. <span class="fixed">literal</span>
1690 is the default if <span class="fixed">Type</span> is not specified.</p>
1693 <p>The regular expression syntax is a subset of the usual Perl and Unix
1694 syntaxes that is described in the XML Schema specification by the W3C. Most
1695 typical expressions should work. Be sure to anchor them using
1696 <span class="fixed">^</span> and <span class="fixed">$</span> to avoid
1697 unintentional matches midstring.</p>
1699 <h4><a name="4.f."></a>4.f. Using Attributes in Applications</h4>
1701 <p>Apart from the simple RM functionality provided, attribute information
1702 may be made available directly to applications via the standard practice of
1703 creating custom HTTP request headers before passing control to the
1704 application. Applications should make no assumption about the presence of
1705 specific attributes for their use unless they have intimate knowledge of the
1706 attribute release policies in place.</p>
1707 <p>The AAP metadata controls this interface, and maps a Shibboleth attribute
1708 to a header name, such as <span class="fixed">Shib-EP-Affiliation</span>.
1709 Using that example, any values of the mapped attribute will be placed in
1710 that header, delimited by semicolons. An application that uses a CGI-like
1711 syntax to access the header will find the values in the <span class="fixed">
1712 HTTP_SHIB_EP_AFFILIATION</span> variable. Any attribute can be placed in any
1713 header, to drive legacy applications that expect information in a particular
1715 <p>The <span class="fixed">REMOTE_USER</span> variable is a special case
1716 that is generally populated automatically by the web server based on an
1717 internal piece of data that represents the current <span class="fixed">
1718 username</span>. Unlike many authentication modules, Shibboleth does not
1719 guarantee that <span class="fixed">REMOTE_USER</span> will have any value,
1720 because users may remain anonymous in many cases. If it does have a value,
1721 it is set solely because of an AAP file that maps an attribute to that
1722 header name. For many purposes, the <span class="fixed">
1723 urn:mace:dir:attribute-def:eduPersonPrincipalName</span> attribute should be
1724 mapped to <span class="fixed">REMOTE_USER</span>. Even so, EPPN may not be
1725 provided by the AA, and <span class="fixed">REMOTE_USER</span> might still
1727 <p>The <span class="fixed">Shib-Origin-Site</span> variable will contain the
1728 unique name/identifier of the origin site of the user. Some applications may
1729 use this to lookup additional policy or application data. It normally takes
1730 the form of a URI but could be any string in some deployments.</p>
1731 <p>Finally, configuration may instruct the web server to place the entire
1732 XML message containing the SAML attribute information from the AA into a
1733 base64-encoded header called <span class="fixed">Shib-Attributes</span>.
1734 This is a raw interface that provides an application with the entire AA
1735 response, and is not a filtered view based on any attribute acceptance rules
1736 or even based on what attributes are recognized by the target. What was sent
1737 is what you see.</p>
1739 <h4><a name="4.g."></a>4.g. <span class="fixed">siterefresh</span></h4>
1741 <p>Shibboleth provides a simple tool called <span class="fixed">siterefresh</span>
1742 in the <span class="fixed">/opt/shibboleth/bin</span> folder of the
1743 distribution to maintain metadata files referenced by <span class="fixed">
1744 shibboleth.xml</span>. It will return 0 on success and a negative number on
1745 failure and log errors to <span class="fixed">stderr</span>. If the data in
1746 the new metadata file is bad or the signature is invalid, the existing copy
1747 is kept. The SHAR and SHIRE stat all metadata files each time the data is
1748 used, allowing them to detect and utilize updates in real-time operation.</p>
1749 <p><span class="fixed">siterefresh</span> takes the following command-line
1752 <dd class="attribute"><span class="fixed">--url <URL></span> </dd>
1753 <dd class="value">Specifies the <span class="fixed">URL</span> of the
1754 remote metadata file with which to update the local file.</dd>
1755 <dd class="attribute"><span class="fixed">--out <pathname></span> </dd>
1756 <dd class="value">Specifies the local file to which to write the new
1758 <dd class="attributeopt"><span class="fixed">--cert <pathname></span>
1760 <dd class="valueopt">Specifies the location of a certificate stored in
1761 <span class="fixed">PEM</span> format used to validate the signature of
1762 the metadata file. Since much of Shibboleth's security flows from
1763 metadata files, this option is highly recommended, and the certificate
1764 used should be verified independently.</dd>
1765 <dd class="attributeopt"><span class="fixed">--schema <pathname></span>
1767 <dd class="valueopt">Optionally defines a base path for schemas to use
1768 when validating the file. Defaults to <span class="fixed">
1769 /opt/shibboleth/etc/shibboleth/</span>.</dd>
1771 <p>A complete command issued to <span class="fixed">siterefresh</span> might
1774 <p><span class="fixed">/opt/shibboleth/bin/siterefresh --out sites.xml
1775 --cert internet2.pem \<br>
1776 --url http://wayf.internet2.edu/InQueue/sites.xml </span></p>
1778 <p>It is recommended that similar commands be added to a <span class="fixed">
1779 crontab</span> to keep the site and trust files refreshed. AAP files tend to
1780 be site-specific, but could be maintained and distributed centrally. If the
1781 command is invoked in a script that writes the file to a new location and
1782 compares it with the old contents before overwriting the original, the
1783 command could be run very often without impacting target operations,
1784 providing a high degree of currency in case sites become compromised.</p>
1786 <h4><a name="4.h."></a>4.h. MySQL Session Cache</h4>
1788 <p>Shibboleth includes a useful plugin that extends the default memory cache
1789 for storing session data in the SHAR with a backing cache using an embedded
1790 MySQL database. In most distributions, it is enabled by default. The plugin
1791 can be found in the <span class="fixed">/opt/shibboleth/libexec</span>
1792 folder, and is loaded as an extension library using the <span class="fixed">
1793 [extensions:saml]</span> section of <span class="fixed">shibboleth.xml</span>.
1794 The following configuration options are available:</p>
1796 <dd class="attributeopt"><span class="fixed">mysql-cache-timeout =
1797 <seconds> (in [shar] section)</span></dd>
1798 <dd class="valueopt">Specifies the duration in <span class="fixed">
1799 seconds</span> that must elapse between user accesses before that user's
1800 session is purged from the persistent cache. Defaults to
1801 <span class="fixed">28800</span> seconds, or 8 hours. This should
1802 generally be longer than the associated server's settings for session
1803 lifetime and timeout, and the memory cache's timeout.</dd>
1804 <dd class="attributeopt"><span class="fixed"><MySQL Arguments>
1805 (one per line in [mysql] section)</span></dd>
1806 <dd class="valueopt">To pass arguments to the MySQL engine, create
1807 argument lines in the <span class="fixed">[mysql]</span> section in the
1809 <blockquote class="fixed">
1810 <p>arg1=<argument><br>
1811 arg2=<argument><br>
1814 <p>Important arguments you'll find by default include: </p>
1815 <blockquote class="fixed">
1816 <p>arg1 = --language=/opt/shibboleth/share/english<br>
1817 arg2 = --datadir=/opt/shibboleth/data</p>
1819 <p>which set the message file path and the location of the cache's
1820 database files respectively. Make sure the data directory exists before
1821 starting the SHAR if you change this path.</dd>
1827 <h3><a name="5."></a>5. Troubleshooting</h3>
1828 <p>This section provides basic information about testing Shibboleth targets.
1829 This information is not intended to be comprehensive, but instead rudimentary
1830 guidelines for basic configuration tests and problems. For more detailed
1831 information or answers to specific problems not addressed in this section,
1832 please mail <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
1833 with a thorough description of errors and configurations used.</p>
1834 <h4><a name="5.a."></a>5.a. Basic Testing</h4>
1836 <p>The target may be tested by generating a folder with very basic access
1837 controls on it, and accessing it using a web browser. Place a simple webpage
1838 such as <span class="fixed">index.html</span> in <span class="fixed">
1839 /secure/</span>. Then, add the following lines to <span class="fixed">
1840 httpd.conf</span>, which should be removed when testing is over:</p>
1842 <p><span class="fixed"># Configure a test directory<br>
1843 <Location /secure><br>
1844 AuthType shibboleth<br>
1845 require valid-user<br>
1847 # Per-directory SHIRE Configuration<br>
1848 #ShibBasicHijack On<br>
1850 # RM Configuration<br>
1851 #AuthGroupFile /foo<br>
1852 #ShibRequireSession On<br>
1853 #ShibExportAssertion On<br>
1854 </Location><br>
1857 <p><b>For information regarding specific error messages that may be
1858 generated if the target does not work successfully, please refer to section
1859 <a href="#5.b.">5.b.</a>, or write
1860 <a href="mailto:mace-shib-users@internet2.edu">mace-shib-users@internet2.edu</a>.</b></p>
1862 <h4><a name="5.b."></a>5.b. Common Problems</h4>
1864 <p>A knowledge base is being developed in the
1865 <a href="https://umdrive.memphis.edu/wassa/public/shib.faq/shibboleth-faq.html">
1866 Shibboleth Deployer's FAQ</a>. Please mail
1867 <a href="mailto:shibboleth-users@internet2.edu">shibboleth-users@internet2.edu</a>
1868 with any additional questions or problems encountered that are not answered
1869 by this basic guide.</p>