Hello Shibboleth Users
I’m stuck with having Moodle authenticate over Shibboleth and I can’t really pin down the problem.
We have a ServiceProvider reverse proxy setup (using ApplicationOverride). The SP is version 2.4.2. Currently there is one service running on it and Moodle shall be the second.
The Apache reverse proxy (Apache is version 2.2.3) listens to service.domain.ch, then sends the user to authenticate over Shibboleth (-> WAYF -> IdP -> SP) and if successful uses ProxyPass to redirect the user to the actual web server (service-intern.domain.ch)
To use Shibboleth with Moodle one has to protect only a single directory, which is: /auth/shibboleth/
I’ve configured the Moodle virtual host to do that. But I get an error. When I click on the ‘Login’ link (which points to https://elearning.zhaw.ch/moodle/auth/login/index.php) I get redirected to the WAYF service (so far, so good) and I can select my HomeOrganization. When I hit enter, I don’t reach the IdP but instead get the following message: 404 - The requested URL /Shibboleth.sso/DS was not found on this server.
I can verify that the IdP as well as the SP reverse proxy work as they should when I protect the whole Moodle domain with Shibboleth or a test page in another folder. Meaning I get through the Shibboleth authentication process (I’m not logged in, in Moodle though).
What confuses me is, that somehow the redirection between SP - WAYF - IdP doesn’t work, when only protecting the /auth/shibboleth/ directory, but that does work when protecting the whole domain (which is not the goal). Also I don’t get the error message.
Would someone be able to help me understand what’s going on?
Browsing to http://elearning.zhaw.ch/moodle and clicking on the ‘Login’ link in the upper right corner will send you to the WAYF service. There select ZHAW (or anything else) to see the actual problem. The following will be produced in the log:
[Sat Jul 16 19:15:27 2011] [error] [client 160.85.104.32] File does not exist: /var/www/elearning/Shibboleth.sso, referer: https://wayf.switch.ch/SWITCHaai/WAYF?entityID=https%3A%2F%2Felearning.zhaw.ch%2Fshibboleth&return=https%3A%2F%2Felearning.zhaw.ch%2FShibboleth.sso%2FDS%3FSAMLDS%3D1%26target%3Dcookie%253Ae298e589
Following are the configuration cut-outs of the different files involved in the process.
/etc/shibboleth/shibboleth2.xml
----------------------------------------------------------------------------------------------
<ApplicationOverride id="aaisandbox" entityID="https://aaisandbox.zhaw.ch/shibboleth">
<CredentialResolver type="File" key="/etc/pki/tls/private/aaisandbox.key" certificate="/etc/pki/tls/certs/aaisandbox.pem"/>
</ApplicationOverride>
<ApplicationOverride id="elearning" entityID="https://elearning.zhaw.ch/shibboleth">
<CredentialResolver type="File" key="/etc/pki/tls/private/elearning.key" certificate="/etc/pki/tls/certs/elearning.crt"/>
</ApplicationOverride>
----------------------------------------------------------------------------------------------
/etc/apache2/zhaw.d/vhost_elearning.conf
----------------------------------------------------------------------------------------------
Listen 160.85.104.29:80
<VirtualHost 160.85.104.29:80>
ServerName elearning.zhaw.ch
ServerAdmin servi...@zhaw.ch
<Location />
Options -Indexes +FollowSymLinks
Order deny,allow
Allow from all
</Location>
ProxyRequests off
ProxyPass / http://elearning-intern.zhaw.ch/
ProxyPassReverse / http://elearning-intern.zhaw.ch/
ProxyPreserveHost On
ErrorLog logs/elearning.error.log
CustomLog logs/elearning.access.log common
</VirtualHost>
Listen 160.85.104.29:443
<VirtualHost 160.85.104.29:443>
ServerName elearning.zhaw.ch
ServerAdmin servi...@zhaw.ch
<Location />
Options -Indexes +FollowSymLinks
Order allow,deny
Allow from all
</Location>
<Location /moodle/auth/shibboleth/>
AuthType shibboleth
ShibRequireSession On
ShibRequestSetting applicationId elearning
# ShibUseHeaders On
Require valid-user
</Location>
SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/elearning.crt
SSLCertificateKeyFile /etc/pki/tls/private/elearning.key
SSLCertificateChainFile /etc/pki/tls/certs/qvsslica.crt
SSLProxyEngine on
ProxyRequests off
ProxyPass / http://elearning-intern.zhaw.ch/
ProxyPassReverse / http://elearning-intern.zhaw.ch/
ProxyPreserveHost On
ErrorLog logs/elearning.error.log
CustomLog logs/elearning.access.log common
</VirtualHost>
----------------------------------------------------------------------------------------------
Any help would be very much appreciated.
Thanks in advance,
Stefan