mvdan / bitw

Minimalist BitWarden client
BSD 3-Clause "New" or "Revised" License
169 stars 15 forks source link

Feature request: Store passwords #21

Open Mic92 opened 4 years ago

Mic92 commented 4 years ago

Right now the DBUS api does not allow to store secrets:

(gnome-calendar:15788): e-data-server-ui-WARNING **: 09:12:46.451: credentials_prompter_store_credentials_cb: Failed to store source credentials: Object does not implement the interface
mvdan commented 4 years ago

Sure. I only implemented the bare minimum to get queries over dbus working.

Mic92 commented 4 years ago

If this would be implemented using synchronous API calls it should be comparable simple. With offline support this becomes a lot harder.

mvdan commented 4 years ago

The bitwarden APIs are always the source of truth. The dbus daemon mode might gain the ability to sync with the server automatically in the future. I don't think you need to worry about an offline mode.

mvdan commented 3 years ago

The commit above adds support for encrypting data, so the crypto part is now done. This issue would just need to wire up the logic: some way to update a secret (probably via d-bus), and then some way to sync that with the API server.

michaelk83 commented 3 years ago

some way to update a secret (probably via d-bus)

Assuming the org.freedesktop.secrets interface, that would be org.freedesktop.Secret.Collection.CreateItem() and maybe org.freedesktop.Secret.Item.SetSecret(). Most client apps would be using libsecret to talk to org.freedesktop.secrets, so you should check which DBus methods it uses.