ChromeKeePass
ChromeKeePass copied to clipboard
Add support for the KeePassNatMsg plugin
This pull request includes changed from #92 and should be merged after it.
This adds support to connect to the KeePass password manage via the KeePassNatMsg plugin in addition to the KeePassHttp plugin that we already support, which is no longer being actively developed.
For this to work, we need the KeePassNatMsg to add our extension id to the list of allowed extensions in its native messaging configuration files. I created a pull request in their repository with the required changes here: https://github.com/smorks/keepassnatmsg/pull/102
For testing this locally edit the kpnm_chrome.json configuration file (on Windows, its located at %LocalAppData%\KeePassNatMsg) and add "chrome-extension://<extension id>/", to the allowed_origins list, where <extension id> has to be replaced with the extension id of ChromeKeePass.
The user is able to select between the two plugins in the options. It is also possible to change the native messaging app id, this way one could also possibly connect to another plugin that provides the same interface as KeePassNatMsg. I also took the chance to clean up the association options UI and made the connect button save the current settings, so the users are actually connecting with the settings they see, not the ones that were saved in storage before they edited them:
| The new settings |
|---|
![]() |
The default in the settings is to connect via the KeePassHttp plugin, to not break existing configurations. But I think KeePassNatMsg should be the default, since KeePassHttp seems to be no longer actively maintained.
@RoelVB do you agree with that? In that case, we could add some code that saves the settings when the plugin is loaded, release a version that will save the KeePassHttp as the selected plugin, and then change the default.
I tested that fetching credentials normally and for http basic auth is still working with Chrome and Edge.
The pull request in the KeePassNat plugin has now been merged and a new version of the plugin has been released, which includes ChromeKeePass in its list of allowed extension ids. 🎉
@RoelVB Should I try to rebase this on the dev-v2 branch, or should I wait until you tell me it's ready?
Hey @RoelVB, I hope you are doing good. Since version 2 of the extension has now been officially released, would you be interesting in accepting this MR if I rebased it onto the dev-v2 branch?
