On a site supporting external authentication from services other than SAML-based ones, a user account with an authmap record for a non-SAML provider will see that record wiped if user form is submitted with the "Enable this user to leverage SAML authentication" checkbox disabled. This is due to ExternalAuth/Authmap not supporting clearing of authmap records by both uid and provider, but just by uid.
A possible fix is being worked on at #3070335: Using multiple auth providers results in all auth data being wiped for a user; simplesamlphp_auth itself will also require an update once externalauth gets the proper support in place. The code to change is located at simplesamlphp_auth_user_form_submit() (.module file).
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3123959-simplesamlphp_auth-selective-authmap-delete-on-save-4.patch | 473 bytes | jedihe |
Comments
Comment #2
jedihe commentedComment #3
jedihe commentedPatch attached. It requires patching externalauth with #3070335: Using multiple auth providers results in all auth data being wiped for a user / #4.
Comment #4
jedihe commentedComment #5
ctrladelApplied both patches and everything is now working as expected for me, simplesamlphp_auth is no longer removing mappings from other auth providers.
Comment #6
jedihe commentedGreat! thx @ctrlADel for testing and reporting.
Keeping as "Active"; we should switch to "Needs Review" once the patch in externalauth is accepted. That is, if the accepted version of that patch is compatible with the code change in #4.
Comment #7
kingdutchRelated issue is merged, lets move this along :D
Comment #8
albertski commentedI'm also using the CAS module and found that when editing a user that was created via CAS, it deletes the record from the authmap table. Verified and tested that this patch looks good.
Comment #9
czigor commented#4 works for us too.
Since this is causing data loss, raising it to major.
Comment #11
berdirCommitted to 4.x.