Skip to content

feat(webauthn): parse hints & merge into a transport preference#300

Merged
AlfioEmanueleFresta merged 1 commit into
masterfrom
feat/webauthn-hints
Jul 14, 2026
Merged

feat(webauthn): parse hints & merge into a transport preference#300
AlfioEmanueleFresta merged 1 commit into
masterfrom
feat/webauthn-hints

Conversation

@AlfioEmanueleFresta

@AlfioEmanueleFresta AlfioEmanueleFresta commented Jul 14, 2026

Copy link
Copy Markdown
Member

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

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
AlfioEmanueleFresta merged commit 2c09266 into master Jul 14, 2026
8 checks passed
@AlfioEmanueleFresta
AlfioEmanueleFresta deleted the feat/webauthn-hints branch July 14, 2026 18:28
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.

1 participant