Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Howdy,
I'm having an issue and I'm wondering if anyone else is experiencing it. We use SAML to log into our Drupal site (SAML is a Single Sign-On authentication method). Once I login and I attempt to masquerade as another user, the site simply logs me out.
When I login via the typical /user path, Masquerade works as normal.
Any ideas?
Comment | File | Size | Author |
---|---|---|---|
#9 | 2124113-cant-masquerade-with-saml-installed.patch | 756 bytes | Barnettech |
Comments
Comment #1
anishv CreditAttribution: anishv commentedI am also facing the similar issue. I am using https://drupal.org/project/simplesamlphp_auth module for SAML. Once enabling this module, Masquerade not working. On selecting a user to switch, it is redirecting to SAML logout url. Its not working for both drupal user and SSO user. If disabling simplesamlphp_auth module, Masquerade works fine.
Couldn't find any solution yet. Appreciate any help.
Thanks
Comment #2
bobojo CreditAttribution: bobojo commentedI seem to be experiencing the same issue, but I'm using LDAP to login.
Comment #3
umberto. CreditAttribution: umberto. commentedWe have the same issue when login via shibboleth auth.
The difference is that it looks like you have been logged off bat is not true, it append only the first time you try to masquerade in a session, from the second tìme every think goes fine.
Comment #4
bobojo CreditAttribution: bobojo commentedIf it helps, I just noticed that on one of my sites, which uses LDAP authentication most of the time, the same problem occurs even when I'm logged in locally as user 1.
Comment #5
chustedde CreditAttribution: chustedde commentedIt seems like the core of this issue is that Masquerade invokes all hook_user_logout() functions, and in the case of the simpleSAMLphp_auth module, that kicks you out of the site entirely. I'm guessing the issues with LDAP and shib are similar.
Replacing the
module_invoke_all('user_logout', $user)
lines withmasquerade_user_logout($user)
lets me masquerade without being kicked out, but I haven't had a chance to test what side effects this may cause.Comment #6
andypostMaybe that's related #1813696: Set/unset Session flag when masquerade status changes.
Comment #7
andypostComment #8
Barnettech CreditAttribution: Barnettech commented#5 above worked for me btw.
Comment #9
Barnettech CreditAttribution: Barnettech commented#5 worked for me, with saml setup I'm able to masquerade again, and saml is still working great. Here is the patch to be approved.
Comment #11
deekayen CreditAttribution: deekayen as a volunteer commentedI applied this, though I've long considered 7.x-1.x frozen. I won't be tagging a new point release, so you'll have to git clone or wait for the next tar snapshot.
Comment #12
umberto. CreditAttribution: umberto. commented#5 works for me too with shib_auth module installed