mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2026-02-05 00:29:40 +03:00
2FA Policy not enforced after removing a users 2FA through the Admin interface #1667
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @FreeMinded on GitHub (Aug 26, 2023).
Subject of the issue
The Admin Panel allows to remove 2FA configurations from a user (which is great). Unfortunately the user is neither removed from the organization nor requested to setup 2FA again at the next login if he is part of an organization with 2FA Policy. The user still has full access to this organization. So it’s a way to circumvent the 2FA policy, presenting a security flaw.
See Forum Discussion
Deployment environment
Vaultwarden Version 2023.5.0
Steps to reproduce
Expected behaviour
With the removal of the 2FA settings for a user in the /admin Interface the user should be removed from any organization with 2FA policy.
This would be consistent with the current behavior. When a user removes his 2FA settings himself, he gets removed from all organizations with 2FA policy.
Actual behaviour
User still has access to organization with 2FA policy despite not having 2FA configured.
@BlackDex commented on GitHub (Aug 26, 2023):
Looks like we need to remove/disable a user if they disable/remove there 2FA, this is currently not the case.
Thanks for the report.
Keep in mind that a Owner or Admin is always able to login and access the Org, with or without 2FA enabled.
@FreeMinded commented on GitHub (Aug 26, 2023):
@BlackDex yes, I realized that. What is the reason for this behavior? Would make sense to enforce 2FA for owners and admins as well, doesn't it?
Actually thinking of it, this would be the argument for blocking access to an organization rather than remove the user from it completely when lacking 2FA. Otherwise you might have no one left to invite the user again. 🙈