Problem/Motivation

I've seen a few posts that sort of touch on this issue, but I just want to confirm that it's a known issue that when using the LDAP Single Sign On module, the masquerade module does not work and simply logs the user out.

Is the only solution at this time, to not use the Masquerade module if using the LDAP Single Sign On module?

Thanks in advanced.

Steps to reproduce

Proposed resolution

Document that you cannot use "Redirect users on logout" with Masquerade in the LDAP Single Sign On module:

Recommended to be set for most sites to a non-SSO path. Can cause issues with immediate cookie invalidation and automated SSO. Conflicts with Masquerade and Devel module.

See #2889863: LDAP conflicts with Masquerade 2.0.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Stephen Ollman created an issue. See original summary.

andypost’s picture

I guess it could be issue on both ends, so check related issue

rgristroph’s picture

Version: 8.x-2.0-beta1 » 8.x-2.0-beta2

I am seeing this with beta2 version of masquerade and the beta7 version of ldap_sso.

rgristroph’s picture

I have a work-around: if you don't set the ldap_sso option to redirect on logout, then it works. Note that the masquerade module calls the user_logout() hook, which I think is where the conflict is coming from.

Note this issue over on the ldap_sso module: https://www.drupal.org/project/ldap_sso/issues/2889863

markusd1984’s picture

is this also/still affecting 7.x-1.x-dev (with ldap_sso 7.x-2.2) ?

andypost’s picture

ressa’s picture

Title: Masquerade with LDAP SSO » Masquerade with LDAP Single Sign On
Issue summary: View changes
Status: Active » Fixed
Related issues: +#2889863: LDAP conflicts with Masquerade 2.0

In December 2020, the LDAP SSO module added the workaround kindly shared by @rgristroph under the "Redirect users on logout" field (#2889863-8: LDAP conflicts with Masquerade 2.0), to raise awareness about this situation, when using Masquerade with LDAP Single Sign On:

$form['login']['redirectOnLogout'] = [
  '#type' => 'checkbox',
  '#title' => $this->t('Redirect users on logout'),
  '#description' => $this->t('Recommended to be set for most sites to a non-SSO path. Can cause issues with immediate cookie invalidation and automated SSO. Conflicts with Masquerade and Devel module.'),
  '#default_value' => $config->get('redirectOnLogout'),
];

From https://git.drupalcode.org/project/ldap_sso/-/blob/8.x-4.x/src/Form/Ldap...

So since the workaround has been documented (to alert the users) answering the original question in this issue ("Is the only solution at this time, to not use the Masquerade module if using the LDAP SSO module?") perhaps this issue can be closed?

Maintainers should grant credit for the great work to the relevant users: https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett....

Feel free to re-open, for example to add a sentence in the Masquerade README, if it could be worth considering?

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

ressa’s picture

I added a tip about this in the MR for updating the Masquerade README, under "Configuration":

If you use the LDAP Single Sign On module, you need to disable "Redirect users on logout" in LDAP Single Sign On settings.

From https://git.drupalcode.org/issue/masquerade-3330972/-/tree/3330972-chang...

Status: Fixed » Closed (fixed)

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