toolbox
toolbox copied to clipboard
Bitwarden collections support
Hello, Dynamic folders worls for Bitwarden, but everything is in the root folder. So for me it's useless : I have built a tree (collections) for all my clients. A collection contains all the credentials of the client. So is it possible to add support of collections in the script ? Other way : Add a default collection. So I can attach a collection on each client (but must create many Dynamic folders...) Thanks
@ruffy91 @Unending is this something you can help with?
This would definitely improve the RoyalTS experience with Bitwarden as an external vault.
Hi everyone,
I've worked on a new version of the Bitwarden example with PowerShell as I'm more comfortable with this language than with Python.
It use the user's API Key to login and the master password for subsequent unlock of the vault. The 2FA is bypassed by the use of the API Key. Tried to implement both login methods but it can be really painful to manage interactive processes with PowerShell. If someone know how to do, feel free to participate 😋 Everything is also configured with CustomProperties on the dynamic folder itself:
The loading of the vault is done first with the personal vault. Each folder in Bitwarden is created with the same naming "Folder/Subfoler". Then it iterate organizations available to the user and for each one the collections the user has access to. Each organization is in its own root folder and the collections are created as subfolders using the same Collection/Subcollection syntax:
Empty folders are skipped and not displayed at all. Secure notes are loaded as "Information" object type, other types from Bitwarden (cards and identities) are ignored but it can be easily added by extending the switch statement. Custom properties and notes are also retrieved accordingly.
Only drawback compared to the Python version is the loading time 😞 In my setup with more than 500 credentials & secure notes stored in Bitwarden, it take 30 to 40 seconds to load. Maybe some reworking and/or filtering can help 😉
I also take care of the compatibility between legacy PowerShell 5.1 and PowerShell Core (6.x/7.x) as some JSON related commands changed their syntax or behavior or because of some issues with arrays counts...
@StefanKoell I can send you the export for review if you want or create a pull-request.
Best Regards, Nicolas.
Hi @GrinGrin!
This looks good. Any help is very much appreciated!
Do you think you can create a PR for that in the Bitwarden folder as "Bitwarden (PowerShell)"?
cheers, Stefan
Hi @StefanKoell :-)
Pull request #70 submitted !
Best Regards, Nicolas.
Hey @stephanehofman !
You can try the PowerShell version to see if it fulfill your needs ?
I'll also try to look at a way to add filtering options to restrict what is fetched from the server (enable/disable personal vault, restrict to a single organization or single/set of collections) and reduce loading time 😖