Bug 238154 - [WebAuthn] Support getAssertion for virtual HID authenticators
Summary: [WebAuthn] Support getAssertion for virtual HID authenticators
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: pascoe@apple.com
URL:
Keywords: InRadar
: 237857 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-03-21 14:30 PDT by pascoe@apple.com
Modified: 2022-03-30 15:32 PDT (History)
2 users (show)

See Also:


Attachments
Patch (19.28 KB, patch)
2022-03-21 14:35 PDT, pascoe@apple.com
no flags Details | Formatted Diff | Diff
Patch for landing (19.49 KB, patch)
2022-03-21 16:07 PDT, pascoe@apple.com
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description pascoe@apple.com 2022-03-21 14:30:48 PDT
Virtual authenticators for WebAuthn support different transprots: nfc, usb, internal, and ble. Currently, we only fully support the internal transport and makeCredential for usb-transport. The default transport for web-platform-tests is usb. 

We should support getAssertion for the usb transport to run more WPT tests.
Comment 1 Radar WebKit Bug Importer 2022-03-21 14:31:00 PDT
<rdar://problem/90593150>
Comment 2 pascoe@apple.com 2022-03-21 14:35:48 PDT
Created attachment 455276 [details]
Patch
Comment 3 Brent Fulgham 2022-03-21 15:41:09 PDT
Comment on attachment 455276 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=455276&action=review

r=me, but please correct the pass-by-value mistake.

> Source/WebCore/ChangeLog:9
> +        Virtual authenticators for WebAuthn support different transprots: nfc, usb, internal,

*transports

> Source/WebCore/Modules/webauthn/WebAuthenticationUtils.cpp:91
> +

Nit: Extra blank line here.

> Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp:62
> +    VirtualCredential cred = credential;

Weird that you have to make this copy!

> Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorManager.cpp:66
> +Vector<VirtualCredential> VirtualAuthenticatorManager::credentialsMatchingList(const String& authenticatorId, const String& rpId, Vector<Vector<uint8_t>> credentialIds)

credentialIds should be passed as a const& since you only read it.

> Source/WebKit/UIProcess/WebAuthentication/Virtual/VirtualAuthenticatorUtils.h:39
> +Vector<uint8_t> signatureForPrivateKey(RetainPtr<SecKeyRef> privateKey, const Vector<uint8_t>& authData, const Vector<uint8_t> clientDataHash);

clientDataHash should be a const referenced, not just a const vector.
Comment 4 pascoe@apple.com 2022-03-21 16:07:51 PDT
Created attachment 455293 [details]
Patch for landing
Comment 5 EWS 2022-03-22 08:41:05 PDT
ChangeLog entry in Source/WebCore/ChangeLog contains OOPS!.
Comment 6 pascoe@apple.com 2022-03-22 09:14:39 PDT
Committed r291624 (?): <https://commits.webkit.org/r291624>
Comment 7 pascoe@apple.com 2022-03-30 15:32:05 PDT
*** Bug 237857 has been marked as a duplicate of this bug. ***