Skip to content

[BEEEP/PM-14950] Flatpak biometrics - #12007

Closed
quexten wants to merge 2 commits into
mainfrom
km/beeep/biometrics-flatpak-test
Closed

quexten wants to merge 2 commits into
mainfrom
km/beeep/biometrics-flatpak-test

Conversation

@quexten

@quexten quexten commented Nov 14, 2024 •

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-14950

fixes #17965

📔 Objective

This PR aims to do four things:

Biometric browser integration with flatpak

This implements biometric integration for flatpak sandboxed bitwarden installations (flatpak browsers are still incompatible). We achieve this by instead of the desktop proxy binary, calling a script that calls the desktop proxy binary inside of the flatpak sandbox.

Fix polkit connection

There are several ways to provide a subject to polkit. One of them is via a pid, which is what was used so far. However, snap/flatpak namespace the pids, so this does not work. Instead, we use the system bus name: https://docs.rs/zbus_polkit/latest/zbus_polkit/policykit1/struct.Subject.html

Biometric auto setup

In order to make automatic setup of the polkit policies possible, we use flatpak-spawn to get out of the flatpak sandbox. This needs a new permission on the flatpak manifest.

Biometric failed setup fallback

On some systems (atomic fedora spins, i.e kinonite/silverblue), the polkit policies are read-only, and would have to be changed with an overlay. The simple fix here is to use one of the existing policies - org.freedesktop.policykit.exec. This is cosmetically not as nice, since the fallback prompt is something like: "Authenticate to run a program as a different user", but for authentication purposes should be as strong.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@codecov

codecov Bot commented Nov 14, 2024 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 33.43%. Comparing base (38c4eeb) to head (c8e20c7).
⚠️ Report is 4429 commits behind head on main.

Files with missing lines Patch % Lines
apps/desktop/src/main/native-messaging.main.ts 0.00% 17 Missing ⚠️
...c/key-management/biometrics/biometric.unix.main.ts 0.00% 6 Missing ⚠️
...pps/desktop/src/app/accounts/settings.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12007      +/-   ##
==========================================
- Coverage   33.44%   33.43%   -0.01%     
==========================================
  Files        2864     2864              
  Lines       89637    89655      +18     
  Branches    17067    17071       +4     
==========================================
  Hits        29978    29978              
- Misses      57297    57315      +18     
  Partials     2362     2362              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Nov 14, 2024 •

Copy link
Copy Markdown
Contributor

Logo
Checkmarx One – Scan Summary & Details – 2b5d958e-9a9e-4625-9ab3-a6ed1017580a

Fixed Issues

Severity Issue Source File / Package
LOW Client_JQuery_Deprecated_Symbols /apps/cli/src/service-container/service-container.ts: 876

@quexten quexten changed the title [BEEEP] flatpak biometric setup [BEEEP] Flatpak auto biometric setup & browser integration Nov 15, 2024
@quexten quexten changed the title [BEEEP] Flatpak auto biometric setup & browser integration [BEEEP] Flatpak biometrics Nov 15, 2024
@quexten
quexten force-pushed the km/beeep/biometrics-flatpak-test branch from 21aec4d to 49e1b0c Compare November 15, 2024 15:17
@quexten
quexten requested a review from dani-garcia November 15, 2024 15:19
@quexten
quexten marked this pull request as ready for review November 15, 2024 15:19
@quexten
quexten requested review from a team as code owners November 15, 2024 15:19
@quexten quexten changed the title [BEEEP] Flatpak biometrics [BEEEP/PM-14950] Flatpak biometrics Nov 15, 2024
@quexten
quexten marked this pull request as draft January 22, 2025 23:14
@ChihweiLHBird

Copy link
Copy Markdown
Contributor

Any soon we are going to get it?

@Ziomal12

Copy link
Copy Markdown

What else needs to be done for this PR to be ready to be merged?

@Pugsrgreat

Copy link
Copy Markdown

any update on when they are going to merge this?

@kariudo

kariudo commented May 8, 2025

Copy link
Copy Markdown

@quexten is there a reason this is still drafted and not merged down? Does this need testing or more contribution? There are a fair amount of people chomping at the bit here.

@quexten

quexten commented May 8, 2025

Copy link
Copy Markdown
Contributor Author

