Repository navigation
fix(attestor): require user presence instead of the current biometry set - #3
Merged
Merged
Conversation
Claude-Session-Id: 900424b6-7393-480c-a26a-f1bd21da6e57
yasyf
added a commit
that referenced
this pull request
Nov 17, 2026
…#11) `cookiesync auth` on the Mac Studio prints `Touch ID authentication was cancelled or denied` right after a correct passcode entry. Nothing was cancelled. The unified log for every failed run since 01:02 today reads: ``` authkit: vault-batch-retrieve: SecItemAdd failed: The user name or passphrase you entered is not correct. (OSStatus -25293) ``` This is the vault's copy of the bug #3 fixed in the attestor. The vault ACL was `[.biometryCurrentSet, .or, .devicePasscode]`, and macOS binds that flag to the current fingerprint database at `SecItemAdd`. This Studio has no usable Touch ID right now. coreauthd reports `-13 Accessory disconnected and biometry not enrolled` and `bioutil -c` counts zero templates, so coreauthd logs `Failed to get bio database hash` and the add fails with `errSecAuthFailed`. `batchRetrieve` hit it on re-enrollment. Because `enroll` deletes the old item before adding the new one, the first failure left the vault item gone, and every later tap went through the same failing re-enroll. `HelperFailure.failed` exits 1, the same code as a denial, so cookiesync reported it as a cancelled prompt. A standalone probe on this Mac reproduces the split: `evaluateAccessControl(.createItem)` fails with LAError -1000 for the old ACL and succeeds for `.userPresence`. The ACL becomes `.userPresence`, which needs Touch ID or the device passcode, the same policy the sheet already evaluates. As in #3, the only loss is invalidation when a finger changes. The passcode already satisfied the old ACL, and an invalidated item was silently re-enrolled under whatever context had just authenticated, so that binding never gated anything. Existing items keep their ACL until they next re-enroll. A failed evaluation also names its LAError code on stderr, such as `denied (LAError -2)`, instead of a bare `denied`, so a caller can show what happened. The changelog cuts 0.3.0, which had shipped from Unreleased, and adds 0.3.1. The flags move to `Vault.accessControlFlags`, and a headless test pins `.userPresence` and checks that `.biometryCurrentSet` is absent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
sudo cc-sudo installon the Mac Studio still fails at keygen after #1, now with a different error:The attestation key's ACL included
.biometryCurrentSet. To create a key under that flag, the Enclave binds it to the current fingerprint database. When Touch ID is unavailable, coreauthd can't read that database's hash, andSecKeyCreateRandomKeyfails witherrSecAuthFailed. This Studio's Touch ID keyboard reports-13 biometryDisconnectedright now. coreauthd's log at the failed run readsFailed to get bio database hash. A standalone Enclave keygen under the old ACL reproduces the same error.The ACL becomes
[.userPresence, .privateKeyUsage]: every signature still needs Touch ID or the device passcode. Signing already evaluates.deviceOwnerAuthentication, so the consent flow is unchanged. The one thing this gives up is invalidation when a finger is added or removed; the passcode already satisfied the old ACL, so that binding was never a hard gate. Existing keys keep their ACL, becauseensureKey()never rotates.The flags move to
SEAttestor.accessControlFlags, and a headless test pins.userPresenceand the absence of.biometryCurrentSet.