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

[v14] Stop users from deleting their last passwordless device #35855

Merged
merged 2 commits into from Dec 18, 2023

Conversation

codingllama
Copy link
Contributor

Backport #35794 to branch/v14.

Stop users from deleting their last passwordless device in a passwordless-capable cluster.

In certain situations, like clusters with "second_factor:optional", it's possible to delete all your MFA devices. A pure passwordless user could lock themselves out by doing so.

This PR makes it impossible to delete your last passwordless device (if the cluster allows passwordless logins), preventing those lockouts at the cost of being more restrictive for "normal" users.

#32690

Changelog: Stop users from deleting their last passwordless device

@codingllama
Copy link
Contributor Author

Production code ported cleanly, but tests are missing various refactors I did when deprecating MFA streams - see #20343 (comment). There are a few tweaks on things like client names (no authClient or userClient variables) and the addition of "initReqs" (not used anymore on master).

I also found out that the WithPasswordless() test option wasn't working, so fixed that one too.

@codingllama codingllama added this pull request to the merge queue Dec 18, 2023
Merged via the queue into branch/v14 with commit 474a5a3 Dec 18, 2023
26 checks passed
@codingllama codingllama deleted the codingllama/backport/35794-v14 branch December 18, 2023 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants