Page MenuHomePhabricator

Enroll in Chrome third-party cookies deprecation trial
Closed, ResolvedPublic

Description

Docs: https://developers.google.com/privacy-sandbox/3pcd/temporary-exceptions/first-party-deprecation-trial
Generic deprecation trial docs: https://developer.chrome.com/docs/web-platform/origin-trials/#deprecation_trials

SiteApproval requestAdmin UIToken
https://wikipedia.org#329501800linkAonOP4SwCrqpb0nhZbg554z9iJimP3DxUDB8V4yu9fyyepauGKD0NXqTknWi4gnuDfMG6hNb7TDUDTsl0mDw9gIAAABmeyJvcmlnaW4iOiJodHRwczovL3dpa2lwZWRpYS5vcmc6NDQzIiwiZmVhdHVyZSI6IlRvcExldmVsVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9
https://wikimedia.org#329502403linkAiZRcS3GUbfJUjpICyYcwkb5pJoHTOtWo3hg2uyUFvK/uSnlRfsYPkleyeOIqplh8Eg4lCJ9xYS47Krr7crBUAIAAABmeyJvcmlnaW4iOiJodHRwczovL3dpa2ltZWRpYS5vcmc6NDQzIiwiZmVhdHVyZSI6IlRvcExldmVsVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9
https://wikidata.org#329502278linkApLpR6MUn4Lh8nkGvhnbTM6J/UEl9FzwnyUzj1+L4M7fLjGHhlQ0nwdQV4mTytVIm23utWp3MRt1coHkDydcHAwAAABleyJvcmlnaW4iOiJodHRwczovL3dpa2lkYXRhLm9yZzo0NDMiLCJmZWF0dXJlIjoiVG9wTGV2ZWxUcGNkIiwiZXhwaXJ5IjoxNzM1MzQzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0=
https://wikifunctions.org#329502944linkAsfs+eIRf7kk+2WOiojFX8oXadG+/ugTyTR02MCdrsAx4VNVkjYFZcQUe6Q69gn9DTEjlXk1K8nnIClHkt8ZnAMAAABqeyJvcmlnaW4iOiJodHRwczovL3dpa2lmdW5jdGlvbnMub3JnOjQ0MyIsImZlYXR1cmUiOiJUb3BMZXZlbFRwY2QiLCJleHBpcnkiOjE3MzUzNDM5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==
https://wikibooks.org#329502914linkArXXx4JsFxE2hmbbvmrfyRP3qfTbpRMFB7cq9ZpNl9km7hMBY4Rhn+uBjWXK5LLinqjKFcrO1pjGhmX+7ENxDAQAAABmeyJvcmlnaW4iOiJodHRwczovL3dpa2lib29rcy5vcmc6NDQzIiwiZmVhdHVyZSI6IlRvcExldmVsVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9
https://wikinews.org#329503270linkAti+OeQqAqepel42E1HTWhvx4Ozp2n7eRG6dc/cWB6VAHI7zhKxZslPDwl4hZkqAfsQqtInHRNMci3Wac3ntBgkAAABleyJvcmlnaW4iOiJodHRwczovL3dpa2luZXdzLm9yZzo0NDMiLCJmZWF0dXJlIjoiVG9wTGV2ZWxUcGNkIiwiZXhwaXJ5IjoxNzM1MzQzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0=
https://wikiquote.org#329502870linkAquIyYY7KNxGxsucNhRRLc4aJf+WljhPqmnTGI5fjDjRZuvNfu/NgsFsI45j3RKTCV7iKTTOF1mX/79L7ujbjA4AAABmeyJvcmlnaW4iOiJodHRwczovL3dpa2lxdW90ZS5vcmc6NDQzIiwiZmVhdHVyZSI6IlRvcExldmVsVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9
https://wikisource.org#329502800linkAlUyQkIgtM+aB+aSIonr89+Xu1UcWRqff+0pKpw5r3DEmZwbLr+bD6q9JKCo7w4Pjhijsb7rFmkofcOXXOkWCQgAAABneyJvcmlnaW4iOiJodHRwczovL3dpa2lzb3VyY2Uub3JnOjQ0MyIsImZlYXR1cmUiOiJUb3BMZXZlbFRwY2QiLCJleHBpcnkiOjE3MzUzNDM5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==
https://wikiversity.org#329503329linkAtAODtPmG0K62EsAin14BNeXRxDMJMKNrebBRSCGZtAYRms69uZwBIZ710n+7gSBL/4h58GODn1ahhD6lWIQwwUAAABoeyJvcmlnaW4iOiJodHRwczovL3dpa2l2ZXJzaXR5Lm9yZzo0NDMiLCJmZWF0dXJlIjoiVG9wTGV2ZWxUcGNkIiwiZXhwaXJ5IjoxNzM1MzQzOTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZX0=
https://wikivoyage.org#329503262linkAmJSuvVp8f7y3aWAHZT/LlOnA/F7JGc0XG6xFJ9pion9KRliBA1H7Dw5WBgvXuw0nCIj9d7xWgRv0IzMmJtTwwkAAABneyJvcmlnaW4iOiJodHRwczovL3dpa2l2b3lhZ2Uub3JnOjQ0MyIsImZlYXR1cmUiOiJUb3BMZXZlbFRwY2QiLCJleHBpcnkiOjE3MzUzNDM5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==
https://wiktionary.org#329503537linkAp8wkXJPt/P9jgLjuB/D8qa7vLOMZh8iChq1plti6gr0IiKViEHVeI3PWeWmjFZ54qr/EhyKZUyKbblcq/ujzwQAAABneyJvcmlnaW4iOiJodHRwczovL3dpa3Rpb25hcnkub3JnOjQ0MyIsImZlYXR1cmUiOiJUb3BMZXZlbFRwY2QiLCJleHBpcnkiOjE3MzUzNDM5OTksImlzU3ViZG9tYWluIjp0cnVlfQ==
https://mediawiki.org#329504249linkAhAc1cqhS+dyrTSImCdW/5IS/mSUzFrtzOJ7jij5ndsclqfsRKhvOuknkTG5zYlDVLKI5dp9Uwmt0zhXssp4GQ0AAABmeyJvcmlnaW4iOiJodHRwczovL21lZGlhd2lraS5vcmc6NDQzIiwiZmVhdHVyZSI6IlRvcExldmVsVHBjZCIsImV4cGlyeSI6MTczNTM0Mzk5OSwiaXNTdWJkb21haW4iOnRydWV9

Chrome flags for testing:

chrome://flags/#top-level-third-party-cookie-deprecation-trialdisable to see how the site would work without the trial (see Google's description of their new Tracking Protection feature)
chrome://flags/#tracking-protection-3pcdenrolls the browser into third-party cookie blocking (normally only 1% of browsers at this time)
chrome://flags/#tpcd-metadata-grantsdisable to see how the site would work without metadata grants (which are basically identical to the deprecation trial, but are enabled by Google based on having filed a report like #329250103 rather than controlled by the site itself, and will end much sooner)

See QA steps here.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr triaged this task as High priority.Mar 12 2024, 4:43 PM
Tgr moved this task from Inbox, needs triage to Current Sprint on the MediaWiki-Platform-Team board.

Enrolling requires filing a bug about the website being affected, so here it is: https://issuetracker.google.com/issues/329250103

There are two third-party cookie blocking deprecation trials:

  • A first party trial where we could register a top-level domain such as wikipedia.org and third-party cookie access is allowed as long as the top-level document's domain is a subdomain of that. Enabling the trial happens via an Origin-Trial HTTP header or a corresponding meta tag on the embedding page.
  • A third-party trial where we can register a third-party domain and then it can be used anywhere. The documentation is a bit confusing on this point but AIUI you we can either use a header or meta tag on the embedded page, or use JS to add a meta tag to the embedding page. (The generic origin trial docs include this somewhat confusing warning: "Caution: A third-party token must be provided in an external JavaScript file included via a <script> element: a third-party token won't work in a meta tag, inline script or HTTP header.") Whether the trial will be declared on embedding or embedded pages needs to be declared up ahead; if we want both, we need to register twice.

Generic origin trial documentation describes two variants, normal origin tials and third-party origin trials. The cookie blocking trials don't directly reference these docs but presumably they match the two options here.

The third-party trial is a persistent trial, meaning that the origin trial declaration is not applied to the first request where the browser sees it, but it gets applied to the next request (and then whether that request declared the origin trial will determine the state of the request after that, and so on) - the header / meta tag (or lack thereof) will set a flag in the browser, which will be applied to subsequent requests.

So this leaves two ways of enrolling:

  • Register login.wikimedia.org for a thrid-party trial with the option that the trial token will be used on the embedding page (the alternative wouldn't work with invisible pixels), with all the registrable domains we have as potential embedders (I believe that's 12 domains, see the bug report above for the list). Add the trial token on every wiki pageload (via Varnish or a CentralAuth meta tag hook, the first is probably easier). This fixes autologin (which always loads loginwiki) but probably does not fix edge login (which also loads set-representative wikis in a subrequest and tries to set cookies).
  • Register a first-party trial for every registrable domain we have wikis on, and for each register every other registrable domain as potential embedded domains. This should fix both edge login and autologin, but it requires 12 separate origin trial registrations and thus 12 trial tokens. We can either include each (multiple tokens on the same page are documented as OK) or we need a mechanism to select the right one.

Registering is free and not a lot of effort, and selecting the right token in Varnish doesn't seem too complicated (alternatively, just including each doesn't seem like a huge payload cost) so I think we should go for the second option.

Usually origin trials are disabled for a given site after reaching 0.5% of all Chrome pageloads; it seems unlikely but not completely inconceivable that Wikipedia would reach this threshold. But, if I understand the documentation correctly, this restriction doesn't apply for deprecation trials, only trials of new features, so we don't need to worry about it.

Note that for any of those issue links in the task description, I get "Access is denied to this issue". But the issue linked to in T359957#9625065 is visible at least.

The relevant information from the non-public tasks and admin UI:

  • "Trial Available: Up to Chrome 132 (ends with the rollout of next Chrome release), no later than Dec 28, 2024"
  • "If you’d like to submit additional third-party domains for review for this top level site, please email 3pcd-1p-deprecationtrial@google.com."
  • "For all other questions and issues, please visit our blog post. If further support is needed, please file an issue here"

Change #1015145 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[operations/mediawiki-config@master] Enter deprecation trial for third-party cookie blocking

https://gerrit.wikimedia.org/r/1015145

The more public-facing Google posts are a bit confusing about whether there are usage limits for the trial, but the origin trials developer guide is pretty clear that they don't apply to deprecation trials, so we won't have to worry about that.

Change #1015145 merged by jenkins-bot:

[operations/mediawiki-config@master] Enter deprecation trial for third-party cookie blocking

https://gerrit.wikimedia.org/r/1015145

Mentioned in SAL (#wikimedia-operations) [2024-03-28T21:06:22Z] <tgr@deploy1002> Started scap: Backport for [[gerrit:1015145|Enter deprecation trial for third-party cookie blocking (T359957)]], [[gerrit:1014634|Add CommunityConfiguration log channel (T361072)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-28T21:08:36Z] <tgr@deploy1002> urbanecm and tgr: Backport for [[gerrit:1015145|Enter deprecation trial for third-party cookie blocking (T359957)]], [[gerrit:1014634|Add CommunityConfiguration log channel (T361072)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-28T21:25:53Z] <tgr@deploy1002> Finished scap: Backport for [[gerrit:1015145|Enter deprecation trial for third-party cookie blocking (T359957)]], [[gerrit:1014634|Add CommunityConfiguration log channel (T361072)]] (duration: 19m 30s)

I have set

  • chrome://flags/#tracking-protection-3pcd -> enabled
  • chrome://flags/#tpcd-heuristics-grants -> disabled
  • chrome://flags/#tpcd-metadata-grants -> disabled
  • chrome://flags/#top-level-third-party-cookie-deprecation-trial -> enabled / disabled

and tried both normal browsing (where third-party cookies are "limited" according to the info popup in the URL bar) and incognito mode (where third-party cookies are "blocked"). The test protocol was:

  1. log in on en.wikipedia.org (with "keep logged in" checked)
  2. visit wikidata.org, reload a few times
  3. if not logged in, click on login
  4. wait for two hours (the bounce tracking grace period plus bounce tracking timer period, per (1); see T345249#9672556)
  5. visit wikifunctions.org, reload a few times
  6. if not logged in, click on login

(on Chrome 134, using their beta channel)

top-level-third-party-cookie-deprecation-trial flagmodestep 1step 2step 3step 5step 6
disablednormal
disabledincognito
enablednormal--
enabledincognito

(In step 2 and 5 for the enabled/normal combination, edge login is working, ie. the user is already logged in on first pageview.)

FWIW, this is how the new Chrome UI looks:

Screenshot from 2024-04-01 19-36-19.png (652×683 px, 70 KB)
Screenshot from 2024-04-01 19-37-37.png (827×729 px, 94 KB)
Screenshot from 2024-04-01 19-09-38.png (636×691 px, 70 KB)
Screenshot from 2024-04-01 19-39-04.png (756×751 px, 88 KB)
Screenshot from 2024-04-01 19-40-03.png (1×1 px, 268 KB)
tracking dialog, default statetracking dialog after clicking the toggleincognito tracking dialog, default stateincognito tracking dialog after clicking the toggleTracking Protection subpage in settings

I haven't found any documentation on the difference between "limited" and "blocked". Without the deprecation trial, they seem to behave identically.