-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Bug] Group Permissions Collection Deletion Issue (Manager role) #4588
Comments
I would like to add an additional note: Promoting the user to Admin removes this problem. So it seems isolated to the Manager role. |
I see according to the bitwarden.com documentation, that the Manager role will no longer exist. So I wonder if the issue above is related to the new web vault changes. https://bitwarden.com/help/user-types-access-control/ Snippet:
|
The issue has nothing to do with the manager role, as that currently is under a feature flag and not enabled for Vaultwarden. We would have to check what the reason here is, or maybe fix the manager to user role right away. |
As far as I've looked into it, the removal will be ignored because Cipher::get_collections() does not have support for collections via groups, so it won't be part of the symmetric difference (if I understand the logic correctly). vaultwarden/src/api/core/ciphers.rs Lines 766 to 770 in f05398a
I've not looked more into why there is no immediate visual indication of this change. (If it works with the bitwarden/server the web-vault might expect the function to return something instead of an |
Did some additional testing incase it helps. It looks like the extension (2024.4.2) is affected as well. People with the User or manager rank will be able to see that they can uncheck a collection from a password entry using the Bitwarden extension. On the latest web vault version in testing, you will see those collections are greyed out and unable to be modified. |
While trying to fix the issue I've run into couple of scenarios where it would either not work for Admins/Owners (deleting the collections which aren't visible for an Admin/Owner in the Password Manager, or not being able to delete collections even though they have been unselected) or there would still be a problem with Managers because for them it's also important whether or not they have write access to a collection (because read-only collections will still be visible/selectable in the Admin Console but hidden in the Password Manager). Also updating the collections in the Admin Console sometimes caused an exception for Managers or for Admins/Owners by switching to the Admin Console. Testing the different cases is a bit tedious because I need to use at least two different accounts (with Manager and Admin or Owner role) assigned to different collections and not using the So I understand why Bitwarden decided to get rid of the current approach and use their more flexible permission system which you can probably check for more easily. (E.g. only get those collections where you have the But now I'm wondering if we should not get rid of the manager role and the access all flag as well and implement custom permissions instead. |
Preferably it'd probably be best to go forward with the custom permissions, if that's the way Bitwarden has already went. |
It also needs flexible collections then and a migration code for it. |
I am still trying to fix the bug with the current approach, so not sure if it is required right now. But eventually we probably want/have to implement flexible collections and migrate to the new approach. 🙈 |
You're probably right. Over the last few days, we have been playing around with groups and collections (although most of the problems are likely to occur even without groups). Group A shares something with group B. Group B can share it with group C without group A noticing. Group A shares something with group B by reading it. As you have already noticed: If a group has read-only access to collections, the webui sometimes allows editing of functions that are actually not permitted. Sometimes this is acknowledged with an error message (...cipher....), sometimes the dialog simply closes and the setting has not been changed. In my opinion, the balancing act is that a role has priority over the collection rights and at the same time the same users should be restricted via rights to the collections. P.S. Thank you stefan0XC for the quick fix to the problem with the Directory Connector. I just got around to compiling it and will try to test it tomorrow. |
Subject of the issue
When a user is in the manager role and has permissions to collections via the beta feature groups, they will be unable to delete collections from the password entry. Initially it will look like the change succeeded, but if you reload the page you will notice the collection is checked again.
Deployment environment
vaultwarden version: Tested on both 1.30.5 and testing docker branches
Install method: Docker
Clients used: Web Vault and Bitwarden Extension (Primarily tested the bug using Web Vault)
Reverse proxy and version: Nginx Proxy Manager
MySQL/MariaDB or PostgreSQL version: PostgreSQL
Other relevant details:
Steps to reproduce
To reproduce:
NOTE: If you add the test user to the groups directly, this bug goes away. This only is reproducible if the collection the user has access to was granted via groups.
Expected behavior
Collection should be revoked from the password entry.
Actual behavior
Collection is not revoked from the password entry.
The text was updated successfully, but these errors were encountered: