Skip to content
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

Feature flag to required old password as confirmation when setting a new password #3981

Open
5 tasks done
tricky42 opened this issue Jul 2, 2024 · 0 comments
Open
5 tasks done
Labels
feat New feature or request.

Comments

@tricky42
Copy link
Contributor

tricky42 commented Jul 2, 2024

Preflight checklist

Ory Network Project

No response

Describe your problem

A common best practice is to required the user to provide the old password as part of defining a new password. Currently, Kratos does not provide a setting to enforce this as Kratos uses the concept of privileged sessions (https://www.ory.sh/docs/kratos/session-management/session-lifespan#privileged-sessions).

By setting a short privileged_session_max_age value, you can essentially enforce the requirement of reentering the old password to change it.

To make this behavior more explicit, it would be nice to introduce a feature flag that, if set to true, requires providing the old password when setting a new password.

Describe your ideal solution

Add a feature flag that, if set to true, requires the old password to be specified when setting a new password. If the old password is not provided or is incorrect, setting the new password fails. The behavior is not dependent on the value of privileged_session_max_age and the authenticated_at value of the current session.

Workarounds or alternatives

A current workaround achieving a similar behavior is defining a low value for privileged_session_max_age.

Version

Ory Network

Additional Context

No response

@tricky42 tricky42 added the feat New feature or request. label Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request.
Projects
None yet
Development

No branches or pull requests

1 participant