Add allow_absent_user_presence to validate_registration - #3
Open
willert wants to merge 1 commit into
Open
Conversation
A conditional create - navigator.credentials.create() with mediation set to "conditional", the mechanism behind automatic passkey upgrades - performs no ceremony at the authenticator. No gesture is observed, so the User Present bit is clear by design and step 14 rejects every such registration, however valid it otherwise is. There is currently no way to accept one. The presence guarantee for a conditional create comes from the client rather than the authenticator: it performs the upgrade only immediately after its own password manager has handled a sign-in for the origin. Only a Relying Party that asked for a conditional creation knows that applies, so the check stays on unless it says otherwise. The option relaxes that single check and nothing else - a test covers a conditional registration still failing a required user verification. Adversarially stress-tested by six independent Claude agents, one per attack dimension (option leakage, parameter truthiness, test-lever integrity, flag combinations, attestation formats, backwards compatibility), all clean. In particular: the option is unreachable from validate_assertion and inert in the constructor; every falsy spelling leaves the check enforced, matching the sibling allow_* options; the UP-clear override provably reaches the wire flags byte; packed and fido-u2f attestation stays bound to the exact authData bytes, so a signature made over different flag bits is still rejected when the option is set; and with the parameter absent, the upstream suite's verbose TAP output is identical under old and new code. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
This adds an opt-in
allow_absent_user_presenceparameter tovalidate_registration, following the existingallow_untrusted_attestation/allow_unknown_attestation_formatidiom.Why: a conditional create -
navigator.credentials.create()withmediation: "conditional", the mechanism behind automatic passkey upgrades - performs no ceremony at the authenticator, so the User Present bit is clear by design. Step 14 is currently enforced unconditionally, which rejects every such registration and makes browser-driven passkey upgrades impossible for a Perl relying party. The presence guarantee for a conditional create comes from the client instead: it performs the upgrade only immediately after its own password manager has handled a sign-in for the origin. Only a relying party that asked for a conditional creation knows that applies, hence strictly opt-in.Scope: the option relaxes exactly that one check. With the parameter absent, behaviour is unchanged - the existing test suite's verbose TAP output is identical under current main and this branch. Three new tests cover the default rejection, the opt-in acceptance, and a required user verification still being enforced with the option set.
Full disclosure - this was built by AI. The change was authored by Anthropic's Claude, directed and reviewed by a human. We tried to compensate for that provenance with unusual care: it was adversarially stress-tested by six independent agents across option leakage, parameter truthiness, test-lever integrity, flag combinations, attestation formats (packed and fido-u2f orthogonality verified against hand-built self-attestations), and backwards compatibility - the summary is in the commit message body. One honest gap: no real browser has driven a conditional create against it end to end (headless Chrome refuses conditional creation with a virtual authenticator), so the conditional-create semantics rest on the specification and fabricated authenticator responses.
We are not sure whether AI-built contributions are acceptable to this project. If they are not, no hard feelings - feel free to close. Otherwise, happy to adjust anything.
🤖 Generated with Claude Code