This is a guide to using Tomcat and Apache Web Server to manage authentication with IDP3 ECP – specifically, using the web server to manage the authentication.
The Shibboleth IDPv3 offers a simpler approach for basic password authentication that requires fewer steps than outsourcing the authentication to Tomcat or Apache.
Install Shibboleth IDP3 following the instructions for Tomcat (currently at Installation). It is strongly recommended to perform the status test described in the installation guide.
Edit conf/idp.properties. Set idp.auth.flows to RemoteUserInternal.
Edit the server.xml file in your Tomcat conf directory ($CATALINA_HOME/conf/server.xml if you’re running Tomcat as a standalone server). In the section where it defines the AJP connector port (8009), set Tomcat authentication to "false." We want the Apache web server, not Tomcat, to handle the authentication with this particular setup.
<!-- Define an AJP 1.3 Connector on port 8009 -->
Since both Apache and Tomcat need to be running, and we’ll want to be able to access Shibboleth through port 443 (HTTPS), we’ll need to use Apache web server’s AJP module to send IDP traffic over to Tomcat. We can do this by editing the proxy_ajp.conf file, which on our Centos 6 system is located at /etc/httpd/conf.d/proxy_ajp.conf . Add the following line to the end of the file:
Because we want the Apache web server to manage the authentication, we’ll need to edit the configuration files on the web server to protect the directory. There are some different ways to do this, depending on what kind of authentication you want to use. Below are some examples:
Kerberos (/etc/httpd/conf.d/auth_kerb.conf on our system)
LDAP (/etc/httpd/conf.d/authz_ldap.conf on our system)
Basic (/etc/httpd/conf.d/auth_basic.conf on our system)
After making changes to Apache, you will need to restart the server. On our system, "sudo /sbin/service httpd restart" will do this.
Note: You may be able to troubleshoot by creating a test location (like /var/www/html/TestMyAuthentication) and putting a simple index.html file in it and then setting up the web server to protect those files. Just pull up http://www.yourserver.org/TestMyAuthentication in your browser and see if the web authentication works as expected.
As an intermediate step, you may want to see whether it’s possible to log into your IDP at all. There’s a relatively simple script at http://www.cilogon.org/ecp called testecp.sh . Note that for IDP 3, all the test scripts have been modified to set the content type header to text/xml. This is because curl by default will set an inappropriate content type application/x-www-form-urlencoded) that IDP 2 would tolerate, but IDP 3 will not. If you want to use testecp.sh to see whether you can log into the IDP before setting up the metadata related to SPs, you will need to make a few (possibly temporary) changes to your configuration. To make your IDP "open," you can edit the conf/relying-party.xml file to support an UnverifiedRelyingParty.
<bean id="shibboleth.UnverifiedRelyingParty" parent="RelyingParty">
You may also need to set idp.encryption.optional to true in conf/idp.properties
idp.encryption.optional = true
To work with the other testing scripts, you will probably need to configure your metadata related to Service Providers. The directions for that are at Configuration.
After you are done making changes to Tomcat, you will need to restart it.
For troubleshooting, you can adjust your log levels by editing the conf/logback.xml file. For example, you might try changing some of the levels to "debug."
If you get a SOAP error, you may want to double-check the test script you’re using and verify that it’s been updated to set the content type to "text/xml."