feat(webauthn): parse hints & merge into a transport preference#300
Merged
Conversation
WebAuthn Level 3 lets a relying party say how it expects the user to authenticate, through the hints array, the authenticator attachment, and per-credential transports. All three were parsed at the IDL layer and then dropped on the way to the internal request, so the preference never reached the caller. Parse them into typed enums and merge them into one ordered, de-duplicated list of transports, exposed through a new TransportHintedRequest trait on both request types, so that a consumer can prioritise its device chooser. Hints outrank the attachment, which outranks per-credential transports. A hybrid hint on its own also demotes the platform authenticator. The result is advisory ordering, never an eligibility filter. Unrecognised values parse as Unknown rather than failing, and are ignored when merging. Both new enums are non_exhaustive, since the WebAuthn enumerations are extensible and a future variant should not be a breaking change. Refs: linux-credentials/credentialsd#183
AlfioEmanueleFresta
force-pushed
the
feat/webauthn-hints
branch
from
July 14, 2026 18:15
8b63d7f to
020a9f9
Compare
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.
A relying party can say how it expects the user to authenticate, through the hints array, the authenticator attachment, and per-credential transports. All three were parsed and then dropped on the way to the internal request, so the preference never reached the caller.
They are now parsed into typed enums and merged into one ordered list of transports. Hints outrank the attachment, which outranks per-credential transports, and a hybrid hint on its own demotes the platform authenticator. The result is advisory ordering, never a filter.
The consumer is credentialsd, which uses it to prioritise its device chooser, so there is deliberately no caller in this repo. This is the design agreed in credentialsd#183.
It is source breaking and wants a 0.10.0 bump: credentialsd builds these request types and will need updating in step.
Refs: linux-credentials/credentialsd#183