[GH-ISSUE #3200] firefox: keepassxc browser addon: Key exchange not successful #1999

Closed
opened 2026-05-05 08:40:17 -06:00 by gitea-mirror · 8 comments
Owner

Originally created by @ericschdt on GitHub (Feb 3, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3200

If I start the Firefox with Firejail and try to connect the KeepassXC browser addon to the KeepassXC app, the addon says "key exchange unsuccessfull".

If however the Firefox is started outside of Firejail, everything is fine.

Any idea?

Additional notes

The KDEconnect browser addon runs fine with default settings + the ignore nodebus "trick".

System

FF 72.0.2
firejail 0.9.62
KeePassXC 2.5.2
KeepassXC Browser Addon 1.5.4
Archlinux

Originally created by @ericschdt on GitHub (Feb 3, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3200 If I start the Firefox with Firejail and try to connect the KeepassXC browser addon to the KeepassXC app, the addon says "key exchange unsuccessfull". If however the Firefox is started outside of Firejail, everything is fine. Any idea? #### Additional notes The KDEconnect browser addon runs fine with default settings + the ignore nodebus "trick". #### System FF 72.0.2 firejail 0.9.62 KeePassXC 2.5.2 KeepassXC Browser Addon 1.5.4 Archlinux
Author
Owner

@ghost commented on GitHub (Feb 3, 2020):

@ericschdt I've installed keepassxc on Arch together with its browser addon and did some testing. With the firejail profiles from current git (which is what I use daily) I could reproduce. Editing the firejail options didn't do much in this context. And then I noticed this:

$ cat ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
{
    "allowed_extensions": [
        "keepassxc-browser@keepassxc.org"
    ],
    "description": "KeePassXC integration with native messaging support",
    "name": "org.keepassxc.keepassxc_browser",
    "path": "/usr/local/bin/keepassxc-proxy",
    "type": "stdio"
}

On my system /usr/local/bin/keepassxc-proxy does not exist, /usr/bin/keepassxc-proxy does. As soon as I edited in the correct path and restarted Firefox the problem was gone. This was my first time ever using KeepassXC, so this might be beginners luck :)

<!-- gh-comment-id:581651122 --> @ghost commented on GitHub (Feb 3, 2020): @ericschdt I've installed keepassxc on Arch together with its browser addon and did some testing. With the firejail profiles from current git (which is what I use daily) I could reproduce. Editing the firejail options didn't do much in this context. And then I noticed this: ``` $ cat ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json { "allowed_extensions": [ "keepassxc-browser@keepassxc.org" ], "description": "KeePassXC integration with native messaging support", "name": "org.keepassxc.keepassxc_browser", "path": "/usr/local/bin/keepassxc-proxy", "type": "stdio" } ``` On my system /usr/local/bin/keepassxc-proxy does not exist, /usr/bin/keepassxc-proxy does. As soon as I edited in the correct path and restarted Firefox the problem was gone. This was my first time ever using KeepassXC, so this might be beginners luck :)
Author
Owner

@ericschdt commented on GitHub (Feb 4, 2020):

With the firejail profiles from current git (which is what I use daily) I could reproduce.

That's good, however unfortunately

On my system /usr/local/bin/keepassxc-proxy does not exist, /usr/bin/keepassxc-proxy does.

both exist on my system:

-rwxr-xr-x 1 root root 30624  4. Jan 23:00 /usr/bin/keepassxc-proxy*
lrwxrwxrwx 1 root root 17  2. Feb 15:03 /usr/local/bin/keepassxc-proxy -> /usr/bin/firejail*

and

 diff ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json
{
    "allowed_extensions": [
        "keepassxc-browser@keepassxc.org"
    ],
    "description": "KeePassXC integration with native messaging support",
    "name": "org.keepassxc.keepassxc_browser",
-   "path": "/usr/bin/keepassxc-proxy",
+   "path": "/usr/local/bin/keepassxc-proxy",
    "type": "stdio"
}

did not help me. :-(

I also found out that the KeepassXC browser addon always says "unsuccessful key exchange", no matter if KeepassXC is running and/or unlocked in the background.

This was my first time ever using KeepassXC, so this might be beginners luck :)

Definitely!

<!-- gh-comment-id:581841053 --> @ericschdt commented on GitHub (Feb 4, 2020): > With the firejail profiles from current git (which is what I use daily) I could reproduce. That's good, however unfortunately > On my system /usr/local/bin/keepassxc-proxy does not exist, /usr/bin/keepassxc-proxy does. both exist on my system: ``` -rwxr-xr-x 1 root root 30624 4. Jan 23:00 /usr/bin/keepassxc-proxy* lrwxrwxrwx 1 root root 17 2. Feb 15:03 /usr/local/bin/keepassxc-proxy -> /usr/bin/firejail* ``` and ```  diff ~/.mozilla/native-messaging-hosts/org.keepassxc.keepassxc_browser.json { "allowed_extensions": [ "keepassxc-browser@keepassxc.org" ], "description": "KeePassXC integration with native messaging support", "name": "org.keepassxc.keepassxc_browser", - "path": "/usr/bin/keepassxc-proxy", + "path": "/usr/local/bin/keepassxc-proxy", "type": "stdio" } ``` did not help me. :-( I also found out that the KeepassXC browser addon always says "unsuccessful key exchange", no matter if KeepassXC is running and/or unlocked in the background. > This was my first time ever using KeepassXC, so this might be beginners luck :) Definitely!
Author
Owner

@ericschdt commented on GitHub (Feb 4, 2020):

With the firejail profiles from current git (which is what I use daily) I could reproduce.

I replaced the profiles with their git counterparts and now it works! :)

