Skip to content

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

Merged
codingllama merged 2 commits intobranch/v14from
codingllama/backport/35794-v14
Dec 18, 2023
Merged

[v14] Stop users from deleting their last passwordless device#35855
codingllama merged 2 commits intobranch/v14from
codingllama/backport/35794-v14

Conversation

@codingllama
Copy link
Copy Markdown
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
Copy Markdown
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
@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.

3 participants