I'm running simplesamlphp_auth behind a reverse proxy - which (with a few configuration tweaks to simplesaml config) works, until the final redirect by simplesaml - which goes to the wrong URI.

This is because as it stands, the simplesaml library code calls \SimpleSAML\Utils\HTTP::getSelfURL(); which doesn't respect the drupal-configured reverse proxy variables. This means that RelayState is set to (eg) http://localhost:8080/saml_login (The problem is that port here is incorrect - it should be 80, not 8080).

Issue 2788573 reports the same issue (although doesn't suggest resolution). The corresponding discussion on simplesamlphp points out the problem and suggests a fix - to include a ReturnTo parameter when calling requireAuth().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SimonPhillips created an issue. See original summary.

SimonPhillips’s picture

Here's a patch which fixes the issue

  • SimonPhillips authored 44f8346 on 8.x-3.x
    Issue #2856127 by SimonPhillips: Module doesn't work behind reverse...
snufkin’s picture

I like this approach. I'll merge it in, please let me know if it resolves the issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.