<!-- gh-comment-id:581845305 --> @ericschdt commented on GitHub (Feb 4, 2020): > With the firejail profiles from **current git** (which is what I use daily) I could reproduce. I replaced the profiles with their git counterparts and now it works! :)
Author
Owner

@ericschdt commented on GitHub (Feb 5, 2020):

Okay, now it no longer works. I don't know what's happening and I will have to investigate more later.

<!-- gh-comment-id:582628162 --> @ericschdt commented on GitHub (Feb 5, 2020): Okay, now it no longer works. I don't know what's happening and I will have to investigate more later.
Author
Owner

@ghost commented on GitHub (Feb 6, 2020):

@ericschdt Feel free to re-open this if after additional investigation the issue persists.

<!-- gh-comment-id:583128302 --> @ghost commented on GitHub (Feb 6, 2020): @ericschdt Feel free to re-open this if after additional investigation the issue persists.
Author
Owner

@ericschdt commented on GitHub (Feb 9, 2020):

Feel free to re-open this if after additional investigation the issue persists.

I could resolve the issue by adding keepassxc-proxy to the private-bin line in the firefox.profile file:

private-bin bash,dbus-launch,dbus-send,env,firefox,sh,which,keepassxc-proxy

Alternatively one could have uncommented
include firefox-common-addons.inc in firefox-common.profile
AND
private-bin keepassxc-proxy in firefox-common-addons.inc

<!-- gh-comment-id:583832980 --> @ericschdt commented on GitHub (Feb 9, 2020): > Feel free to re-open this if after additional investigation the issue persists. I could resolve the issue by adding `keepassxc-proxy` to the private-bin line in the `firefox.profile` file: ``` private-bin bash,dbus-launch,dbus-send,env,firefox,sh,which,keepassxc-proxy ``` Alternatively one could have uncommented `include firefox-common-addons.inc` in `firefox-common.profile` AND `private-bin keepassxc-proxy` in `firefox-common-addons.inc`
Author
Owner

@saddy001 commented on GitHub (Oct 17, 2021):

For me this worked:

cat ~/.config/firejail/firefox.profile
private-bin bash,dbus-launch,dbus-send,env,firefox,sh,which,keepassxc-proxy
whitelist ${RUNUSER}/org.keepassxc.KeePassXC.BrowserServer
include /etc/firejail/firefox.profile

Then restart Firefox. Also see #3952

<!-- gh-comment-id:945145026 --> @saddy001 commented on GitHub (Oct 17, 2021): For me this worked: ``` cat ~/.config/firejail/firefox.profile private-bin bash,dbus-launch,dbus-send,env,firefox,sh,which,keepassxc-proxy whitelist ${RUNUSER}/org.keepassxc.KeePassXC.BrowserServer include /etc/firejail/firefox.profile ``` Then restart Firefox. Also see #3952
Author
Owner

@rusty-snake commented on GitHub (Oct 17, 2021):

Also see https://github.com/keepassxreboot/keepassxc/discussions/6741#discussioncomment-1154242.

<!-- gh-comment-id:945154666 --> @rusty-snake commented on GitHub (Oct 17, 2021): Also see https://github.com/keepassxreboot/keepassxc/discussions/6741#discussioncomment-1154242.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#1999
No description provided.