Repository navigation
Add 'Search Bitwarden Vault Items' Extension - #67
Conversation
left a comment
There was a problem hiding this comment.
This is a really nice first pass! Most of my comments are around UX, but one big code-related takeaway is that we should never be calling a bw CLI command inline within one of the extension's commands. It would be much safer and more reusable to instead create a new file containing a legitimate bw SDK, that exports functions wrapping those CLI calls. Let me know if that's unclear, or if you want some help getting started on an implementation for that.
| "commands": [ | ||
| { | ||
| "name": "list", | ||
| "title": "Search Vault Items", |
There was a problem hiding this comment.
| "title": "Search Vault Items", | |
| "title": "Search Vault", |
There was a problem hiding this comment.
Agree with Phil, "Search Vault" sounds better, items doesn't add much value here.
Co-authored-by: Phil Salant <[email protected]>
Co-authored-by: Phil Salant <[email protected]>
Co-authored-by: Phil Salant <[email protected]>
Co-authored-by: Phil Salant <[email protected]>
Co-authored-by: Phil Salant <[email protected]>
Co-authored-by: Phil Salant <[email protected]>
left a comment
There was a problem hiding this comment.
Pretty cool! Thanks for building it @pomdtr!
@PSalant726, thanks for reviewing the code and giving helpful suggestions. Highly appreciate it since I'm not Bitwarden user myself.
I suggested some minor nits and we are ready to merge afterwards.
| "commands": [ | ||
| { | ||
| "name": "list", | ||
| "title": "Search Vault Items", |
There was a problem hiding this comment.
Agree with Phil, "Search Vault" sounds better, items doesn't add much value here.
commented
Oct 19, 2021
|
Done! Thanks a lot to both of you for the review. |
commented
Oct 19, 2021
|
If it's ok with everyone, I would really like to review this again before it gets merged. I should have a chance tomorrow. |
commented
Oct 19, 2021
Go ahead, there is no rush :) |
commented
Jan 20, 2022
|
@PSalant726, @pomdtr, this question popped up on Twitter. Could you please help me with understanding whether this is an expected behavior, and whether it is potentially an issue?
|
commented
Jan 20, 2022
|
I replied on Twitter. To close the loop here: it's correct that the vault does not auto-lock based on any system event (ex. "sleep" or "screen saver"), but that's because of the nature of Raycast and extensions. Raycast does not support long-lived processes that can monitor/listen for those events, and execute scripts when they occur (nor do I believe it should). Instead, there is a |
commented
Jan 20, 2022
|
The extension use the same logic as the cli. I store the session token, and check if it is still valid when the user launch the extension. If it is not the case, the extension ask the user for a password. |
commented
Jan 20, 2022
|
We could add an artificial auto-lock feature by storing when the last session token was generated. |
commented
Jan 20, 2022
In general I think this would be nice to add, as long as it were adequately configurable. Still I don't think it completely addresses the concern from the tweet. My assumption is that the user is attempting to find feature-parity between the official Bitwarden apps and this Raycast extension. We simply won't be able to expire a CLI token based on system events unless the macOS keychain supported it. Even then, that would only affect the validity of the token with respect to the extension. If a user were to submit CLI commands directly, and include the "expired" token, those commands would still succeed because Bitwarden itself has not deemed the token invalid. |
Description
Add a bitwarden extension allowing to search items from your vault.
Type of change
Screencast
Checklist