Update README.Debian for new require session syntax
[shibboleth/sp.git] / debian / libapache2-mod-shib2.README.Debian
1                         Shibboleth 2 SP for Debian
2
3 Introduction
4
5   This package provides the Shibboleth Apache module and accompanying
6   daemon for a service provider.  In Shibboleth terminology, this is a web
7   server serving some content that should be secured via Shibboleth.  In
8   order for someone to access protected content from a Shibboleth SP, they
9   will have to authenticate to a Shibboleth IdP (Identity Provider),
10   either one that the Shibboleth SP points to directly or one that is part
11   of a federation that is trusted by the Shibboleth SP.
12
13   This is the Shibboleth 2 version of the SP.  For the 1.x version of
14   the Shibboleth SP (if it is still available), see libapache-mod-shib.
15
16 Installation and Configuration
17
18   After installing this package, the module is available but not enabled.
19   It's not enabled automatically since some configuration is required
20   before it will work (at least creating a certificate for the SP to use
21   to authenticate to IdPs).
22
23   To generate a self-signed certificate for the Shibboleth SP, run
24   shib-keygen.  See its manual page for more information.  This may or may
25   not be what you want to do depending on which federation you plan on
26   joining; some federations may want you to follow other procedures for
27   generating a certificate.
28
29   The default error messages from Shibboleth are located in
30   /etc/shibboleth/*.html.  The paths to those error messages are
31   configured in /etc/shibboleth/shibboleth2.xml in the <Errors> tag.  If
32   you customize them, you may want to copy them somewhere else and change
33   /etc/shibboleth/shibboleth2.xml to point to the new locations.  Also in
34   that <Errors> tag you can set the URLs to the logo and style sheet used
35   by the default errors.  If you want to use the default URL (under
36   /shibboleth-sp), add this to your Apache configuration:
37
38     <Location /shibboleth-sp>
39         Allow from all
40     </Location>
41     Alias /shibboleth-sp/main.css /usr/share/shibboleth/main.css
42     Alias /shibboleth-sp/logo.jpg /usr/share/shibboleth/logo.jpg
43
44   For Shibboleth to work properly, you will need to extensively customize
45   /etc/shibboleth/shibboleth2.xml for your site.  In particular, the
46   <ApplicationDefaults> section will have to be customized for the
47   federations your SP will trust and the <CredentialResolver> section of
48   <Applications> needs to list the credentials that your SP will use to
49   authenticate when communicating with IdPs.  Your local site may provide
50   a standard shibboleth2.xml for you to use.
51
52   Finally, you will want to protect some web content with Shibboleth.  The
53   most basic configuration is:
54
55     <Location /secure>
56         AuthType shibboleth
57         ShibRequestSetting requireSession 1
58         require valid-user
59     </Location>
60
61   for some <Location>, <Directory>, or <Files> block.  You can also put
62   similar code in an .htaccess file.  This will require authorization
63   using the default federation defined in /etc/shibboleth/shibboleth2.xml.
64
65 Changes in Debian Package
66
67   The logging configuration for the native.log file has been changed to
68   use syslog, since the upstream default tries to write to a file that
69   Apache has no privileges to write to.  See /etc/shibboleth/native.logger
70   for more details.  If you want the other parts of Shibboleth to also log
71   to syslog, change the other /etc/shibboleth/*.logger files similarly.
72
73   The WS-Trust.xsd schema, which is needed if you use the ADFS support
74   and turn on schema validation, was removed from the Debian package for
75   license reasons.  To enable it again, do the following:
76
77     1. Download the original source from
78        http://shibboleth.internet2.edu/downloads/shibboleth/cppsp/latest/
79
80     2. Extract schemas/WS-Trust.xsd to some convenient location, for
81        example to /etc/shibboleth/WS-Trust.xsd.
82
83     3. Copy /usr/share/xml/shibboleth/catalog.xml into /etc/shibboleth.
84
85     4. Uncomment the WS-Trust line and set its uri attribute:
86        <system systemId="http://schemas.xmlsoap.org/ws/2005/02/trust"
87                uri="/etc/shibboleth/WS-Trust.xsd"/>
88
89     5. Edit /etc/default/shibd to contain
90        DAEMON_OPTS="$DAEMON_OPTS -x /etc/shibboleth/catalog.xml:/usr/share/xml/opensaml/saml20-catalog.xml:/usr/share/xml/xmltooling/catalog.xml"
91
92     6. Restart the Shibboleth daemon: /etc/init.d/shibd restart.
93
94 Testing with TestShib
95
96   If you don't have a local Shibboleth Federation you can easily join but
97   want to test your Shibboleth installation, you can use the TestShib
98   federation (which exists primarily for this purpose).  To do this, use
99   the following instructions (but test them against the details on the
100   testshib.org web pages in case anything has changed):
101
102   1. Go to <http://testshib.org/>, click on Register, and log in with
103      either OpenIDP or ProtectNetwork.  If you do not have an identity
104      with either, create one following the links on that page.
105
106   2. Click on New Service Provider (unless you've already created an entry
107      for this host, in which case select Edit and reuse it).  Enter your
108      hostname, your public certificate, and your first and last name, and
109      then click on Continue.  Verify the information and click on Submit.
110
111   3. Now select Configure, scroll down to Service Provider Configuration,
112      choose Other for the platform, enter your hostname, and click on
113      Create Me.  Save the resulting configuration file as
114      /etc/shibboleth/shibboleth2.xml.
115
116   4. Create some part of your web site that's protected with Shibboleth as
117      described above, restart Apache with apache2ctl restart, restart
118      shibd with /etc/init.d/shibd restart, and then go to that URL.  You
119      should be redirected to the testshib.org IdP, and then get a basic
120      auth dialog box prompting for a username and password.  Enter
121      "myself" and "myself".  You should now be redirected back to your
122      protected page.  The best test page to use is a CGI script that
123      prints out the environment; you can then confirm that you see the
124      Shibboleth attributes as environment variables.  If this doesn't work
125      immediately, wait a few minutes and try again; sometimes the
126      testshib.org metadata takes a little bit to update.
127
128   These directions should work as of June 2008, but note that the
129   testshib.org service may have changed since then.  TestShib is useful
130   *only* for testing, not for any production use.  Those of us who have
131   worked on the Debian package are not affiliated with testshib.org, just
132   personally find it useful, and make no guarantees that it will work
133   properly.  You should read over the shibboleth2.xml file that you
134   download from testshib.org before using it to make sure that there's
135   nothing strange in it.
136
137   If the above instructions don't work or there are changes in the
138   TestShib service, please file a bug against the Debian
139   libapache2-mod-shib2 package and let us know.
140
141 Further Information
142
143   For further installation information, see:
144
145     https://spaces.internet2.edu/display/SHIB2/Home
146
147   and in particular the "Configuration" link.
148
149  -- Russ Allbery <rra@debian.org>, Tue, 10 Nov 2009 15:06:57 -0800