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

Switch bwcli to using the new bw serve command #17

Open
firecat53 opened this issue Apr 12, 2022 · 0 comments
Open

Switch bwcli to using the new bw serve command #17

firecat53 opened this issue Apr 12, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@firecat53
Copy link
Owner

firecat53 commented Apr 12, 2022

Bitwarden CLI v1.22.0 added a serve option to interact with the vault using a REST API. It seems faster than calling commands via subprocess, although need to wait to actually finish it publicly until they release the fix that binds the API to localhost. Right now it's wide open to the network.

Basic interaction:

items = 'http://localhost:8087/unlock'
headers = {'accept': 'application/json'}
payload = {'password': 'mypassword'}
res = requests.get(items, headers=headers, json=payload)

Probably start bw serve either in the main server process or perhaps in a separate thread that can be restarted with a different BITWARDENCLI_APPDATA_DIR to allow multiple vaults to be accessed.

@firecat53 firecat53 added the enhancement New feature or request label Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant