Source/WTF/ChangeLog

 12020-10-21 Jiewen Tan <jiewen_tan@apple.com>
 2
 3 [WebAuthn] Make WebContent process talk to the WebAuthn process for WebAuthn requests
 4 https://bugs.webkit.org/show_bug.cgi?id=218070
 5 <rdar://problem/70384404>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 * Scripts/Preferences/WebPreferencesExperimental.yaml:
 10 Adds bindings in WebCore.
 11
1122020-10-20 Sihui Liu <sihui_liu@apple.com>
213
314 Add stubs for SpeechRecognition

Source/WebCore/ChangeLog

 12020-10-21 Jiewen Tan <jiewen_tan@apple.com>
 2
 3 [WebAuthn] Make WebContent process talk to the WebAuthn process for WebAuthn requests
 4 https://bugs.webkit.org/show_bug.cgi?id=218070
 5 <rdar://problem/70384404>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Covered by existing tests.
 10
 11 * page/RuntimeEnabledFeatures.h:
 12 (WebCore::RuntimeEnabledFeatures::setWebAuthenticationModernEnabled):
 13 (WebCore::RuntimeEnabledFeatures::webAuthenticationModernEnabled const):
 14 Adds bindings in WebCore.
 15
1162020-10-20 Julian Gonzalez <julian_a_gonzalez@apple.com>
217
318 Release assert in ~Node due to render element of pseudo element not getting removed in time

Source/WebKit/ChangeLog

 12020-10-21 Jiewen Tan <jiewen_tan@apple.com>
 2
 3 [WebAuthn] Make WebContent process talk to the WebAuthn process for WebAuthn requests
 4 https://bugs.webkit.org/show_bug.cgi?id=218070
 5 <rdar://problem/70384404>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Once modern web authentication is enabled, let WebContent process talk to the WebAuthn process
 10 for WebAuthn requests.
 11
 12 * Scripts/process-entitlements.sh:
 13 Adds necessary entitlements for the WebAuthn process.
 14
 15 * UIProcess/WebAuthentication/AuthenticatorManager.cpp:
 16 (WebKit::AuthenticatorManager::handleRequest):
 17 Adds a way to distinguish if itself is in the UI Process or in the WebAuthn process.
 18
 19 * WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp:
 20 (WebKit::WebAuthnConnectionToWebProcess::makeCredential):
 21 (WebKit::WebAuthnConnectionToWebProcess::getAssertion):
 22 (WebKit::WebAuthnConnectionToWebProcess::handleRequest):
 23 (WebKit::WebAuthnConnectionToWebProcess::isUserVerifyingPlatformAuthenticatorAvailable):
 24 (WebKit::WebAuthnConnectionToWebProcess::setMockWebAuthenticationConfiguration):
 25 * WebAuthnProcess/WebAuthnConnectionToWebProcess.h:
 26 * WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in:
 27 Adds receivers for messages coming from the web content processes.
 28
 29 * WebAuthnProcess/WebAuthnProcess.cpp:
 30 (WebKit::WebAuthnProcess::WebAuthnProcess):
 31 (WebKit::WebAuthnProcess::setMockWebAuthenticationConfiguration):
 32 * WebAuthnProcess/WebAuthnProcess.h:
 33 (WebKit::WebAuthnProcess::authenticatorManager):
 34 Handles the authenticator managers.
 35
 36 * WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in:
 37 Relaxes sandbox for necessary hardware accesses.
 38
 39 * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
 40 (WebKit::WebAuthenticatorCoordinator::makeCredential):
 41 (WebKit::WebAuthenticatorCoordinator::getAssertion):
 42 (WebKit::WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable):
 43 * WebProcess/WebCoreSupport/WebChromeClient.cpp:
 44 (WebKit::WebChromeClient::setMockWebAuthenticationConfiguration):
 45 Sends messages to the WebAuthn process accordingly.
 46
1472020-10-20 Peng Liu <peng.liu6@apple.com>
248
349 [Media in GPU Process] Some WebAudio layout tests generate strange noises

Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml

@@WebAuthenticationModernEnabled:
900900 humanReadableName: "Web Authentication Modern"
901901 humanReadableDescription: "Enable Modern Web Authentication support"
902902 condition: ENABLE(WEB_AUTHN)
 903 webcoreBinding: RuntimeEnabledFeatures
