I’ll give it a go (Seeing as I’m presuming you’re in favour!)
We’ve added the following plug:
plugs:
browser-native-messaging:
interface: personal-files
write:
- $HOME/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
- $HOME/.config/chromium/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
- $HOME/.config/google-chrome/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
- $HOME/.config/microsoft-edge/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
- $HOME/.config/vivaldi/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
- $HOME/.config/BraveSoftware/Brave-Browser/NativeMessagingHosts/org.keepassxc.keepassxc_browser.json
- $HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_en-US/Browser/TorBrowser/Data/Browser/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
The name violates normal conventions because the normal conventions wouldn’t apply here. (E.G the convention of using dot-home-slash-local-yadayada
). I believe the purpose of the plug and it’s name is appropriate in this scenario and the exception warranted, it’s clear as can be what the plug is for.
We’d like this to be automatically connected as it enables the KeepassXC snap to work identically to regular KeepassXC for the purposes of the web browser integration. With this interface granted, an Ubuntu user with the default Firefox snap and KeepassXC snap will see the two work identically to their native equivalents (N.B the portal popup confirmation happens but I’m counting it because that’s a conscious decision on the Portals, also there’s no portal popup for native browsers which this also benefits).
Ultimately I’m hoping the paths should be self evident, KeepassXC is clearly the owner of these files and these files are exclusively designed to be used with KeepassXC’s Browser extensions, no other app would have reason to interact with them.
So Tl;Dr, great UX improvements for basically 0 security exposure, those files are only ever used for the purpose of Native Messaging in Web Browsers, and the Web Browsers themselves add their own checks so both sides of the communication have safeguards. I believe this is well within reasonable user expectations to autoconnect
And to prove how much I considered it, I even made this Proposal: Native Messaging Host Interface