YunoHost-Apps / synapse_ynh

Matrix server (synapse) package for YunoHost
https://matrix.org/
GNU General Public License v3.0
79 stars 42 forks source link

Password reset breaks SSO #295

Closed ibeckermayer closed 2 years ago

ibeckermayer commented 2 years ago

Describe the bug

A user can break the CAS SSO integration by logging in initially with CAS, then resetting their password through a web interface (I used Element). After doing that, they are able to log in via the Element interface with both the CAS (YunoHost) password, and the newly reset password.

I'm denoting this as "broken", because user management is no longer entirely centralized with the YunoHost administrator. For example, if an administrator goes into the YunoHost admin panel deletes the user that did the reset, that user can still log in using their secondary, reset password.

Context

Steps to reproduce

  1. Log in via an Element client using CAS or your YunoHost user credentials
  2. Reset your password through the interface.

Expected behavior

My guess as to what's happening when the user resets their password is that an entry in a users table is being updated with the reset password. Then, when a user logs in, the server first tries using CAS, and then if that fails it falls back to the local system. If that's the case, then the SSO-breakage could be solved by disabling the fallback logic.

Ideally auth features like password reset could be turned off in the interface via communication from the server, though I don't think that's feasible at the moment.

Logs

N/A

Josue-T commented 2 years ago

I'm closing as it's mostly an upstream issue