-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
bitwarden-desktop: fix browser biometrics #374068
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "name": "com.8bit.bitwarden", | ||
| "description": "Bitwarden desktop <-> browser bridge", | ||
| "path": "@out@/bin/desktop_proxy", | ||
| "type": "stdio", | ||
| "allowed_extensions": ["{446900e4-71c2-419f-a6a7-df9c091e268b}"] | ||
fpletz marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -115,6 +115,10 @@ buildNpmPackage rec { | |||||||
| pushd apps/desktop/desktop_native/napi | ||||||||
| npm run build | ||||||||
| popd | ||||||||
|
|
||||||||
| pushd apps/desktop/desktop_native/proxy | ||||||||
| cargo build --bin desktop_proxy --release | ||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As far as I can tell there is only one other pkg in nixpkgs that calls |
||||||||
| popd | ||||||||
| ''; | ||||||||
|
|
||||||||
| postBuild = '' | ||||||||
|
|
@@ -154,7 +158,11 @@ buildNpmPackage rec { | |||||||
| installPhase = '' | ||||||||
| runHook preInstall | ||||||||
|
|
||||||||
| mkdir $out | ||||||||
| mkdir -p $out/bin | ||||||||
| cp -r apps/desktop/desktop_native/target/release/desktop_proxy $out/bin | ||||||||
|
Comment on lines
+161
to
+162
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||
|
|
||||||||
| mkdir -p $out/lib/mozilla/native-messaging-hosts | ||||||||
| substituteAll ${./firefox-native-messaging-host.json} $out/lib/mozilla/native-messaging-hosts/com.8bit.bitwarden.json | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Please could you also add native messaging host support for Chromium-based browsers?
Suggested change
The file {
"name": "com.8bit.bitwarden",
"description": "Bitwarden desktop <-> browser bridge",
"path": "@out@/bin/desktop_proxy",
"type": "stdio",
"allowed_origins": [
"chrome-extension://nngceckbapebfimnlniiiahkandclblb/",
"chrome-extension://hccnnhgbibccigepcmlgppchkpfdophk/",
"chrome-extension://jbkfoedolllekgbhcbcoahefnbanhhlh/",
"chrome-extension://ccnckbpmaceehanjmeomladnmlffdjgn/"
]
}Why do this? It would enable home-manager users to add this package to programs.brave.nativeMessagingHosts (or any other supported browser. In contrast, the equivalent files created by the bitwarden desktop app when ticking the host auth and browser integration boxes are only for a limited set of browsers. |
||||||||
|
|
||||||||
| pushd apps/desktop/dist/linux-${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked | ||||||||
| mkdir -p $out/opt/Bitwarden | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is only consumed by firefox in this way, we might put it in paths like
$out/libexec/bitwardento avoid messing up with PATH.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When you run current Bitwarden Desktop app in NixOS 24.11 and click on the option to enable browser fingerprint auth, you'll get this error log:
So, I'd prefer to move it to libexec as you noted. However in that case, somehow we have to tell the app that there's where it'll be. Do you know how to do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You would have to patch the source code here to return the absolute path