Sorry, no updates here. I've slowly re-opened my other in-draft Flatpak PR's (#12016) and these will be merged first.

I hope to allocate some time for myself to split this into two PR's, one doing biometrics, and one doing the browser integration. I don't know if it's permissable from the flathub side to allocate sandbox-escape permissions as are necessary in this PR currently, and need to figure that out.

Aside from that, this does not yet have a way to enable browser integration between a flatpak browser and a flatpak bitwarden installation; and that needs a separate, follow-up PR.

@quexten

quexten commented May 8, 2025 •

Copy link
Copy Markdown
Contributor Author

Question for everyone following this: Is your main interest in this shared unlock between browser and desktop, or is it just for unlocking the desktop app itself?

Depending on that I may shift priorities.

@Pugsrgreat

Copy link
Copy Markdown

I personally am interested in biometric unlock for both. But biometric unlock for desktop and then desktop unlock browser also works for me.

@Jacalz

Jacalz commented May 8, 2025 •

Copy link
Copy Markdown
Contributor

Personally I'm only interested in unlocking the browser extension. However, I might consider starting to use the desktop app if it had biometric unlock.

@brunobmello25

brunobmello25 commented May 8, 2025 •

Copy link
Copy Markdown

My main interest in this issue is being able to use biometrics to unlock the browser extension

@kariudo

kariudo commented May 8, 2025

Copy link
Copy Markdown

I'd also like to see biometrics available in both scenarios; I use a very long obnoxious password for obvious reasons, and the less I need to type it, the better.

The browser integration is pretty key to my needs here, and the real priority to being able to support biometrics since that 98% of my usage of Bitwarden.

I personally would be fine if documented extra config was needed via Flatseal etc to adjust the flatpak permissions to make it work.

@Aseeef

Aseeef commented Jun 16, 2025

Copy link
Copy Markdown

Looking forward to seeing this merged soon <3.

@eternaltyro

Copy link
Copy Markdown

Is there a work-in-progress build of this branch that I can try out?

@RobotRoss

Copy link
Copy Markdown

Is there a reason this is still marked as a draft? This feature is sorely needed, and if the work is already done then the draft tag is pretty much the only thing blocking a merge..?

@fflopsi

fflopsi commented Oct 27, 2025

Copy link
Copy Markdown

Question for everyone following this: Is your main interest in this shared unlock between browser and desktop, or is it just for unlocking the desktop app itself?

Depending on that I may shift priorities.

I don't mind separate unlocks for app and browser extension, but I would really like to see biometric unlocks instead of typing a long password every time I unlock my laptop. It looks like most of the checks pass... Is there a time estimate on when this could be merged?

@orangesunny

Copy link
Copy Markdown

Question for everyone following this: Is your main interest in this shared unlock between browser and desktop, or is it just for unlocking the desktop app itself?

Depending on that I may shift priorities.

The Firefox extension is the most important thing to unlock with a fingerprint for me. I don't use the desktop app often; it mostly ran in the background (previously on Mac) only to unlock the browser extension.

I tried the RPM and AppImage packages and failed to enable any biometrics on Bluefin (Fedora Silverblue), seemingly because the Bitwarden apps need to write a rule into a polkit directory, which is impossible on immutables; no error received. I hope that this improvement will count with this issue for browser extension (and Flatpak as well.)

@j-dominguez9

Copy link
Copy Markdown

Pretty please?

@zygous

zygous commented Jan 11, 2026

Copy link
Copy Markdown

The only reason I install the desktop app is to get passwordless login for the browser extension. Switching between macOS and Linux is jarring because of this issue, so I'm keen to see it resolved. I'm not using an immutable OS, so would happily use one of the other packages, but haven't had any joy with any of them.

@quexten

quexten commented Jan 12, 2026

Copy link
Copy Markdown
Contributor Author

Hi all!

Since there are a few comments, I'll respond here. I'd eventually love to get back to this PR, and it's definitely something I'll pursue again at some point. However, currently I have other projects [1] [2] that take significantly higher priority and for the time being I cannot prioritize picking back up Flatpak support.

As a further note, there is currently a not-yet-rolled-out re-write of Linux biometrics that will store the biometrics key in the kernel / protected memory for enhanced protection against user-space memory dumping attacks. This will have to roll out before being able to work on Flatpak support. #16660

If there is any community contributions on this in the meantime, please feel free to ping me and I'm happy to review.

Thank you!

@quexten quexten closed this Mar 17, 2026
@orangesunny

Copy link
Copy Markdown

Why was this closed without a change or comment?

@Parent5446

Copy link
Copy Markdown

There was a comment. Is this not visible? #12007 (comment)

@byquanton

byquanton commented Mar 17, 2026 •

Copy link
Copy Markdown

A community PR was recently merged that fixed the biometrics issue in Flatpak: #18625

@devurandom

Copy link
Copy Markdown

A community PR was recently merged that fixed the biometrics issue in Flatpak: #18625

Released as part of 2026.2.0. Thanks for pointing this out!

@quexten
quexten deleted the km/beeep/biometrics-flatpak-test branch April 8, 2026 04:36
@quexten quexten added the BEEEP BEEEEP Projects label Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BEEEP BEEEEP Projects stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flatpak does not support browser integration or system auth unlock