In kubernetes community usage of golang is high and lot of projects are written in this language. It would be nice if SDK would support golang.
While there are currently no bindings for golang, it should be possible with some work to use cgo to have interoperability with the bitwarden_c
crate.
The bitwarden_c
crate exposes a c compatible library with three methods, init
, run_command
and free
, sdk/c.rs at master · bitwarden/sdk · GitHub. There is a C# example which showcases how to use these methods, but in short run_command
exposes a json interface. It should be possible to generate JSON bindings from the SDKs json schemas.
I created a small package that gets items from a local Bitwarden server. I personally use it for scripts where I don’t want to hardcode credentials. It could also be used (at your own risk) in production too. You could even run the Bitwarden client server from its own Docker container if you’d like.
For anyone who is interested, you can find it here: GitHub - floriaanpost/bitwarden: Bitwarden from Go