[webkit-changes] [WebKit/WebKit] 5eb9af: [WebAuthn] Use AS APIs passing clientData for WebA...

Commit Queue noreply at github.com
Fri Feb 2 15:57:20 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5eb9af6b3b1e3ede9ed7abc879ef17f1937317b4
      https://github.com/WebKit/WebKit/commit/5eb9af6b3b1e3ede9ed7abc879ef17f1937317b4
  Author: Pascoe <pascoe at apple.com>
  Date:   2024-02-02 (Fri, 02 Feb 2024)

  Changed paths:
    M Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp
    M Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h
    M Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp
    M Source/WebCore/Modules/webauthn/AuthenticatorResponseData.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesForwardDeclarations.h
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesSoftLink.h
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm
    M Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp
    M Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h
    M Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in
    M Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp
    M Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h

  Log Message:
  -----------
  [WebAuthn] Use AS APIs passing clientData for WebAuthn
https://bugs.webkit.org/show_bug.cgi?id=268632
rdar://121965181

Reviewed by Brent Fulgham.

We need to be able to pass clientData to AS API in order to make assertions
and registerations in cases where callerOrigin is not the same as the passed
rp.id. This is required because of the way ClientDataJSON is validated.

This change stops generating ClientDataJSON in AuthenticatorCoordinator as
it's no longer possible to pass the raw bytes / hash along. Instead we construct
a ASPublicKeyCredentialClientData when creating the requests for ASController and
include the callerOrigin there.

* Source/WebCore/Modules/webauthn/AuthenticatorCoordinator.cpp:
(WebCore::AuthenticatorCoordinator::create):
(WebCore::AuthenticatorCoordinator::discoverFromExternalSource):
* Source/WebCore/Modules/webauthn/AuthenticatorCoordinatorClient.h:
* Source/WebCore/Modules/webauthn/AuthenticatorResponse.cpp:
(WebCore::AuthenticatorResponse::tryCreate):
* Source/WebCore/Modules/webauthn/AuthenticatorResponseData.h:
(WebCore::AuthenticatorResponseData::AuthenticatorResponseData):
(WebCore::AuthenticatorResponseData::getSerializableForm const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesForwardDeclarations.h:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticationServicesSoftLink.h:
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/WebAuthenticatorCoordinatorProxy.mm:
(WebKit::WebAuthenticatorCoordinatorProxy::constructASController):
(WebKit::WebAuthenticatorCoordinatorProxy::requestsForRegisteration):
(WebKit::WebAuthenticatorCoordinatorProxy::requestsForAssertion):
(WebKit::WebAuthenticatorCoordinatorProxy::performRequest):
(WebKit::configureRegistrationRequestContext):
(WebKit::configureAssertionOptions):
(WebKit::configurationAssertionRequestContext):
(WebKit::WebAuthenticatorCoordinatorProxy::contextForRequest):
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.cpp:
(WebKit::WebAuthenticatorCoordinatorProxy::makeCredential):
(WebKit::WebAuthenticatorCoordinatorProxy::getAssertion):
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h:
* Source/WebKit/UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.messages.in:
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
* Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.h:

Canonical link: https://commits.webkit.org/274023@main




More information about the webkit-changes mailing list