You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When both external LDAP authentication and local user/password authentication are in use and a user (authenticating via LDAP) has been disabled, it is not possible to re-enable said user without setting an additional local Synapse user password. This makes it virtually impossible to re-enable a deactivated LDAP user.
Steps to reproduce
Login for the first time using external LDAP authentication. The user is then touched in the Synapse DB with an empty password_hash. The user admin api will return:
curl -X PUT -H "Authorization: Bearer ${token}" -H "Content-Type: application/json" \
-d '{"deactivated":false}' \
"http://127.0.0.1:8008/_synapse/admin/v2/users/@user:server.com"
{"errcode":"M_UNKNOWN","error":"Must provide a password to re-activate an account."}
Trying to re-activate with explicitly setting the password to null fails too:
Not relevant for this issue, but setting the password to an empty string "" is possible and will set a password_hash (not sure when this would be desirable):
matrixbot
changed the title
Dummy issue
Re-activating account is impossible when using external (LDAP) authentication (with local users/passwords enabled)
Dec 21, 2023
Closes:
- matrix-org/synapse#10397
- #10397
An administrator should know whether he wants to set a password or not.
There are many uses cases where a blank password is required.
- Use of only some users with SSO.
- Use of bots with password, users with SSO
This issue has been migrated from #10397.
Description
When both external LDAP authentication and local user/password authentication are in use and a user (authenticating via LDAP) has been disabled, it is not possible to re-enable said user without setting an additional local Synapse user password. This makes it virtually impossible to re-enable a deactivated LDAP user.
Steps to reproduce
Login for the first time using external LDAP authentication. The user is then touched in the Synapse DB with an empty
password_hash
. The user admin api will return:Deactivate the account:
Trying to re-activate the account will fail:
Trying to re-activate with explicitly setting the password to
null
fails too:Not relevant for this issue, but setting the password to an empty string
""
is possible and will set apassword_hash
(not sure when this would be desirable):Possible solution
Allowing to explicitly set
{"password":null}
in the User Admin API while re-activating the user should solve this.Version information
The text was updated successfully, but these errors were encountered: