Bug 240038

Summary: [WebAuthn] Remove user gesture requirement for mediation=conditional assertions
Product: WebKit Reporter: pascoe <pascoe>
Component: WebKit Misc.Assignee: pascoe <pascoe>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch for landing none

Description pascoe@apple.com 2022-05-03 14:07:20 PDT
Conditional assertions are non-modal and already require a gesture to complete via
a different mechanism. So if conditional mediation is available on the platform and
requested, we should not require a gesture.
Comment 1 pascoe@apple.com 2022-05-03 14:07:28 PDT
rdar://92137603
Comment 2 pascoe@apple.com 2022-05-03 14:09:58 PDT
Created attachment 458756 [details]
Patch
Comment 3 Brent Fulgham 2022-05-03 14:34:31 PDT
Comment on attachment 458756 [details]
Patch

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

r=me, but please check the cause of the debug failure.

> Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:326
> +            requestContext.get().requestStyle = ASCredentialRequestStyleAutoFill;

Nit: I'd prefer to check and do an early return if it does NOT respond to the selector, rather than this form. It's slightly easier to read and a little more concise.

> Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:110
> +    if (!data.processingUserGesture && !m_webPageProxy.websiteDataStore().authenticatorManager().isVirtual() && data.mediation != MediationRequirement::Conditional)

Nit: It might be slightly more efficient to test the 'data.mediation' condition before retrieving the websiteDataStore->authenticator and calling its isVirtual method.
Comment 4 pascoe@apple.com 2022-05-03 14:42:32 PDT
Created attachment 458758 [details]
Patch for landing
Comment 5 EWS 2022-05-04 10:54:43 PDT
ChangeLog entry in Source/WebKit/ChangeLog contains OOPS!.
Comment 6 pascoe@apple.com 2022-05-04 10:59:08 PDT
Created attachment 458812 [details]
Patch for landing
Comment 7 EWS 2022-05-04 13:29:53 PDT
Committed r293786 (250265@main): <https://commits.webkit.org/250265@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 458812 [details].