vals icon indicating copy to clipboard operation
vals copied to clipboard

Feature: Add support for Bitwarden Vault and password manager

Open MurzNN opened this issue 4 years ago • 8 comments

Bitwarden Vault is a popular e2ee opensource password manager, with very good ability to share passwords between teams! It also provides command line interface, description is here https://bitwarden.com/help/article/cli/

So will be good to see integration of Bitwarden with vals too, is it hard to implement?

MurzNN avatar Dec 14 '21 07:12 MurzNN

@MurzNN Hey! Thanks for writing this up.

is it hard to implement?

Honestly, I'm not sure. But anyway- I intend to add support for backends that provides mature Go sdk/client which is crucial to keep this project maintainable. Does bitwarden provides such sdk/client?

mumoshu avatar Dec 14 '21 08:12 mumoshu

Seems something like this exists here: https://github.com/arhat-dev/bitwarden-api-go Also here https://github.com/VictorNine/bitwarden-go is another implementations, but seems abandoned :(

MurzNN avatar Dec 14 '21 08:12 MurzNN

Hey @mumoshu and @MurzNN, sorry for bringing up such an old thread, but now BitWarden has its own “Secrets Manager” that is a K/V store. Also, they now have the monorepo https://github.com/bitwarden/sdk with a GoLang example.

Yesterday I was playing with the Go example to adapt to Vals… the thing is: the Golang would be just “a shell”/"wrapper" calling the “libbitwarden_c.so”. It means, “vals” and helmfile would need to have the library exported on the LD_LIBRARY_PATH to work.

Also, they don't provide an “easy to use” SDK, to build the Golang part we would need to clone their repo, run some cargo and npm commands, and then build our stuff. It is easy to understand reading the Dockerfile from my example app.

What do you guys think about it?

carnei-ro avatar Dec 12 '23 12:12 carnei-ro

@yxxhero hey, sorry to tag you, but I think your thoughts about my last post ^ would be appreciated 😊

carnei-ro avatar Dec 13 '23 12:12 carnei-ro

@mumoshu WDYT?

yxxhero avatar Dec 13 '23 12:12 yxxhero

If the library integration is too tough, maybe just use the bitwarden cli tool bw?

So, to retrieve the password from a string like ref+bitwarden://35ab2e78-7d47-49e5-b72f-d8c7cbc32531/password we need just to run the command like:

bw get password 35ab2e78-7d47-49e5-b72f-d8c7cbc32531

and that's it!

MurzNN avatar Jan 03 '24 06:01 MurzNN

And even more, seems we can implement a cli plugin that will just compose the command from a ref, and parse the resulting output. But this smells more like a great general idea, so I filled a separate feature request about it: https://github.com/helmfile/vals/issues/193

MurzNN avatar Jan 03 '24 06:01 MurzNN

oh, I missed this issue. The bw cli has a REST-API with bw serve. I described a way I would like to implement it here: #276

smerschjohann avatar Mar 17 '24 14:03 smerschjohann