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

BW serve creating a new collection with specifying group(s) does not add group(s) to new collection #10985

Open
1 task done
MaxKeller12 opened this issue Sep 11, 2024 · 9 comments
Labels
bug cli CLI Application

Comments

@MaxKeller12
Copy link

Steps To Reproduce

  1. Create a new collection by making a POST request on url /object/org-collection. Specify groups in the request body
  2. Refresh your bitwarden web interface
  3. Check the access tab for the new collection

Expected Result

The specified group has access to the new collection.

Actual Result

The specified group has no access to the new collection.

Screenshots or Videos

No response

Additional Context

No response

Operating System

Linux

Operating System Version

Ubuntu 22.04.4 LTS

Shell

Bash

Build Version

2024.8.2

Issue Tracking Info

  • I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
@MaxKeller12 MaxKeller12 added bug cli CLI Application labels Sep 11, 2024
@MaxKeller12
Copy link
Author

Also, when i update an item using PUT on object/item/{id} I can for example, succesfully update the item name. However, when I want to change collectionIds, the request is accepted but the changes have not taken effect.

@Krychaz
Copy link
Member

Krychaz commented Sep 12, 2024

Hello,

Have you tried running bw sync after making the changes?

@MaxKeller12
Copy link
Author

Yes I have.

When I update an item and then retrieve it using the API, the updated item is shown. However, when I update an item, execute BW sync, or use the API equivalent, and then retrieve the item using the API, it shows me the old, non-updated version.

In both cases, the item is not actually updated in my vault when I refresh the web interface.

@Krychaz
Copy link
Member

Krychaz commented Sep 16, 2024

Can you please share you full command that you are using? (Remove any personal info)

@MaxKeller12
Copy link
Author

MaxKeller12 commented Sep 16, 2024

Sure, just to be complete, first a working update; updating item name:

image

I first get the item and use this response to populate my request body in which i update name to 'new name'. The item name is indeed updated.

Now I want to add this item to a second collection.

image

I again first get the item and use the response to populate the request body in which i add an collection_id to the list of collectionIds. The item is however not updated.

@Krychaz
Copy link
Member

Krychaz commented Sep 17, 2024

Are you encoding your edits? - https://bitwarden.com/help/cli/#encode

["<new_collection_id>"]' | bw encode

@MaxKeller12
Copy link
Author

Are you encoding your edits? - https://bitwarden.com/help/cli/#encode

["<new_collection_id>"]' | bw encode

No because I don't think I need to, right? I am using the vault management API with bw serve, https://bitwarden.com/help/vault-management-api/. I am following the documentation I can find there:

image

@Krychaz
Copy link
Member

Krychaz commented Sep 19, 2024

Thank you for your patience and cooperation.

After testing different scenarios, this is indeed a bug. Editing the item collection ID should allow you to change the collection, but it currently does not. I have reported this to our engineering team.

@MaxKeller12
Copy link
Author

Thank you! Could you also review the process of creating a new collection while specifying group(s) with bw serve? In my experience, this doesn’t work either.

Looking forward to the fix! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug cli CLI Application
Projects
None yet
Development

No branches or pull requests

2 participants