-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow admins to prevent password reuse #230
Comments
This was referenced Jun 4, 2024
Open
signebedi
added a commit
that referenced
this issue
Jun 5, 2024
signebedi
added a commit
that referenced
this issue
Jun 5, 2024
signebedi
added a commit
that referenced
this issue
Jun 5, 2024
signebedi
added a commit
that referenced
this issue
Jun 5, 2024
signebedi
added a commit
that referenced
this issue
Jun 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This probably entails a new table, PasswordReuse or something like that.
And we set some application configs like LIMIT_PASSWORD_REUSE: bool and PASSWORD_REUSE_PERIOD: int. The latter config should be construed as a timedelta in days, with 120 days as the default and, if set to 0, then password reuse is never permitted. Then, when users change their passwords (using the change_password or forgot_password options), we can query this table where user=current_user and timestamp is within the PASSWORD_REUSE_PERIOD and, if the current hashed password matches any that are in the table, then we return an error.
I think the errors can be descriptive ("You have tried to change your password to a value that you have used within the last {PASSWORD_REUSE_PERIOD} days. Please try a different password.") because there are two instances where a user will be changing their password: first, when they are logged in already and using the change_password route; second, when they have used the forgot_password option but have already verified access to their email on file.
We should write to this table in five instances: first, when a user is initially created, with their starting password; second, when admins create a user; third when they users change their password; fourth, when users forgot their password and need to reset; fifth, when admins reset the user's password.
We should also be sure to propagate this logic to the CLI.
The text was updated successfully, but these errors were encountered: