Repository navigation
Offer Touch ID as a fingerprint reader once its owner agrees - #12
Conversation
|
@scottjones reviewed at To close before it leaves draft:
The |
|
Follow-up after a second review at
|
|
Thanks. In
Still to do before this leaves draft: taking over aurora-touchid's five pieces (loading |
|
@scottjones re-reviewed at
|
|
@maralcbr thanks. At
|
Brings in #18, #19, #20 and #22. The runtime pin conflicted: main pins omacom/omarchy 4d9bdc49 (#14431), which has no platform-root fingerprint detection, so this branch now pins omacom/omarchy#14675's head f317ea50, the fingerprint-readers detector on #14431. Move it to the merge commit once #14675 lands. omarchy-mac stays at #12's 0.2.0; main is still at 0.1.0. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
From Marcelo's review: the invitation rule now says where its names come from (omarchy-hw-fingerprint, the runtime's detector, reads fingerprint-readers, the platform file omarchy-mac ships in #12), and "published" means published to the repositories Macs update from. systemd-analyze verify --root applies where the container can verify units, at whatever tree is staged. The runtime pin moves to a commit that has what a test needs, not the exact commit that added it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Brings in #23. omarchy-mac stays at #12's 0.2.0 over main's 0.1.1, in the version file and the README. The runtime pin moves to omacom/omarchy#14675's head 00fcc451, the fingerprint-readers detector on quattro, since f317ea50 is no longer any PR's head. Quattro renames the platform from apple-silicon to aarch64-apple, so the platform-name tests need #24 before this pin passes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Brings in #26's platform names. omarchy-mac stays at #12's 0.2.0, above main's 0.1.2, in the version file and the README. The runtime pin stays on omacom/omarchy#14675's head 00fcc451, which sits on main's pinned quattro e1b0e5e9b; its note now says so. #12's one platform check, the unit's ExecCondition, already goes through omarchy-hw-apple-silicon. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ONTRIBUTING.md AGENTS.md said #12 brought both the platform file and the detector that reads it. #12 adds fingerprint-readers; omacom/omarchy#14675 teaches the runtime's omarchy-hw-fingerprint to read it. CONTRIBUTING.md now states the release rule for one-time prompts beside the cold-boot evidence rule, so merging the AGENTS.md rule doesn't make policy the contributor guide leaves out. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
omarchy-hw-fingerprint finds only USB readers, so a Mac's Touch ID sensor, which the kernel reaches through the Secure Enclave, never got Omarchy's fingerprint setup. omarchy-mac now names it in /usr/share/omarchy-platform/fingerprint-readers: the Secure Enclave driver's diag/touchid reading "ready", which it does only once the sensor is bound and can enroll and match. Needs a runtime that reads the file; an older one ignores it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Touch ID activates on the first open of /dev/sep-bio, and until then diag/touchid reads "unknown", so omarchy-hw-fingerprint found no reader on a Mac where nothing had opened it: on a Mac without fingerprint setup, fprintd is not even installed. A udev rule now starts a oneshot unit that opens it once as soon as the kernel publishes it, and diag/touchid reads "ready" from boot wherever Touch ID works. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CI's pinned runtime predates omarchy-hw-fingerprint's platform readers, and platform_root_copy fails a command that never reads the platform root. The test now skips until the runtime's detector names fingerprint-readers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
systemd-analyze verify checks that a unit's commands exist, and on a host without Omarchy /usr/bin/omarchy-hw-apple-silicon does not, so the test failed in CI while passing on a Mac with Omarchy installed. It now verifies the unit with --root at the staged package, where stubs stand in for the runtime's platform check and true. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The fingerprint setup no longer keeps a platform libfprint: omarchy-pkgs' libfprint-git builds for aarch64 with the Touch ID driver, and the setup installs it. The README says so, and that the platform file waits for that build to be published. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Marcelo's review: the rule fires only on add, and on the install or update that brings it /dev/sep-bio already exists, so the same session's post-update check would not see "ready" until a reboot. A pacman hook now starts the unit after that transaction. The unit opens the node once, from ExecStart, instead of through StandardInput, which also opened it for the platform check, and says why a read-only open is enough. The README notes that the diag/touchid path follows the aurora kernel's naming. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
It skipped unless the pinned runtime named fingerprint-readers, so CI was green without running it. The pin now names omacom/omarchy#14675's head (00fcc451: the detector on upstream quattro e1b0e5e9b), and the test no longer skips. Before this lands the pin moves to #14675's merge commit. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
CONTRIBUTING puts the version bump and the manual in the change that brings the behaviour: the keyboard page explains Touch ID, the hardware table lists it as in progress (tested on the 14" M2 Max), and the status page no longer leaves it out of the first release. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
/dev/sep-bio takes one opener at a time, so while fprintd holds it the unit's open fails with EBUSY and the update's pacman hook reported an error although Touch ID was up. The unit now succeeds when the open works or the enclave already reads "ready". It opens with true, not ':', because a failed redirection on a special builtin ends sh before the fallback runs. The README's condition for shipping the platform file now lists everything aurora-touchid does today: loading apple-sep, extracting the calibration, letting fprintd open a misc device and stopping fprintd before sleep. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Grok's review: offline provisioning installs omarchy-mac in a chroot or an unbooted root, where systemctl start fails and pacman reports a failed hook. The hook now skips there, as systemd's own pacman hooks do; the first boot's add event starts the unit instead. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The unit succeeded as soon as /dev/sep-bio opened, even when Touch ID never latched (no calibration, say), so success didn't mean what the detector checks. It now opens the node once, busy or not, and succeeds only if diag/touchid reads "ready" within five seconds. TimeoutStartSec=15s bounds an open that blocks: the pacman hook waits for this oneshot, and a hung open would hang the transaction. A test runs the unit's own command against a fixture node and sysfs: ready succeeds whether the open worked or the node was busy, and not-ready fails either way. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The hook runs on every omarchy-mac upgrade, so a unit that failed (say, fprintd mid-enrollment holding the node and Touch ID not ready) made pacman report failure after the transaction had committed. The hook now always exits 0 and leaves the reason to the unit's journal. pacman --root needs nothing new: libalpm runs hooks chrooted into the target root, so the chroot check already skips it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A not-ready diag/touchid is no reader, and a USB reader beside it is still found: the platform file never hides what USB detection finds. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
9b296cc to
55a5f03
Compare
|
@scottjones re-reviewed at
|
Once omarchy-mac has moved the installer's copy of a MacBook Neo's Touch ID sensor key off the ESP, nothing on Linux can bring it back, and a factory reset boots a root cloned from @factory, which never had it. The key belongs to the Mac, not its owner, so reset-prepare now copies it into the factory root as var/lib/omarchy-mac/msrk-j700.bin, 0600 in a 0700 directory: the copy omarchy-mac kept, or else the one Touch ID was turned on with under /usr/lib/firmware/updates. The copy goes to a temporary name, is synced and renamed, and a failure stops the reset before anything is activated. The next owner is still asked before Touch ID uses it, and since that copy may not have come straight from the installer, the Neo's prompt now just says a copy of the sensor key is kept for Linux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The installer writes the Neo's sensor key to the ESP under a temporary name and renames it, but on macOS fsync doesn't flush the drive's cache and FAT has no journal, so a power cut can still leave the key's name on a file that is short or holds stale clusters. touchid-status moved any non-empty file and deleted the ESP copy, so Touch ID was offered on a key that can't work, and the owner would agree only for setup to fail. It now checks the key's DER envelope first: an outer SEQUENCE whose length is the file's size, holding the "comb" label and two SEQUENCEs that end exactly at its end, in a file of at most 16 MiB, reading at most a few children, so a crafted file can't hold up the boot. A key that fails stays on the ESP and isn't used, the status says so in its journal, and without another key the Neo reads unsupported:no-root-key. It is kept rather than deleted because it is the only copy of a device-private key and the check is an assumption about its format. The envelope catches a short or lengthened file and damage that reaches a header; stale bytes inside the fdrd or secb payload still pass it, and fail only when Touch ID is turned on. The root's copy is checked again before it takes the key's name. A temporary msrk-j700.bin.new that an interrupted write left on the ESP, device-private like the key, is removed at boot. The check accepts the 12,689-byte key from a MacBook Neo and rejects it truncated by one byte, extended by one, or with its first 4 KiB zeroed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
MacBook Neo (J700) test of the staged sensor key at The Neo was a fresh install from a developer build of #120, which staged the key on the ESP. I then installed this PR's package ( First boot with the package
Setup > Security > Fingerprint
Cold reboot
Removal 🤖 Generated with Claude Code |
[Critical impact] The reviewed changes appear safe to merge once the stated prerequisites are in place. SummaryAdds Touch ID setup that asks the owner before loading the driver or rebuilding the Neo’s sensor key.
No new actionable issues were found.
|
Review follow-up. omarchy_mesa.collect() still took root_key_record= and would add apple/msrk-j700.bin to the firmware package, with a comment saying the adapter supplies it; since the adapter stages the key by itself, the parameter is gone, so the key can't reach the package at all. Its test now checks that collect() refuses one. docs/sensor-root-key.md now: - lists upstream's fallback firmware archive. asahi-installer's collect_firmware tars the whole com.apple.factorydata cache, MSRk, seal and trust bundle included, into all_firmware.tar.gz, which copy_idata puts in the ESP's asahi/ on every install. It is inherited from upstream, root-only on Linux through the umask=0077 mount, and omacom/omarchy-mac-pkgs#12 doesn't remove it. - says FAT holds no modes. The staged copy is root-only on Linux through the mount and has the mount's permissions on macOS while the installer has the ESP mounted; 0600 and 0700 apply in /var/lib/omarchy-mac and the installed system. - says the rename keeps only a write interrupted before it from taking the key's name: FAT has no journal and macOS's fsync doesn't flush the drive's cache, so a power cut can still leave a damaged file there, which Linux's envelope check catches. _stage_neo_sensor_root_key's docstring says the same. Also removes two stray blank lines in the adapter tests. Re-pinned the engine as v0.9.2-omarchy.20261023.d1f329043a72; two repacks match and ./test/all passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngs it Answers Greptile's review of #12: - The pacman hook starts the status unit before the activation. On the update that first installs the package, the boot-time status hasn't run and the activation skips without /dev/sep-bio, so nothing offered Touch ID until a reboot. - disable-fingerprint fails when it can't remove the agreement, and touchid-enable and enable-fingerprint fail when they can't record it or write the driver's options, instead of reporting success. - The options and the carved calibration are written to .new and renamed, so a failed write never leaves a partial file under the real name. A truncated options file would load a read-only driver at every boot on a kernel with omacom/linux-aurora#180. - The wait unit follows the boot-time load, so it never looks for the device before the driver has one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…artition Answers the maintainer review of #12: - enable-fingerprint lets the setup go on wherever Touch ID can't be set up, so a USB reader enrols on a Mac mini, a Studio or an M1 Mac. A Mac without a sensor writes no status, and a status service can fail, so a missing status is worked out again. An owner who agreed already is never asked again: the Mac gets any missing driver options and, unless Touch ID is ready, is told to restart. - The load unit waits for the iBoot System Container's link with udevadm once its condition holds, instead of depending on the device: systemd waits for a unit's devices before checking its condition, so every boot waited on the partition, agreed or not, and a machine without one held the greeter until the device timed out. - The activation runs only on the owner's agreement, so on a kernel that loads the driver itself (omacom/linux-aurora#180) a Mac whose owner hasn't agreed keeps being offered Touch ID. - The consent text drops a reassurance nobody can check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A MacBook Neo's Touch ID needs its device-private sensor root key. Instead of an installer copying it before anyone has agreed, and Linux keeping it, touchid-root-key rebuilds it only after the owner says yes, from this Mac's factory records in asahi/all_firmware.tar.gz, which asahi-installer writes to the ESP on every install. It rebuilds the key as the installer's factory_root_key() does on macOS, checks its envelope, and refuses records that aren't all found byte for byte in this Mac's own iBoot System Container, so another Mac's archive, or one swapped on the ESP, gives no key. It writes the key root-only, to a temporary name it created itself, synced and renamed. - Eligibility needs an installed key, or the archive and python. - The boot status no longer moves a staged key, and nothing is kept in /var/lib/omarchy-mac; a yes that then fails takes the rebuilt key back. - Turning Touch ID off deletes the key; the next yes rebuilds it. - A factory reset carries no key: the ESP survives it, so the next owner's yes rebuilds it. factory-reset.sh is back to its state before 104c496. - Neos installed before the installer staged anything are covered too. The README also notes that fprintd opens /dev/sep-bio when it probes, so a kernel that loads apple_sep on its own (omacom/linux-aurora#180) needs fprintd's allowance gated on the agreement as well. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
touchid-root-key can fail after its rename, when the directory sync fails, and then the key was left in place: touchid-enable set its cleanup flag only once the extractor succeeded. The branch runs only when no key is installed, so the flag is now set before the extractor runs, and any key at that name is this run's to take back. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
MacBook Neo (J700) end to end at Before: the old setup's fingerprints were removed through Omarchy, and the old key copies were deleted by hand, including the dev build's kept copy in Install: Cold boot, no agreement:
Setup > Security > Fingerprint:
Cold boot, agreed:
The lock screen took the finger, and so did Removal, through Omarchy's fingerprint removal, in order:
Afterwards the agreement, the options and the key were gone, and the key store stayed. Password unlock on the lock screen worked afterwards. MacBook Pro 14" M2 Max (J414c), same build, a first-time Touch ID setup (no key store, no calibration, the driver never loaded;
Since then, 🤖 Generated with Claude Code |
|
@maralcbr thanks for the review. Here's what changed for each point, across the four PRs. omarchy-mac-pkgs#12
Two things your reviews surfaced for #180, noted in the description:
omarchy#16360: split as asked. The cross-platform parts are now #16403: removal asking for sudo up front and running omarchy-mac-installer#120: closing it. With extraction on Linux, nothing needs the installer to rebuild or stage the key, so the policy question goes away. #121 is resolved by its option 3: the archive is documented and used. omarchy-pkgs#1485: agreed. Master's Tested end to end at
🤖 Generated with Claude Code |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
The hook records Touch ID's status and starts the activation, but without the owner's agreement the activation is skipped, so on most Macs it only checks. "Activating Touch ID..." on every install or update suggested otherwise. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On an M3 Air the driver loaded but the enclave hung and /dev/sep-bio never appeared, so the activation never ran. The status still read "available", offering Touch ID again against a driver stuck until a restart, and the error pointed at the activation's journal, which said only "skipped". - touchid-enable records "failed" when the driver loaded but the node or keybag never appeared, or the activation recorded nothing, and then names what's missing and points at journalctl -k. A reason the activation recorded stands. - touchid-status keeps that reason (failed, not-ready, unproven, blocked) for the rest of the boot once touchid-enable has loaded the driver, so an update's re-run doesn't bring the offer back. The next boot works it out again. - Setup's refusal for those reasons says to restart and try again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
maralcbr
left a comment
There was a problem hiding this comment.
Approving at 643e028. Every point from my earlier review is addressed:
- USB readers enrol where Touch ID can't be used:
enable-fingerprintexits 0 fornone/unsupported:*, and works out eligibility again when the status file is missing. - No partition wait without consent: the load unit waits with
udevadm waitinside the service, afterExecCondition, instead of a device dependency. - Activation needs the owner's agreement:
ConditionPathExists=/etc/omarchy-mac/touchid-on. - Wait unit ordered after the load:
After=omarchy-mac-touchid-load.service. - The prompt drops the unverifiable reassurance.
- The Neo's sensor key exists only after a yes:
touchid-root-keyrebuilds it fromasahi/all_firmware.tar.gzin memory, checks each record against this Mac's iBoot System Container, and writes it root-only, renaming it only once it is whole.disable-fingerprintdeletes it, and the factory-reset carry is gone.
Accepted limitations:
- Saying no on a Mac that can use Touch ID still stops setup, so a USB reader there can't enrol without saying yes.
disable-fingerprintis machine-wide, as removal already is for PAM and the packages.
Follow-ups (non-blocking):
- Put one
flockaroundtouchid-enableanddisable-fingerprint. Two setup runs at once can race onmsrk-j700.bin.new, andinstalledchecks only that the key exists, so a damaged key would stay. A shared lock fixes the race, and checking an existing key's envelope would let a bad one be replaced. - Bound
touchid-root-key's archive reads by member count and total bytes, not only per record. - Narrow the docstring's "an archive from another Mac, or one swapped on the ESP, is refused". The check proves the records are present in the iBoot System Container, not that they are authentic.
- A way to enrol a USB reader after declining Touch ID.
Integration: Touch ID on the Neo now depends on asahi/all_firmware.tar.gz staying on the ESP. omacom/omarchy-mac-installer#121 should close as "keep the archive", not be fixed by removing it.
Merge only after its prerequisites below are in. The Omarchy side is omacom/omarchy#14675 (detection) and omacom/omarchy#15512 (enrollment), both merged, and two new Omarchy changes: omacom/omarchy#16403 (removal deletes the reader's own prints) and omacom/omarchy#16360 (the
enable-fingerprintanddisable-fingerprintdispatch operations, on top of #16403).Summary
omarchy-macoffers Touch ID as a fingerprint reader, and turns it on only after the Mac's owner agrees. Omarchy's own detection, post-update invitation and fingerprint setup then reach Macs with Touch ID.Nothing loads the Secure Enclave driver until the owner says yes, and nothing reads the MacBook Neo's device-private sensor key before then either. At boot a status unit records whether this Mac can use Touch ID, without loading anything. Omarchy offers Setup > Security > Fingerprint, and its setup asks the platform first. The consent prompt explains what turning Touch ID on leaves behind, and turns it on only on yes:
How consent works
Eligible Macs only.
availableneeds:/chosen/apfs-preboot-uuid;asahi/all_firmware.tar.gzandpython;M1-family Macs are left out: their cold boot needs
xart_guard=0, a bigger consent than M2's.Everywhere else, setup goes on. A Mac without a sensor, an M1, or a board without a profile lets Omarchy's setup carry on, so a USB reader enrols on a Mac mini, a Studio or an M1 Mac as it would without Touch ID. A missing status file is worked out again.
The prompt covers:
An existing key store is not consent. That owner never saw this text, so they are asked too. An owner who already agreed is never asked again; a Mac that isn't
readyyet is told to restart.Yes carves what is missing into
/usr/lib/firmware/updates:extract-mesa-calibration;apple/msrk-j700.bin, rebuilt bytouchid-root-key(below).It then writes
/etc/omarchy-mac/touchid-onand the driver options, loadsapple-sep, and succeeds only once the activation recordsready. A failure after that takes the record back, unless it was already there, and takes back a key this run rebuilt. Failed writes are reported, never passed off as success.No, an empty answer or a closed terminal leaves Touch ID off and writes nothing.
Turning it off, through Omarchy's fingerprint removal, deletes the prints through fprintd first (#16403). It then removes the record, the options and the Neo's key. The driver stops loading from the next boot. The key store stays.
At boot,
omarchy-mac-touchid-load.serviceloadsapple-seponly while the record exists. It waits for the iBoot System Container's partition link, which the driver opens as it probes, withudevadm waitonce its condition holds. It deliberately has no device dependency: systemd waits for a unit's devices before checking its condition, so every boot would wait on the partition. It runs before the greeter and fprintd.The Neo's sensor key
The Neo's Touch ID needs a device-private sensor root key.
touchid-root-key(Python standard library only) rebuilds it only after the owner says yes. It reads this Mac's own factory records fromasahi/all_firmware.tar.gz, which asahi-installer writes to the ESP on every install, and assembles the key exactly as omarchy-mac-installer'sfactory_root_key()does on macOS.0600, to a temporary file it created, synced and renamed.This replaces the earlier design, where the installer rebuilt the key on every Neo install (omacom/omarchy-mac-installer#120) and this package kept it in
/var/lib/omarchy-mac.Prerequisites
/chosen/apfs-preboot-uuid: done. omarchy-pkgs'm1n1-auroranow builds omacom/m1n1, which carries it (m1n1-aurora: forward the preboot UUID so the Secure Enclave gets its OS identity (Touch ID) omarchy-pkgs#1485 was closed for that reason).omarchy-macto 0.2.0 and re-pins it.pythonis already among its dependencies.omacom/linux-aurora#180 changes the consent switch. With #180 the driver autoloads read-only on every Mac (
xart_writes=0 provision_keybag=0), and opt-in becomes a modprobe options file.enable-fingerprintalready writes that file,/etc/modprobe.d/omarchy-mac-touchid.confwithxart_writes=1 provision_keybag=1, alongside the boot-load record, anddisable-fingerprintremoves both. How that plays out:apple-sep.conf, so it wins.availableand is offered Touch ID.blockedreachesreadyafter a restart.xart_writes=0(linux-aurora cbd3a9b1ad3f)./dev/sep-biowhen it probes its readers, so fprintd's allowance for it needs the same gate before #180 ships. Once #180 lands, the load unit goes away, and the prompt should say Touch ID stops writing, not that the driver stops loading.The fingerprint setup installs the published
libfprint-git, whose aarch64 build carries the Touch ID driver (omacom/omarchy-pkgs#806), so this package doesn't depend on it.Evidence
MacBook Neo (J700), 2026-10-23, this design end to end at
ab5a5b6, with #16403 and #16360's commands installed by hand. Details are in the comment below.availablestraight away.0600, one copy). Enrol passed.ready. The lock screen andsudotook the finger.MacBook Pro 14" M2 Max (J414c), 2026-10-23, same build, a first-time setup. The calibration was carved on yes. On the agreed cold boot the driver was loaded in under 0.1 s. The lock screen and
sudotook the finger, and removal ran in the same order.Earlier runs, in the comments above:
aurora-touchid. It enrolled through the invitation, and after a 1 h 15 min sleep the lock screen took the finger, as didpkexecandsudo.xart_guard=0.Tests. The package tests cover:
Every new check was shown to fail against a deliberate break. The integration test runs the runtime against
availableandready.Merge Danger
Door: two-way
The invitation is one-way for each owner: once shown, it doesn't come back. Turning Touch ID on leaves a key store and advances shared Secure Enclave state; the prompt says so before anything is written.
Blast Radius: Macs with Touch ID
🤖 Generated with Claude Code