-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
The WebAuthnIDLResponse::to_inner_model() implementations for MakeCredentialResponse and Assertion currently cannot populate two fields that are known at the transport layer:
transports(MakeCredential only) - hardcoded toVec::new()into_inner_model()authenticator_attachment- hardcoded toNonefor both response types
Current workaround
Consumers (like credentialsd) must modify the returned RegistrationResponseJSON / AuthenticationResponseJSON after calling to_inner_model():
let mut registration_json = response.ctap.to_inner_model(request)?;
registration_json.response.transports = transports_from_transport_layer.clone();
registration_json.authenticator_attachment = Some(attachment_modality.clone());Proposed Solution
- libwebauthn already has a concept of transports (
AuthenticatorTransportenum) - The transport implementations (
UsbTransport,NfcTransport, etc.) could report their transport type, andauthenticator_attachmentcould be derived from the authenticator info. - The attachment modality ("platform" vs "cross-platform") can be determined based on the transport used
- This information is available during the WebAuthn operation but not currently captured in the response
References
- WebAuthn Level 3 spec:
AuthenticatorAttestationResponseJSON.transports - WebAuthn Level 3 spec:
PublicKeyCredentialJSON.authenticatorAttachment
Metadata
Metadata
Assignees
Labels
No labels