REOPENED 220190
NSCrossWebsiteTrackingUsageDescription is not working on Mac, ITP is always enabled
https://bugs.webkit.org/show_bug.cgi?id=220190
Summary NSCrossWebsiteTrackingUsageDescription is not working on Mac, ITP is always e...
Dan
Reported 2020-12-28 23:01:20 PST
We use WKWebView for Mac, and with the Big Sur update ITP became enabled by default and is breaking valid auth scenarios that depend on cookies in an iframe. We would like to be able to disable ITP, but adding NSCrossWebsiteTrackingUsageDescription to the info.plist is not all that is necessary. TCCAccessPreflight(getkTCCServiceWebKitIntelligentTrackingPrevention(), nullptr) check is also performed. For iOS this is controlled by a toggle in the application OS provided settings (defaults to ITP enabled), but on Mac there does not seem to be an equivalent. I have looked through UI and documentation but have not been able to find where a Mac user can allow third-party cookies after adding NSCrossWebsiteTrackingUsageDescription to the plist. We are not a browser application, but are required to use WKWebView to render web content due to app store policies. We would like control over this ITP setting in our app which is breaking compatibility.
Attachments
Patch (2.29 KB, patch)
2021-01-05 13:38 PST, Kate Cheney
no flags
Patch (3.29 KB, patch)
2021-01-05 13:53 PST, Kate Cheney
no flags
Patch for landing (3.28 KB, patch)
2021-01-05 17:53 PST, Kate Cheney
no flags
Radar WebKit Bug Importer
Comment 1 2020-12-30 15:59:13 PST
Kate Cheney
Comment 2 2021-01-05 13:38:30 PST
Brent Fulgham
Comment 3 2021-01-05 13:44:19 PST
Comment on attachment 417032 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417032&action=review > Source/WebKit/Shared/Cocoa/DefaultWebBrowserChecks.mm:115 > +#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(MACCATALYST) Stylechecker is reminding us " Misplaced OS version check. Please use a named macro in one of headers in the wtf/Platform." Could you do the extra work to add a new PlatformUse.h entry? #if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000) || PLATFORM(MACCATALYST) #define USE_ITP_TCC_CHECK 1 #endif Then we would just do: #if USE(ITP_TCC_CHECK) #else #endif
Kate Cheney
Comment 4 2021-01-05 13:53:08 PST
Brent Fulgham
Comment 5 2021-01-05 14:12:40 PST
Comment on attachment 417034 [details] Patch r=me
EWS
Comment 6 2021-01-05 17:09:07 PST
Found 1 new test failure: imported/w3c/web-platform-tests/html/semantics/document-metadata/the-meta-element/pragma-directives/attr-meta-http-equiv-refresh/parsing.html
Kate Cheney
Comment 7 2021-01-05 17:11:17 PST
This test failure seems flaky and unrelated, trying cq+ again.
Kate Cheney
Comment 8 2021-01-05 17:53:43 PST
Created attachment 417063 [details] Patch for landing
EWS
Comment 9 2021-01-05 21:30:05 PST
Committed r271192: <https://trac.webkit.org/changeset/271192> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417063 [details].
Kate Cheney
Comment 10 2021-01-06 10:12:03 PST
*** Bug 220199 has been marked as a duplicate of this bug. ***
WebKit Commit Bot
Comment 11 2021-01-07 15:23:03 PST
Re-opened since this is blocked by bug 220440
Note You need to log in before you can comment on or make changes to this bug.