Search code examples
phpdrupalsimplesamlphp

Drupal SAML login redirect not working


I'm configuring SSO by SAML for Drupal, I tested the SP login through SimpleSAMLphp's panel and it works. I installed simplesamlphp_auth for drupal and enabled authentication via SimpleSAMLphp.

When I go to https://mydrupal.com/saml_login, the browser starts to redirect (some long URL with disco.php) then stops with a 404. The SP simply logs, and rightly so:

session not valid because we are not authenticated.

I'm certain this is a drupal or a module config (not the SP or IdP as those are tested and work), what am I doing wrong ?

Should my SP absolutely use Memcache as a store ?

Update:
Recent log entries mention SimpleSAMLphp can't find disco.php

page not found 2016-01-18 16:33 simplesamlphp/module.php/saml/disco.php

Should the ServerName in my VirtualHost config for the SP match the drupal url or is that irrelevant ?


Solution

  • I don't know if that's the way one is supposed to configure simpleSAMLPHP as an SP alongside Drupal, but instead of using a separate VirtualHost for the SP, I added it to the Drupal one making sure the Alias worked. The trick was that my Drupal was running in a SSL VirtualHost while the SP was on a different HTTP only port, that's why the redirect never worked. The "force https for login" checkbox in the Drupal module config is completely useless