Use libwebauthn for JSON request parsing#116
Use libwebauthn for JSON request parsing#116AlfioEmanueleFresta wants to merge 7 commits intomainfrom
Conversation
msirringhaus
left a comment
There was a problem hiding this comment.
Left some questions inline
bbd0150 to
645a81f
Compare
Haven't looked again at this full PR, but I'd like to preserve the 300 second timeout since that's the minimum timeout recommended by the spec for accessibility reasons. I created linux-credentials/libwebauthn#172 to do that. |
645a81f to
639d422
Compare
Switch from a git rev pin to the published 0.3.0 release on crates.io. Adapt to new APIs: - CableQrCodeDevice::new_transient now returns Result<Self, Error>. - UvUpdate gained a PinNotSet variant; handle it (currently logs an error pending UI support for PIN setup).
|
@iinuwa this is now rebased on libwebauthn v0.3.0 and ready for review. If OK, I'll keep the libwebauthn API change (passing in the pre-parased Origin) as a follow up. |
iinuwa
left a comment
There was a problem hiding this comment.
I think this seems fine, but I wasn't able to test due to linux-credentials/libwebauthn#191. I do want to drop the extra lockfiles though, since the one at the workspace root is the effective one.
|
Thanks for your review @iinuwa. I was able to reproduce your issue - it appears to be specific to SoloKeys Solo 2 firmware and JSON requests which include a If it works with you, once linux-credentials/libwebauthn#192 lands I'll publish a new libwebauthn version, then open a new credentialsd PR for the bump. |
The workspace root Cargo.lock is the effective one.
This PR migrates JSON request parsing to use libwebauthn's
WebAuthnIDL::from_json()trait instead of our custom parsing code. This removes ~700 lines of manual parsing in favour of the shared implementation.Changes
MakeCredentialRequest::from_json()andGetAssertionRequest::from_json()from libwebauthnMakeCredentialOptions,GetCredentialOptions,CredentialDescriptor, etc.)d97c80d25bdb974472c40de5e5031db5946ad532(from Web IDL support 3/N: response JSON serialization libwebauthn#155)Behavioral changes
Default timeout
The default timeout when not specified by the relying party changes from 300s to 60s:
credentialsd/credentialsd/src/dbus/model.rs
Line 211 in 03206d2
Allow list transports
Previously we cleared
transportsfrom credentials in the allow list as a workaround. This is no longer done - transports now pass through as-is. These are just UI hints and shouldn't affect functionality.Follow-up