-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement experimental allow="private-token" permissions policy
https://bugs.webkit.org/show_bug.cgi?id=266549 rdar://107854094 Reviewed by Youenn Fablet. This patch implements a new experimental permissions policy that provides third-party contexts with access to using Private Tokens, as described in the explainer [0]. If a third-party context is not granted the permission, then it is not allowed to interact in the specified HTTP Authorization [1] flow. If the context is given permission, then that interaction happens at a lower layer than WebKit on Cocoa platforms. [0] https://github.com/WebKit/explainers/tree/main/ThirdPartyPrivateTokens [1] https://datatracker.ietf.org/doc/draft-ietf-privacypass-auth-scheme/ * Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml: * Source/WTF/wtf/PlatformHave.h: * Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h: * Source/WebCore/html/FeaturePolicy.cpp: (WebCore::policyTypeName): (WebCore::FeaturePolicy::parse): (WebCore::FeaturePolicy::allows const): * Source/WebCore/html/FeaturePolicy.h: * Source/WebCore/loader/FrameLoader.cpp: (WebCore::FrameLoader::updateRequestAndAddExtraFields): * Source/WebCore/platform/network/ResourceRequestBase.cpp: (WebCore::ResourceRequestBase::setAsIsolatedCopy): (WebCore::ResourceRequestBase::setIsPrivateTokenUsageByThirdPartyAllowed): * Source/WebCore/platform/network/ResourceRequestBase.h: (WebCore::ResourceRequestBase::RequestData::RequestData): (WebCore::ResourceRequestBase::isPrivateTokenUsageByThirdPartyAllowed const): * Source/WebCore/platform/network/cf/ResourceRequest.h: * Source/WebCore/platform/network/cocoa/ResourceRequestCocoa.mm: (WebCore::ResourceRequest::ResourceRequest): (WebCore::ResourceRequest::getResourceRequestPlatformData const): * Source/WebKit/NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::setShouldSendPrivateTokenIPCForTesting const): * Source/WebKit/NetworkProcess/NetworkProcess.h: * Source/WebKit/NetworkProcess/NetworkProcess.messages.in: * Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::startNetworkLoad): * Source/WebKit/NetworkProcess/NetworkSession.cpp: (WebKit::NetworkSession::setShouldSendPrivateTokenIPCForTesting): * Source/WebKit/NetworkProcess/NetworkSession.h: (WebKit::NetworkSession::shouldSendPrivateTokenIPCForTesting const): * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.h: * Source/WebKit/NetworkProcess/NetworkSessionCreationParameters.serialization.in: * Source/WebKit/NetworkProcess/cocoa/NetworkDataTaskCocoa.mm: (WebKit::NetworkDataTaskCocoa::NetworkDataTaskCocoa): * Source/WebKit/Shared/Cocoa/WebCoreArgumentCodersCocoa.serialization.in: * Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in: * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStore.mm: (-[WKWebsiteDataStore _setPrivateTokenIPCForTesting:]): * Source/WebKit/UIProcess/API/Cocoa/WKWebsiteDataStorePrivate.h: * Source/WebKit/UIProcess/API/Cocoa/_WKWebsiteDataStoreDelegate.h: * Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didAllowPrivateTokenUsageByThirdPartyForTesting): * Source/WebKit/UIProcess/Network/NetworkProcessProxy.h: * Source/WebKit/UIProcess/Network/NetworkProcessProxy.messages.in: * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp: (WebKit::WebsiteDataStore::didAllowPrivateTokenUsageByThirdPartyForTesting): (WebKit::WebsiteDataStore::setPrivateTokenIPCForTesting): * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h: * Source/WebKit/UIProcess/WebsiteData/WebsiteDataStoreClient.h: (WebKit::WebsiteDataStoreClient::didAllowPrivateTokenUsageByThirdPartyForTesting): * Tools/TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm: (-[NavigationDelegate websiteDataStore:didAllowPrivateTokenUsageByThirdPartyForTesting:forResourceURL:]): (setupWebViewForPrivateTokenTests): (TEST): Canonical link: https://commits.webkit.org/273360@main
- Loading branch information
Showing
31 changed files
with
561 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.