903904 defaultValue:
904905 WebKitLegacy:
905906 default: false

Source/WebCore/page/RuntimeEnabledFeatures.h

@@public:
246246 bool disableMediaExperiencePIDInheritance() const { return m_disableMediaExperiencePIDInheritance; }
247247#endif
248248
 249#if ENABLE(WEB_AUTHN)
 250 void setWebAuthenticationModernEnabled(bool areEnabled) { m_areWebAuthenticationModernEnabled = areEnabled; }
 251 bool webAuthenticationModernEnabled() const { return m_areWebAuthenticationModernEnabled; }
 252#endif
 253
249254private:
250255 // Never instantiate.
251256 RuntimeEnabledFeatures();

@@private:
370375 bool m_disableMediaExperiencePIDInheritance { false };
371376#endif
372377
 378#if ENABLE(WEB_AUTHN)
 379 bool m_areWebAuthenticationModernEnabled { false };
 380#endif
 381
373382 friend class WTF::NeverDestroyed<RuntimeEnabledFeatures>;
374383};
375384

Source/WebKit/Scripts/process-entitlements.sh

@@function mac_process_gpu_entitlements()
4343 fi
4444}
4545
 46function mac_process_webauthn_entitlements()
 47{
 48 if [[ "${WK_USE_RESTRICTED_ENTITLEMENTS}" == YES ]]
 49 then
 50 plistbuddy Add :com.apple.security.device.usb bool YES
 51
 52 plistbuddy Add :keychain-access-groups array
 53 plistbuddy Add :keychain-access-groups:0 string com.apple.webkit.webauthn
 54 plistbuddy Add :keychain-access-groups:1 string lockdown-identities
 55
 56 plistbuddy Add :com.apple.security.attestation.access bool YES
 57 plistbuddy Add :com.apple.keystore.sik.access bool YES
 58 plistbuddy Add :com.apple.private.RemoteServiceDiscovery.allow-sandbox bool YES
 59 plistbuddy Add :com.apple.private.RemoteServiceDiscovery.device-admin bool YES
 60 plistbuddy Add :com.apple.appattest.spi bool YES
 61 plistbuddy Add :com.apple.mobileactivationd.spi bool YES
 62 plistbuddy Add :com.apple.mobileactivationd.bridge bool YES
 63 plistbuddy Add :com.apple.private.security.bootpolicy bool YES
 64 fi
 65}
 66
4667function mac_process_network_entitlements()
4768{
4869 if [[ "${WK_USE_RESTRICTED_ENTITLEMENTS}" == YES ]]

@@function ios_family_process_gpu_entitlements()
193214 plistbuddy Add :seatbelt-profiles:0 string com.apple.WebKit.GPU
194215}
195216
 217function ios_family_process_webauthn_entitlements()
 218{
 219 plistbuddy Add :com.apple.security.device.usb bool YES
 220
 221 plistbuddy Add :com.apple.private.tcc.allow array
 222 plistbuddy Add :com.apple.private.tcc.allow:0 string kTCCServiceListenEvent
 223
 224 plistbuddy Add :com.apple.security.application-groups array
 225 plistbuddy Add :com.apple.security.application-groups:0 string group.com.apple.webkit
 226
 227 plistbuddy Add :com.apple.security.exception.mach-lookup.global-name array
 228 plistbuddy Add :com.apple.security.exception.mach-lookup.global-name:0 string com.apple.nfcd.hwmanager
 229
 230 plistbuddy Add :com.apple.nfcd.hwmanager bool YES
 231 plistbuddy Add :com.apple.nfcd.session.reader.internal bool YES
 232
 233 plistbuddy Add :keychain-access-groups array
 234 plistbuddy Add :keychain-access-groups:0 string com.apple.webkit.webauthn
 235 plistbuddy Add :keychain-access-groups:1 string lockdown-identities
 236
 237 plistbuddy Add :com.apple.private.MobileGestalt.AllowedProtectedKeys array
 238 plistbuddy Add :com.apple.private.MobileGestalt.AllowedProtectedKeys:0 string UniqueChipID
 239 plistbuddy Add :com.apple.private.MobileGestalt.AllowedProtectedKeys:1 string SerialNumber
 240
 241 plistbuddy Add :com.apple.security.system-groups array
 242 plistbuddy Add :com.apple.security.system-groups:0 string systemgroup.com.apple.mobileactivationd
 243
 244 plistbuddy Add :com.apple.security.attestation.access bool YES
 245 plistbuddy Add :com.apple.keystore.sik.access bool YES
 246 plistbuddy Add :com.apple.appattest.spi bool YES
 247 plistbuddy Add :com.apple.mobileactivationd.spi bool YES
 248}
 249
