Skip to content

Add allow_absent_user_presence to validate_registration - #3

Open
willert wants to merge 1 commit into
LemonLDAPNG:mainfrom
willert:allow-absent-user-presence
Open

Add allow_absent_user_presence to validate_registration#3
willert wants to merge 1 commit into
LemonLDAPNG:mainfrom
willert:allow-absent-user-presence

Conversation

@willert

@willert willert commented Jul 30, 2026

Copy link
Copy Markdown

This adds an opt-in allow_absent_user_presence parameter to validate_registration, following the existing allow_untrusted_attestation / allow_unknown_attestation_format idiom.

Why: a conditional create - navigator.credentials.create() with mediation: "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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants