Repository navigation
Let a platform turn its fingerprint reader on with the owner's agreement - #16360
Conversation
[Medium impact] The PR appears safe to merge. SummaryAdds optional platform hooks to turn fingerprint readers on and off.
No actionable issues were found. This review checked the code; it did not run the tests.
|
d55fd9f to
c075239
Compare
|
Tested on a MacBook Neo (J700) at
The same run passed on a MacBook Pro 14" M2 Max (J414c) as a first-time Touch ID setup: no, then yes and enrol, then a cold boot with the lock screen and 🤖 Generated with Claude Code |
maralcbr
left a comment
There was a problem hiding this comment.
Approving at 5d75700, to merge after #16403.
The hooks are optional root operations that resolve only on aarch64-apple. Setup resolves as the user and runs the hook with sudo only when it resolves. It checks sudo again after the prompt, and a refusal or failure stops setup with nothing enrolled. Removal runs disable-fingerprint before the packages go, and a failure there only warns. Off a Mac nothing changes, and an undetermined platform now warns instead of stopping setup.
Before merge: after #16403 is squash-merged, rebase onto quattro so this PR's diff is only c075239. As it stands, the branch conflicts after the squash. The cherry-pick applies cleanly.
For the maintainer to accept: a failed --resolve warns and continues, and that includes an entrypoint the dispatcher rejects as untrusted. This is no consent bypass: the hook is what loads the driver, so nothing turns Touch ID on in that path.
Follow-up (non-blocking): tell an untrusted-entrypoint rejection apart from an unknown platform, and keep the rejection a red stop.
…#16403) * Delete the reader's own copy of the prints when removing fingerprints A match-on-chip reader keeps the enrolled prints in the device as well as in /var/lib/fprint, and fprintd finds the device's copies only through its local records. So removal now deletes them with fprintd-delete while fprintd still runs, before the local files go. It authenticates sudo in view first, since the delete's output is captured; a refusal changes nothing. A delete that finds no reader is said plainly, and one that fails is reported without stopping the removal. The enrolment instructions also move to short lines, since the setup terminal wraps a long one mid-word. Split out of #16360, which builds the Touch ID hooks on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Drop the width check that measured the test's own text The loop read the expected instruction the test passes in, not what setup printed, so it could only fail if someone edited the test's string; the exact-output match above already holds setup to that text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Omarchybot <317366263+omarchybot@users.noreply.github.com> Co-authored-by: Codex Medium <noreply@openai.com>
A Mac keeps Touch ID off until its owner agrees, so fingerprint setup and removal gain two optional lifecycle operations, enable-fingerprint and disable-fingerprint, which omarchy-mac implements on Apple Silicon: - Setup resolves enable-fingerprint as the user once sudo is authenticated and, when it resolves, runs it with sudo before fprintd is asked about the reader. The hook asks the owner; a refusal or a failure stops setup with nothing enrolled. sudo is checked again afterwards, since the owner may read past its timeout. - A platform that can't be told sets up as one without the hook, with a warning: the reader its platform keeps off stays off, so fprintd doesn't find it, and setup never stops anywhere else. - Removal runs disable-fingerprint once the prints and local files are gone and before the packages go. A failure is reported, not fatal. Builds on the removal change that deletes the reader's own prints first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5d75700 to
7227858
Compare
Builds on #16403, which deletes the reader's own prints on removal; merge that first. Until it does, this branch shows both commits, and only the second, c075239, is this PR.
A Mac keeps Touch ID off until its owner agrees. Turning it on creates a key store for Linux and advances the Secure Enclave's anti-replay state, which macOS shares, so the owner has to read what that means and say yes first. This adds the two hooks that let a platform ask, and calls them from fingerprint setup and removal.
omarchy-lifecycle-dispatchgains two optional root operations,enable-fingerprintanddisable-fingerprint. A Mac resolves them inomarchy-mac's directory (/usr/lib/omarchy/mac); every other platform treats them as no-ops.enable-fingerprintas the user once sudo is authenticated.disable-fingerprintonce the prints and local files are gone and before the packages go. A failed resolution or hook doesn't stop the removal; it says the reader may stay on.On a platform without the hooks, setup and removal behave as before and run no extra sudo for them. Saying no leaves fprintd and
libfprint-gitinstalled, since setup installs them before it asks; the prompt is about the Secure Enclave, not the packages.The Mac side is omacom/omarchy-mac-pkgs#12: the prompt, the eligibility check and turning Touch ID on and off. It reports
unsupported:runtimeuntil this lands, so the two can merge in either order. Where the Mac can't use Touch ID (no sensor, an M1, a board without a profile), its hook exits 0 and setup goes on, so a USB reader still enrols. This builds on #14675 (detection) and #15512 (enrolment).Evidence
The tests stub sudo, fprintd and the dispatcher, so nothing on the machine changes.
fingerprint-package-test.sh,security-fingerprint-remove-test.sh,lifecycle-dispatch-test.sh,fingerprint-invitation-test.shandsecurity-polkit-faillock-test.shpass in ubuntu:24.04 as root and as a normal user.disable-fingerprint;Test plan
Merge Danger
Door: two-way
Blast Radius: low. Off a Mac the hooks are no-ops, but every machine's fingerprint setup now resolves a dispatch operation first and warns if it can't.
🤖 Generated with Claude Code