196250function ios_family_process_network_entitlements()
197251{
198252 plistbuddy Add :com.apple.multitasking.systemappassertions bool YES

@@then
237291 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.Networking ]]; then mac_process_network_entitlements
238292 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.Plugin.64 ]]; then mac_process_plugin_entitlements
239293 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.GPU ]]; then mac_process_gpu_entitlements
 294 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.WebAuthn ]]; then mac_process_webauthn_entitlements
240295 else echo "Unsupported/unknown product: ${PRODUCT_NAME}"
241296 fi
242297elif [[ "${WK_PLATFORM_NAME}" == maccatalyst || "${WK_PLATFORM_NAME}" == iosmac ]]

@@then
259314 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.Networking ]]; then ios_family_process_network_entitlements
260315 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.Plugin.64 ]]; then ios_family_process_plugin_entitlements
261316 elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.GPU ]]; then ios_family_process_gpu_entitlements
 317# elif [[ "${PRODUCT_NAME}" == com.apple.WebKit.WebAuthn ]]; then ios_family_process_webauthn_entitlements
262318 else echo "Unsupported/unknown product: ${PRODUCT_NAME}"
263319 fi
264320else

Source/WebKit/UIProcess/WebAuthentication/AuthenticatorManager.cpp

@@void AuthenticatorManager::handleRequest(WebAuthenticationRequestData&& data, Ca
163163
164164 // 2. Ask clients to show appropriate UI if any and then start the request.
165165 initTimeOutTimer();
166  runPanel();
 166
 167 // The WebPageProxy is used to determine whether or not we are in the UIProcess.
 168 // If so, continue to the old route. Otherwise, use the modern WebAuthn process way.
 169 if (m_pendingRequestData.page) {
 170 runPanel();
 171 return;
 172 }
 173 startDiscovery(getTransports());
167174}
168175
169176void AuthenticatorManager::cancelRequest(const PageIdentifier& pageID, const Optional<FrameIdentifier>& frameID)

Source/WebKit/WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp

2828
2929#if ENABLE(WEB_AUTHN)
3030
 31#include "AuthenticatorManager.h"
 32#include "LocalService.h"
 33#include "WebAuthnProcess.h"
 34#include <WebCore/AuthenticatorResponseData.h>
 35
3136namespace WebKit {
3237using namespace WebCore;
3338

@@void WebAuthnConnectionToWebProcess::didReceiveInvalidMessage(IPC::Connection& c
6267 CRASH();
6368}
6469
 70void WebAuthnConnectionToWebProcess::makeCredential(Vector<uint8_t>&& hash, PublicKeyCredentialCreationOptions&& options, bool processingUserGesture, RequestCompletionHandler&& handler)
 71{
 72 handleRequest({ WTFMove(hash), WTFMove(options), nullptr, WebAuthenticationPanelResult::Unavailable, nullptr, WTF::nullopt, { }, processingUserGesture, String() }, WTFMove(handler));
 73}
 74
 75void WebAuthnConnectionToWebProcess::getAssertion(Vector<uint8_t>&& hash, PublicKeyCredentialRequestOptions&& options, bool processingUserGesture, RequestCompletionHandler&& handler)
 76{
 77 handleRequest({ WTFMove(hash), WTFMove(options), nullptr, WebAuthenticationPanelResult::Unavailable, nullptr, WTF::nullopt, { }, processingUserGesture, String() }, WTFMove(handler));
 78}
 79
 80void WebAuthnConnectionToWebProcess::handleRequest(WebAuthenticationRequestData&& data, RequestCompletionHandler&& handler)
 81{
 82 auto callback = [handler = WTFMove(handler)] (Variant<Ref<AuthenticatorResponse>, ExceptionData>&& result) mutable {
 83 ASSERT(RunLoop::isMain());
 84 WTF::switchOn(result, [&](const Ref<AuthenticatorResponse>& response) {
 85 handler(response->data(), { });
 86 }, [&](const ExceptionData& exception) {
 87 handler({ }, exception);
 88 });
 89 };
 90 m_WebAuthnProcess->authenticatorManager().handleRequest(WTFMove(data), WTFMove(callback));
 91}
 92
 93void WebAuthnConnectionToWebProcess::isUserVerifyingPlatformAuthenticatorAvailable(QueryCompletionHandler&& handler)
 94{
 95 handler(LocalService::isAvailable());
 96}
 97
 98void WebAuthnConnectionToWebProcess::setMockWebAuthenticationConfiguration(WebCore::MockWebAuthenticationConfiguration&& configuration)
 99{
 100 m_WebAuthnProcess->setMockWebAuthenticationConfiguration(WTFMove(configuration));
 101}
 102
65103} // namespace WebKit
66104
67105#endif // ENABLE(WEB_AUTHN)

Source/WebKit/WebAuthnProcess/WebAuthnConnectionToWebProcess.h

3232#include <WebCore/ProcessIdentifier.h>
3333#include <wtf/RefCounted.h>
3434
 35namespace WebCore {
 36struct AuthenticatorResponseData;
 37struct ExceptionData;
 38struct MockWebAuthenticationConfiguration;
 39struct PublicKeyCredentialCreationOptions;
 40struct PublicKeyCredentialRequestOptions;
 41}
 42
3543namespace WebKit {
3644
3745class WebAuthnProcess;
 46struct WebAuthenticationRequestData;
3847
3948class WebAuthnConnectionToWebProcess
4049 : public RefCounted<WebAuthnConnectionToWebProcess>

@@public:
5160 void endSuspension();
5261
5362private:
 63 using RequestCompletionHandler = CompletionHandler<void(const WebCore::AuthenticatorResponseData&, const WebCore::ExceptionData&)>;
 64 using QueryCompletionHandler = CompletionHandler<void(bool)>;
 65
5466 WebAuthnConnectionToWebProcess(WebAuthnProcess&, WebCore::ProcessIdentifier, IPC::Connection::Identifier);
5567
5668 // IPC::Connection::Client
5769 void didClose(IPC::Connection&) final;
5870 void didReceiveInvalidMessage(IPC::Connection&, IPC::MessageName) final;
 71 void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
 72
 73 // Receivers.
 74 void makeCredential(Vector<uint8_t>&& hash, WebCore::PublicKeyCredentialCreationOptions&&, bool processingUserGesture, RequestCompletionHandler&&);
 75 void getAssertion(Vector<uint8_t>&& hash, WebCore::PublicKeyCredentialRequestOptions&&, bool processingUserGesture, RequestCompletionHandler&&);
 76 void isUserVerifyingPlatformAuthenticatorAvailable(QueryCompletionHandler&&);
 77 void setMockWebAuthenticationConfiguration(WebCore::MockWebAuthenticationConfiguration&&);
 78
 79 void handleRequest(WebAuthenticationRequestData&&, RequestCompletionHandler&&);
5980
6081 Ref<IPC::Connection> m_connection;
6182 Ref<WebAuthnProcess> m_WebAuthnProcess;

Source/WebKit/WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in

2323#if ENABLE(WEB_AUTHN)
2424
2525messages -> WebAuthnConnectionToWebProcess {
 26
 27 MakeCredential(Vector<uint8_t> hash, struct WebCore::PublicKeyCredentialCreationOptions options, bool processingUserGesture) -> (struct WebCore::AuthenticatorResponseData data, struct WebCore::ExceptionData exception) Async
 28 GetAssertion(Vector<uint8_t> hash, struct WebCore::PublicKeyCredentialRequestOptions options, bool processingUserGesture) -> (struct WebCore::AuthenticatorResponseData data, struct WebCore::ExceptionData exception) Async
 29 IsUserVerifyingPlatformAuthenticatorAvailable() -> (bool result) Async
 30
 31 SetMockWebAuthenticationConfiguration(struct WebCore::MockWebAuthenticationConfiguration configuration);
2632}
2733
2834#endif // ENABLE(WEB_AUTHN)

Source/WebKit/WebAuthnProcess/WebAuthnProcess.cpp

2929#if ENABLE(WEB_AUTHN)
3030
3131#include "Logging.h"
 32#include "MockAuthenticatorManager.h"
3233#include "WebAuthnConnectionToWebProcess.h"
3334#include "WebAuthnProcessCreationParameters.h"
3435#include <wtf/text/AtomString.h>

@@using namespace WebCore;
3839
3940
4041WebAuthnProcess::WebAuthnProcess(AuxiliaryProcessInitializationParameters&& parameters)
 42 : m_authenticatorManager(makeUniqueRef<AuthenticatorManager>())
4143{
4244 initialize(WTFMove(parameters));
4345}

@@WebAuthnConnectionToWebProcess* WebAuthnProcess::webProcessConnection(ProcessIde
123125 return m_webProcessConnections.get(identifier);
124126}
125127
 128void WebAuthnProcess::setMockWebAuthenticationConfiguration(WebCore::MockWebAuthenticationConfiguration&& configuration)
 129{
 130 if (!m_authenticatorManager->isMock()) {
 131 m_authenticatorManager = makeUniqueRef<MockAuthenticatorManager>(WTFMove(configuration));
 132 return;
 133 }
 134 static_cast<MockAuthenticatorManager*>(&m_authenticatorManager)->setTestConfiguration(WTFMove(configuration));
 135}
 136
126137} // namespace WebKit
127138
128139#endif // ENABLE(WEB_AUTHN)

Source/WebKit/WebAuthnProcess/WebAuthnProcess.h

3131#include "WebAuthnProcessMessages.h"
3232#include <wtf/Function.h>
3333#include <wtf/MemoryPressureHandler.h>
 34#include <wtf/UniqueRef.h>
3435#include <wtf/WeakPtr.h>
3536
 37namespace WebCore {
 38struct MockWebAuthenticationConfiguration;
 39}
 40
3641namespace WebKit {
3742
 43class AuthenticatorManager;
3844class WebAuthnConnectionToWebProcess;
3945struct WebAuthnProcessCreationParameters;
4046

@@public:
5561
5662 WebAuthnConnectionToWebProcess* webProcessConnection(WebCore::ProcessIdentifier) const;
5763
 64 AuthenticatorManager& authenticatorManager() { return m_authenticatorManager.get(); }
 65 void setMockWebAuthenticationConfiguration(WebCore::MockWebAuthenticationConfiguration&&);
 66
5867private:
5968 void lowMemoryHandler(Critical);
6069

@@private:
7786
7887 // Connections to WebProcesses.
7988 HashMap<WebCore::ProcessIdentifier, Ref<WebAuthnConnectionToWebProcess>> m_webProcessConnections;
 89
 90 UniqueRef<AuthenticatorManager> m_authenticatorManager;
8091};
8192
8293} // namespace WebKit

Source/WebKit/WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in

380380 (ipc-posix-name-regex #"^CFPBS:")) ; <rdar://problem/13757475>
381381(allow system-fsctl (fsctl-command (_IO "h" 47)))
382382
383 ;; Graphics
384 (system-graphics)
385 
386383;; Networking
387384(allow network-outbound
388385 ;; Local mDNSResponder for DNS, arbitrary outbound TCP

438435
439436;; Data Detectors
440437(allow file-read* (subpath "/private/var/db/datadetectors/sys"))
 438
 439;; Allow accesses to HID
 440(allow iokit-open
 441 (iokit-user-client-class "IOHIDLibUserClient"))
 442
 443;; Allow accesses to LocalAuthentication and RemoteService
 444(allow mach-lookup
 445 (global-name "com.apple.CoreAuthentication.agent.libxpc")
 446 (global-name "com.apple.remoted"))

Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp

3030
3131#include "FrameInfoData.h"
3232#include "WebAuthenticatorCoordinatorProxyMessages.h"
 33#include "WebAuthnConnectionToWebProcess.h"
 34#include "WebAuthnProcessConnection.h"
3335#include "WebFrame.h"
3436#include "WebPage.h"
3537#include <JavaScriptCore/ConsoleTypes.h>

@@void WebAuthenticatorCoordinator::makeCredential(const Frame& frame, const Secur
5759 if (!processingUserGesture)
5860 m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events."_s);
5961
60  m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::MakeCredential(webFrame->frameID(), webFrame->info(), hash, options, processingUserGesture), WTFMove(handler));
 62 if (!RuntimeEnabledFeatures::sharedFeatures().webAuthenticationModernEnabled()) {
 63 m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::MakeCredential(webFrame->frameID(), webFrame->info(), hash, options, processingUserGesture), WTFMove(handler));
 64 return;
 65 }
 66
 67 WebProcess::singleton().ensureWebAuthnProcessConnection().connection().sendWithAsyncReply(Messages::WebAuthnConnectionToWebProcess::MakeCredential(hash, options, processingUserGesture), WTFMove(handler));
6168}
6269
6370void WebAuthenticatorCoordinator::getAssertion(const Frame& frame, const SecurityOrigin&, const Vector<uint8_t>& hash, const PublicKeyCredentialRequestOptions& options, RequestCompletionHandler&& handler)

@@void WebAuthenticatorCoordinator::getAssertion(const Frame& frame, const Securit
7077 if (!processingUserGesture)
7178 m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events."_s);
7279
73  m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::GetAssertion(webFrame->frameID(), webFrame->info(), hash, options, processingUserGesture), WTFMove(handler));
 80 if (!RuntimeEnabledFeatures::sharedFeatures().webAuthenticationModernEnabled()) {
 81 m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::GetAssertion(webFrame->frameID(), webFrame->info(), hash, options, processingUserGesture), WTFMove(handler));
 82 return;
 83 }
 84
 85 WebProcess::singleton().ensureWebAuthnProcessConnection().connection().sendWithAsyncReply(Messages::WebAuthnConnectionToWebProcess::GetAssertion(hash, options, processingUserGesture), WTFMove(handler));
7486}
7587
7688void WebAuthenticatorCoordinator::isUserVerifyingPlatformAuthenticatorAvailable(QueryCompletionHandler&& handler)
7789{
78  m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::IsUserVerifyingPlatformAuthenticatorAvailable(), WTFMove(handler));
 90 if (!RuntimeEnabledFeatures::sharedFeatures().webAuthenticationModernEnabled()) {
 91 m_webPage.sendWithAsyncReply(Messages::WebAuthenticatorCoordinatorProxy::IsUserVerifyingPlatformAuthenticatorAvailable(), WTFMove(handler));
 92 return;
 93 }
 94
 95 WebProcess::singleton().ensureWebAuthnProcessConnection().connection().sendWithAsyncReply(Messages::WebAuthnConnectionToWebProcess::IsUserVerifyingPlatformAuthenticatorAvailable(), WTFMove(handler));
7996}
8097
8198} // namespace WebKit

Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp

8080#include <WebCore/Icon.h>
8181#include <WebCore/NotImplemented.h>
8282#include <WebCore/RegistrableDomain.h>
 83#include <WebCore/RuntimeEnabledFeatures.h>
8384#include <WebCore/ScriptController.h>
8485#include <WebCore/SecurityOrigin.h>
8586#include <WebCore/SecurityOriginData.h>

@@void WebChromeClient::setUserIsInteracting(bool userIsInteracting)
13771378#if ENABLE(WEB_AUTHN)
13781379void WebChromeClient::setMockWebAuthenticationConfiguration(const MockWebAuthenticationConfiguration& configuration)
13791380{
1380  m_page.send(Messages::WebPageProxy::SetMockWebAuthenticationConfiguration(configuration));
 1381 if (!RuntimeEnabledFeatures::sharedFeatures().webAuthenticationModernEnabled()) {
 1382 m_page.send(Messages::WebPageProxy::SetMockWebAuthenticationConfiguration(configuration));
 1383 return;
 1384 }
 1385
 1386 WebProcess::singleton().ensureWebAuthnProcessConnection().connection().send(Messages::WebAuthnConnectionToWebProcess::SetMockWebAuthenticationConfiguration(configuration), { });
13811387}
13821388#endif
13831389

LayoutTests/ChangeLog

 12020-10-21 Jiewen Tan <jiewen_tan@apple.com>
 2
 3 [WebAuthn] Make WebContent process talk to the WebAuthn process for WebAuthn requests
 4 https://bugs.webkit.org/show_bug.cgi?id=218070
 5 <rdar://problem/70384404>
 6
 7 Reviewed by NOBODY (OOPS!).
 8
 9 Modifies tests that can run on the new WebAuthn process run on it. Some tests will require
 10 mock UI interactions which is not currently supported for the new WebAuthn process. Therefore,
 11 they still run on the UI process.
 12
 13 * http/wpt/webauthn/ctap-hid-failure.https.html:
 14 * http/wpt/webauthn/ctap-hid-success.https.html:
 15 * http/wpt/webauthn/ctap-nfc-failure.https.html:
 16 * http/wpt/webauthn/idl.https.html:
 17 * http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html:
 18 * http/wpt/webauthn/public-key-credential-create-failure-hid.https.html:
 19 * http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html:
 20 * http/wpt/webauthn/public-key-credential-create-failure-local.https.html:
 21 * http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html:
 22 * http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html:
 23 * http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html:
 24 * http/wpt/webauthn/public-key-credential-create-failure.https.html:
 25 * http/wpt/webauthn/public-key-credential-create-success-hid.https.html:
 26 * http/wpt/webauthn/public-key-credential-create-success-local.https.html:
 27 * http/wpt/webauthn/public-key-credential-create-success-nfc.https.html:
 28 * http/wpt/webauthn/public-key-credential-create-success-u2f.https.html:
 29 * http/wpt/webauthn/public-key-credential-create-with-invalid-parameters.https.html:
 30 * http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html:
 31 * http/wpt/webauthn/public-key-credential-get-failure-hid.https.html:
 32 * http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html:
 33 * http/wpt/webauthn/public-key-credential-get-failure-local.https.html:
 34 * http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html:
 35 * http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html:
 36 * http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html:
 37 * http/wpt/webauthn/public-key-credential-get-failure.https.html:
 38 * http/wpt/webauthn/public-key-credential-get-success-hid.https.html:
 39 * http/wpt/webauthn/public-key-credential-get-success-local.https.html:
 40 * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:
 41 * http/wpt/webauthn/public-key-credential-get-success-u2f.https.html:
 42 * http/wpt/webauthn/public-key-credential-get-with-invalid-parameters.https.html:
 43 * http/wpt/webauthn/public-key-credential-ip-address.html:
 44 * http/wpt/webauthn/public-key-credential-is-user-verifying-platform-authenticator-available.html:
 45 * http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html:
 46 * http/wpt/webauthn/public-key-credential-unfocused-document.https.html:
 47
1482020-10-21 Diego Pino Garcia <dpino@igalia.com>
249
350 [GLIB][GTK] Unreviewed test gardening. Update test expectations.

LayoutTests/http/wpt/webauthn/ctap-hid-failure.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: CTAP HID failure cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/ctap-hid-success.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: CTAP HID success cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/ctap-nfc-failure.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: CTAP NFC failure cases with a mock nfc authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/idl.https.html

1 <!doctype html>
 1<!doctype html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<html>
33<head>
44 <meta charset=utf-8>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid-silent.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-hid.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local-silent.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] silent failure cases with a mock local authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-local.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases with a mock local authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-nfc.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases with a mock nfc authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f-silent.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases with a mock u2f authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure-u2f.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases with a mock u2f authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-failure.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] failure cases.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-success-hid.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] success cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-success-local.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] success cases with a mock local authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-success-nfc.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] success cases with a mock nfc authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-success-u2f.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] success cases with a mock u2f authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-create-with-invalid-parameters.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[create]] with invalid parameters.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid-silent.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-hid.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local-silent.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-local.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-nfc.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases with a mock nfc authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f-silent.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases with a mock u2f authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure-u2f.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases with a mock u2f authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-failure.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-success-hid.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] success cases with a mock hid authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-success-local.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] failure cases.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=false ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] success cases with a mock nfc authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-success-u2f.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] success cases with a mock u2f authenticator.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-get-with-invalid-parameters.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential's [[get]] with invalid parameters.</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-ip-address.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<script>
33 if (window.testRunner) {
44 testRunner.dumpAsText();

LayoutTests/http/wpt/webauthn/public-key-credential-is-user-verifying-platform-authenticator-available.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<title>Web Authentication API: PublicKeyCredential.isUserVerifyingPlatformAuthenticatorAvailable().</title>
33<script src="/resources/testharness.js"></script>
44<script src="/resources/testharnessreport.js"></script>

LayoutTests/http/wpt/webauthn/public-key-credential-same-origin-with-ancestors.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<html>
33<head>
44 <meta charset="utf-8">

LayoutTests/http/wpt/webauthn/public-key-credential-unfocused-document.https.html

1 <!DOCTYPE html>
 1<!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAuthenticationModernEnabled=true ] -->
22<html>
33<head>
44 <meta charset="utf-8">