haikuwebkit/Source/WebKit/Configurations/WebAuthnService.xcconfig

37 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

[WebAuthn] Implement a dummy WebAuthenticationAgent https://bugs.webkit.org/show_bug.cgi?id=217401 <rdar://problem/70012011> Reviewed by Darin Adler. Part 1. This patch introduces a new dummy WebAuthenticationAgent where in the future it will take over all WebAuthn operations from the UI Process such that we can isolate high privileged entitlements to this standalone daemon and therefore are able offer WebAuthn to third party WKWebView clients. One of the future feautres will require this new process to listen to LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a XPC service. This is the first part of establishing such a dummy daemon. What it does is to set up a new build target for the daemon and hook it up with WebKit's build system. One can manually load the launchd plist and load the daemon to verify this change. Commands are: launchctl load /to/your/path/com.apple.webkit.WebAuthenticationAgent.plist launchctl start com.apple.webkit.WebAuthenticationAgent.Development Covered by manual tests. * Configurations/WebAuthenticationAgent.xcconfig: Added. Somehow the executable has a suffix .Development for debug/release builds. Will fix that in the later part. * Daemons/WebAuthenticationAgent/Info.plist: Added. * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Added. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Added. The executable location is hardcoded for now. It will be fixed in Part 2 to dynamically point to the right binary. * Daemons/WebAuthenticationAgent/main.mm: Added. (main): * WebKit.xcodeproj/project.pbxproj: Not sure why libWTF.a is needed. Will fix that in the later part. Canonical link: https://commits.webkit.org/230281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 05:16:03 +00:00
// Copyright (C) 2020 Apple Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "BaseXPCService.xcconfig"
[WebAuthn] Implement a dummy WebAuthnProcess https://bugs.webkit.org/show_bug.cgi?id=217559 <rdar://problem/70168749> Reviewed by Brent Fulgham. Source/WebCore: No tests. * en.lproj/Localizable.strings: Provides a name for the WebAuthn process. Source/WebKit: Previous patch r268248 introduces a new daemon to handle all WebAuthn requests. However, after more deeper investigations, the daemon story is not very compelling for WebKit. Here are the two major road blockers: 1) The major one is on macOS. New daemons cannot be installed without a system update. It means relocatable Safari (e.g. STP) and staged Safari on downlevel OSes will not get this feature. And relocatable STP can only utilize the system daemon. This seems a bummer especially for the STP case given it is heavily used to test latest web features. 2) Additional plumbing is needed for testing and engineering builds. This problem is specific to WebKit and is on both macOS and iOS. WebKit doesn't build roots to test engineering builds, which is required to update the plist on the above location. Hence, a separate configuration is needed to generate a different plist that points to the right engineering binary and additional scripts will be needed to ask launchd to load the plist before running any tests. Some extra exercises are probably needed to not confuse launchd about the engineering binary and system binary as well. Given the above constraints, a new architecture is proposed to make the daemon a WebKit XPC service/process instead and leave the launchd event handler to a new Safari daemon. The launchd related feature is only on iOS and therefore it really doesn't make sense to overcome all the above macOS constraints. Having different architectures on iOS (a daemon) and on macOS (a XPC service) accordingly will introduce tons of overhead for maintainance as well. That's why relying on a Safari daemon to do the job is the most reasonable option. This patch therefore focuses on making the WebAuthn process happen and removes the WebAuthn daemon. * CMakeLists.txt: * Configurations/WebAuthnService.xcconfig: Renamed from Source/WebKit/Configurations/WebAuthenticationAgent.xcconfig. * Configurations/WebKit.xcconfig: * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Removed. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Removed. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Paperwork for building the new WebAuthn process. * Platform/ExtraPrivateSymbolsForTAPI.h: * Shared/AuxiliaryProcess.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::processStorageClass): (WebKit::sandboxDirectory): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * Sources.txt: * SourcesCocoa.txt: Paperwork for building the new WebAuthn process. * UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::getLaunchOptions): * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): (WebKit::shouldLeakBoost): * UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: Added. (WebKit::WebAuthnProcessProxy::singleton): (WebKit::WebAuthnProcessProxy::WebAuthnProcessProxy): (WebKit::WebAuthnProcessProxy::getLaunchOptions): (WebKit::WebAuthnProcessProxy::connectionWillOpen): (WebKit::WebAuthnProcessProxy::processWillShutDown): (WebKit::WebAuthnProcessProxy::getWebAuthnProcessConnection): (WebKit::WebAuthnProcessProxy::webAuthnProcessCrashed): (WebKit::WebAuthnProcessProxy::didClose): (WebKit::WebAuthnProcessProxy::didReceiveInvalidMessage): (WebKit::WebAuthnProcessProxy::didFinishLaunching): (WebKit::WebAuthnProcessProxy::updateProcessAssertion): * UIProcess/WebAuthentication/WebAuthnProcessProxy.h: Added. * UIProcess/WebAuthentication/WebAuthnProcessProxy.messages.in: Added. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::getWebAuthnProcessConnection): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getWebAuthnProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnServiceEntryPoint.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnServiceInitializerDelegate::WebAuthnServiceInitializerDelegate): (WebKit::initializeAuxiliaryProcess<WebAuthnProcess>): (WEBAUTHEN_SERVICE_INITIALIZER): * WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp: Added. (WebKit::WebAuthnConnectionToWebProcess::create): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::~WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::didClose): (WebKit::WebAuthnConnectionToWebProcess::didReceiveInvalidMessage): * WebAuthnProcess/WebAuthnConnectionToWebProcess.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnConnectionToWebProcess::connection): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnProcessProcess): (WebKit::WebAuthnConnectionToWebProcess::webProcessIdentifier const): * WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcess.cpp: Added. (WebKit::WebAuthnProcess::WebAuthnProcess): (WebKit::WebAuthnProcess::~WebAuthnProcess): (WebKit::WebAuthnProcess::createWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::removeWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::connectionToWebProcessClosed): (WebKit::WebAuthnProcess::shouldTerminate): (WebKit::WebAuthnProcess::didClose): (WebKit::WebAuthnProcess::lowMemoryHandler): (WebKit::WebAuthnProcess::initializeWebAuthnProcess): (WebKit::WebAuthnProcess::prepareToSuspend): (WebKit::WebAuthnProcess::processDidResume): (WebKit::WebAuthnProcess::resume): (WebKit::WebAuthnProcess::processDidTransitionToForeground): (WebKit::WebAuthnProcess::processDidTransitionToBackground): (WebKit::WebAuthnProcess::webProcessConnection const): * WebAuthnProcess/WebAuthnProcess.h: Added. * WebAuthnProcess/WebAuthnProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcessCreationParameters.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessCreationParameters::encode const): (WebKit::WebAuthnProcessCreationParameters::decode): * WebAuthnProcess/WebAuthnProcessCreationParameters.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. * WebAuthnProcess/ios/WebAuthnProcessIOS.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): * WebAuthnProcess/mac/WebAuthnProcessMac.mm: Added. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in: Added. The sandbox profile is originally from the GPU Process with IOKit related rules removed. Will tighten it again after the process is fully functional. * WebKit.xcodeproj/project.pbxproj: Paperwork for building the new WebAuthn process. * WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::~WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::didClose): (WebKit::WebAuthnProcessConnection::didReceiveInvalidMessage): * WebProcess/WebAuthentication/WebAuthnProcessConnection.h: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::create): (WebKit::WebAuthnProcessConnection::connection): * WebProcess/WebAuthentication/WebAuthnProcessConnection.messages.in: Added. * WebProcess/WebAuthentication/WebAuthnProcessConnectionInfo.h: Added. (WebKit::WebAuthnProcessConnectionInfo::identifier const): (WebKit::WebAuthnProcessConnectionInfo::releaseIdentifier): (WebKit::WebAuthnProcessConnectionInfo::encode const): (WebKit::WebAuthnProcessConnectionInfo::decode): * WebProcess/WebProcess.cpp: (WebKit::getWebAuthnProcessConnection): (WebKit::WebProcess::ensureWebAuthnProcessConnection): (WebKit::WebProcess::webAuthnProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::existingWebAuthnProcessConnection): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. Canonical link: https://commits.webkit.org/230567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-16 19:38:48 +00:00
PRODUCT_NAME = com.apple.WebKit.WebAuthn;
[WebAuthn] Implement a dummy WebAuthenticationAgent https://bugs.webkit.org/show_bug.cgi?id=217401 <rdar://problem/70012011> Reviewed by Darin Adler. Part 1. This patch introduces a new dummy WebAuthenticationAgent where in the future it will take over all WebAuthn operations from the UI Process such that we can isolate high privileged entitlements to this standalone daemon and therefore are able offer WebAuthn to third party WKWebView clients. One of the future feautres will require this new process to listen to LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a XPC service. This is the first part of establishing such a dummy daemon. What it does is to set up a new build target for the daemon and hook it up with WebKit's build system. One can manually load the launchd plist and load the daemon to verify this change. Commands are: launchctl load /to/your/path/com.apple.webkit.WebAuthenticationAgent.plist launchctl start com.apple.webkit.WebAuthenticationAgent.Development Covered by manual tests. * Configurations/WebAuthenticationAgent.xcconfig: Added. Somehow the executable has a suffix .Development for debug/release builds. Will fix that in the later part. * Daemons/WebAuthenticationAgent/Info.plist: Added. * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Added. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Added. The executable location is hardcoded for now. It will be fixed in Part 2 to dynamically point to the right binary. * Daemons/WebAuthenticationAgent/main.mm: Added. (main): * WebKit.xcodeproj/project.pbxproj: Not sure why libWTF.a is needed. Will fix that in the later part. Canonical link: https://commits.webkit.org/230281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 05:16:03 +00:00
PRODUCT_BUNDLE_IDENTIFIER = $(PRODUCT_NAME);
[WebAuthn] Implement a dummy WebAuthnProcess https://bugs.webkit.org/show_bug.cgi?id=217559 <rdar://problem/70168749> Reviewed by Brent Fulgham. Source/WebCore: No tests. * en.lproj/Localizable.strings: Provides a name for the WebAuthn process. Source/WebKit: Previous patch r268248 introduces a new daemon to handle all WebAuthn requests. However, after more deeper investigations, the daemon story is not very compelling for WebKit. Here are the two major road blockers: 1) The major one is on macOS. New daemons cannot be installed without a system update. It means relocatable Safari (e.g. STP) and staged Safari on downlevel OSes will not get this feature. And relocatable STP can only utilize the system daemon. This seems a bummer especially for the STP case given it is heavily used to test latest web features. 2) Additional plumbing is needed for testing and engineering builds. This problem is specific to WebKit and is on both macOS and iOS. WebKit doesn't build roots to test engineering builds, which is required to update the plist on the above location. Hence, a separate configuration is needed to generate a different plist that points to the right engineering binary and additional scripts will be needed to ask launchd to load the plist before running any tests. Some extra exercises are probably needed to not confuse launchd about the engineering binary and system binary as well. Given the above constraints, a new architecture is proposed to make the daemon a WebKit XPC service/process instead and leave the launchd event handler to a new Safari daemon. The launchd related feature is only on iOS and therefore it really doesn't make sense to overcome all the above macOS constraints. Having different architectures on iOS (a daemon) and on macOS (a XPC service) accordingly will introduce tons of overhead for maintainance as well. That's why relying on a Safari daemon to do the job is the most reasonable option. This patch therefore focuses on making the WebAuthn process happen and removes the WebAuthn daemon. * CMakeLists.txt: * Configurations/WebAuthnService.xcconfig: Renamed from Source/WebKit/Configurations/WebAuthenticationAgent.xcconfig. * Configurations/WebKit.xcconfig: * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Removed. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Removed. * DerivedSources-input.xcfilelist: * DerivedSources-output.xcfilelist: * DerivedSources.make: Paperwork for building the new WebAuthn process. * Platform/ExtraPrivateSymbolsForTAPI.h: * Shared/AuxiliaryProcess.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.h: * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): * Shared/mac/AuxiliaryProcessMac.mm: (WebKit::processStorageClass): (WebKit::sandboxDirectory): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * Sources.txt: * SourcesCocoa.txt: Paperwork for building the new WebAuthn process. * UIProcess/AuxiliaryProcessProxy.cpp: (WebKit::AuxiliaryProcessProxy::getLaunchOptions): * UIProcess/Launcher/ProcessLauncher.h: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): (WebKit::shouldLeakBoost): * UIProcess/WebAuthentication/WebAuthnProcessProxy.cpp: Added. (WebKit::WebAuthnProcessProxy::singleton): (WebKit::WebAuthnProcessProxy::WebAuthnProcessProxy): (WebKit::WebAuthnProcessProxy::getLaunchOptions): (WebKit::WebAuthnProcessProxy::connectionWillOpen): (WebKit::WebAuthnProcessProxy::processWillShutDown): (WebKit::WebAuthnProcessProxy::getWebAuthnProcessConnection): (WebKit::WebAuthnProcessProxy::webAuthnProcessCrashed): (WebKit::WebAuthnProcessProxy::didClose): (WebKit::WebAuthnProcessProxy::didReceiveInvalidMessage): (WebKit::WebAuthnProcessProxy::didFinishLaunching): (WebKit::WebAuthnProcessProxy::updateProcessAssertion): * UIProcess/WebAuthentication/WebAuthnProcessProxy.h: Added. * UIProcess/WebAuthentication/WebAuthnProcessProxy.messages.in: Added. * UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::getWebAuthnProcessConnection): * UIProcess/WebProcessPool.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getWebAuthnProcessConnection): * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/Info.plist. * WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnServiceEntryPoint.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnServiceInitializerDelegate::WebAuthnServiceInitializerDelegate): (WebKit::initializeAuxiliaryProcess<WebAuthnProcess>): (WEBAUTHEN_SERVICE_INITIALIZER): * WebAuthnProcess/WebAuthnConnectionToWebProcess.cpp: Added. (WebKit::WebAuthnConnectionToWebProcess::create): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::~WebAuthnConnectionToWebProcess): (WebKit::WebAuthnConnectionToWebProcess::didClose): (WebKit::WebAuthnConnectionToWebProcess::didReceiveInvalidMessage): * WebAuthnProcess/WebAuthnConnectionToWebProcess.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnConnectionToWebProcess::connection): (WebKit::WebAuthnConnectionToWebProcess::WebAuthnProcessProcess): (WebKit::WebAuthnConnectionToWebProcess::webProcessIdentifier const): * WebAuthnProcess/WebAuthnConnectionToWebProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcess.cpp: Added. (WebKit::WebAuthnProcess::WebAuthnProcess): (WebKit::WebAuthnProcess::~WebAuthnProcess): (WebKit::WebAuthnProcess::createWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::removeWebAuthnConnectionToWebProcess): (WebKit::WebAuthnProcess::connectionToWebProcessClosed): (WebKit::WebAuthnProcess::shouldTerminate): (WebKit::WebAuthnProcess::didClose): (WebKit::WebAuthnProcess::lowMemoryHandler): (WebKit::WebAuthnProcess::initializeWebAuthnProcess): (WebKit::WebAuthnProcess::prepareToSuspend): (WebKit::WebAuthnProcess::processDidResume): (WebKit::WebAuthnProcess::resume): (WebKit::WebAuthnProcess::processDidTransitionToForeground): (WebKit::WebAuthnProcess::processDidTransitionToBackground): (WebKit::WebAuthnProcess::webProcessConnection const): * WebAuthnProcess/WebAuthnProcess.h: Added. * WebAuthnProcess/WebAuthnProcess.messages.in: Added. * WebAuthnProcess/WebAuthnProcessCreationParameters.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessCreationParameters::encode const): (WebKit::WebAuthnProcessCreationParameters::decode): * WebAuthnProcess/WebAuthnProcessCreationParameters.h: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. * WebAuthnProcess/ios/WebAuthnProcessIOS.mm: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): * WebAuthnProcess/mac/WebAuthnProcessMac.mm: Added. (WebKit::WebAuthnProcess::initializeProcess): (WebKit::WebAuthnProcess::initializeProcessName): (WebKit::WebAuthnProcess::initializeSandbox): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. * WebAuthnProcess/mac/com.apple.WebKit.WebAuthnProcess.sb.in: Added. The sandbox profile is originally from the GPU Process with IOKit related rules removed. Will tighten it again after the process is fully functional. * WebKit.xcodeproj/project.pbxproj: Paperwork for building the new WebAuthn process. * WebProcess/WebAuthentication/WebAuthnProcessConnection.cpp: Copied from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::~WebAuthnProcessConnection): (WebKit::WebAuthnProcessConnection::didClose): (WebKit::WebAuthnProcessConnection::didReceiveInvalidMessage): * WebProcess/WebAuthentication/WebAuthnProcessConnection.h: Renamed from Source/WebKit/Daemons/WebAuthenticationAgent/main.mm. (WebKit::WebAuthnProcessConnection::create): (WebKit::WebAuthnProcessConnection::connection): * WebProcess/WebAuthentication/WebAuthnProcessConnection.messages.in: Added. * WebProcess/WebAuthentication/WebAuthnProcessConnectionInfo.h: Added. (WebKit::WebAuthnProcessConnectionInfo::identifier const): (WebKit::WebAuthnProcessConnectionInfo::releaseIdentifier): (WebKit::WebAuthnProcessConnectionInfo::encode const): (WebKit::WebAuthnProcessConnectionInfo::decode): * WebProcess/WebProcess.cpp: (WebKit::getWebAuthnProcessConnection): (WebKit::WebProcess::ensureWebAuthnProcessConnection): (WebKit::WebProcess::webAuthnProcessConnectionClosed): * WebProcess/WebProcess.h: (WebKit::WebProcess::existingWebAuthnProcessConnection): Paperwork for introducing the new WebAuthn process. Mostly copied from GPU process. Canonical link: https://commits.webkit.org/230567@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-16 19:38:48 +00:00
INFOPLIST_FILE[sdk=embedded*] = WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-iOS.plist;
INFOPLIST_FILE[sdk=macosx*] = WebAuthnProcess/EntryPoint/Cocoa/XPCService/WebAuthnService/Info-OSX.plist;
[WebAuthn] Implement a dummy WebAuthenticationAgent https://bugs.webkit.org/show_bug.cgi?id=217401 <rdar://problem/70012011> Reviewed by Darin Adler. Part 1. This patch introduces a new dummy WebAuthenticationAgent where in the future it will take over all WebAuthn operations from the UI Process such that we can isolate high privileged entitlements to this standalone daemon and therefore are able offer WebAuthn to third party WKWebView clients. One of the future feautres will require this new process to listen to LaunchEvents, which only daemons can do. That's why it is implemented as a user agent instead of a XPC service. This is the first part of establishing such a dummy daemon. What it does is to set up a new build target for the daemon and hook it up with WebKit's build system. One can manually load the launchd plist and load the daemon to verify this change. Commands are: launchctl load /to/your/path/com.apple.webkit.WebAuthenticationAgent.plist launchctl start com.apple.webkit.WebAuthenticationAgent.Development Covered by manual tests. * Configurations/WebAuthenticationAgent.xcconfig: Added. Somehow the executable has a suffix .Development for debug/release builds. Will fix that in the later part. * Daemons/WebAuthenticationAgent/Info.plist: Added. * Daemons/WebAuthenticationAgent/WebAuthenticationAgent.entitlements: Added. * Daemons/WebAuthenticationAgent/com.apple.webkit.WebAuthenticationAgent.plist: Added. The executable location is hardcoded for now. It will be fixed in Part 2 to dynamically point to the right binary. * Daemons/WebAuthenticationAgent/main.mm: Added. (main): * WebKit.xcodeproj/project.pbxproj: Not sure why libWTF.a is needed. Will fix that in the later part. Canonical link: https://commits.webkit.org/230281@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@268248 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2020-10-09 05:16:03 +00:00
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_VERSIONED_FRAMEWORK_PATH) $(WK_RELOCATABLE_FRAMEWORKS_LDFLAGS);
ENTITLEMENTS_REQUIRED = $(ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_$(USE_INTERNAL_SDK))
ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_ = NO;
ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_NO = NO;
ENTITLEMENTS_REQUIRED_USE_INTERNAL_SDK_YES = $(ENTITLEMENTS_REQUIRED);