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

Account recovery administration not enforcing Single orginization policy to be enabled. #4855

Closed
D4zed4ndC0nfused opened this issue Aug 14, 2024 · 3 comments · Fixed by #4903
Assignees
Labels
enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided

Comments

@D4zed4ndC0nfused
Copy link

Subject of the issue

Account recovery administration is not enforcing "Single orginization" policy to be enabled. You are able to enable the "Account recovery administration" organization policy without the "Single organization" policy being enabled.

Deployment environment

  • vaultwarden version: 1.32.0
  • Install method: Docker through tag: vaultwarden/server:1.32.0

  • Clients used:

  • Reverse proxy and version: nginx

  • MySQL/MariaDB or PostgreSQL version:

  • Other relevant details:

Steps to reproduce

Enable the Account recovery administration without the Single Organizaton policy being enabled.

Expected behaviour

Not being able to enable it.

Actual behaviour

You can enable it

Troubleshooting data

image

@louisfgr
Copy link

I mentioned this some time ago in #4113. I'm afraid that this requirement could cause some problems for users who need access to multiple organizations if those organizations don't want to give up the account recovery option.

Even though I think this requirement makes sense for Bitwarden's use case, I find it impractical for Vaultwarden.
Especially since it was recommended to use organisations before group support was introduced (#1623).

Regardless of this, the warning in the policy settings should of course be in line with reality, whether this means adjusting the functionality or the warning.

@D4zed4ndC0nfused
Copy link
Author

D4zed4ndC0nfused commented Aug 16, 2024

Not sure how I missed your earlier post about this. I apologize for this.

One concern about this setting not being enforced is if you reset User A's password, you can gain access to other organizations which that User A is also a part of. I suspect that this might be the reason for the inital setting of enforcing one organization per user with this policy.
My (possible wrongfull) impression is that organiazitons are suppose to be kind of indepentent from each other. This not being enforced kinda negates that.

@BlackDex
Copy link
Collaborator

The only way i can see to fix this issue is to add another config option which will enforce this option if wanted/needed.
Which we could make a default in a later release for example.

@BlackDex BlackDex added enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided labels Aug 19, 2024
BlackDex added a commit to BlackDex/vaultwarden that referenced this issue Aug 28, 2024
Bitwarden only allows the Reset Password policy to be set when the Single Org policy is enabled already.
This PR adds a check so that this can be enforced when a config option is enabled.

Since Vaultwarden encouraged to use multiple orgs when groups were not available yet we should not enable this by default now.
This might be something to do in the future.

When enabled, it will prevent the Reset Password policy to be enabled if the Single Org policy is not enabled.
It will also prevent the Single Org policy to be disabled if the Reset Password policy is enabled.

Fixes dani-garcia#4855

Signed-off-by: BlackDex <black.dex@gmail.com>
@BlackDex BlackDex self-assigned this Aug 28, 2024
rkube-rvk pushed a commit to reveko/vaultwarden that referenced this issue Oct 10, 2024
* Allow enforcing Single Org with pw reset policy

Bitwarden only allows the Reset Password policy to be set when the Single Org policy is enabled already.
This PR adds a check so that this can be enforced when a config option is enabled.

Since Vaultwarden encouraged to use multiple orgs when groups were not available yet we should not enable this by default now.
This might be something to do in the future.

When enabled, it will prevent the Reset Password policy to be enabled if the Single Org policy is not enabled.
It will also prevent the Single Org policy to be disabled if the Reset Password policy is enabled.

Fixes dani-garcia#4855

Signed-off-by: BlackDex <black.dex@gmail.com>

* Removed some extra if checks

Signed-off-by: BlackDex <black.dex@gmail.com>

---------

Signed-off-by: BlackDex <black.dex@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request low priority Won't fix anytime soon, but will accept PR if provided
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants