Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[D9][D10][D7] Remove interest-cohort header #6199

Closed
yorkshire-pudding opened this issue Aug 17, 2023 · 11 comments · Fixed by backdrop/backdrop#4500
Closed

[D9][D10][D7] Remove interest-cohort header #6199

yorkshire-pudding opened this issue Aug 17, 2023 · 11 comments · Fixed by backdrop/backdrop#4500

Comments

@yorkshire-pudding
Copy link
Member

yorkshire-pudding commented Aug 17, 2023

My curiosity about this warning arose again:

⚠️ Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

I searched for it and among the results was this Drupal issue to remove the header: https://www.drupal.org/project/drupal/issues/3260401

D7

I note it was added in #5103 for valid reasons, but the consensus in Drupal now seems to be that it can be removed.

Should we remove it too?
People might think there is an error with Backdrop if we don't?

There is also mentioned this link: https://blog.google/products/chrome/get-know-new-topics-api-privacy-sandbox/


PR added - https://github.com/backdrop/backdrop/pull/4500
@quicksketch
Copy link
Member

My understanding is that the entire FLoC concept that utilized Interest-Cohort was scrapped because all major systems (including WordPress) decided to start blocking user-tracking by default. The backlash was so severe Google backed out of it entirely.

@yorkshire-pudding
Copy link
Member Author

@yorkshire-pudding
Copy link
Member Author

Should the change record at: https://docs.backdropcms.org/change-records/header-added-by-default-to-disable-floc be simply updated or should another change record that cross references with that one be added?

@yorkshire-pudding
Copy link
Member Author

PR added at backdrop/backdrop#4500

Can be tested by just looking for the usual warning that appears in Console and noting that it is not there anymore.

@yorkshire-pudding yorkshire-pudding self-assigned this Aug 24, 2023
@yorkshire-pudding
Copy link
Member Author

Should the change record at: https://docs.backdropcms.org/change-records/header-added-by-default-to-disable-floc be simply updated or should another change record that cross references with that one be added?

Are any @backdrop/core-committers able to advise whether I need to write a new change record or update the existing change record?

@yorkshire-pudding
Copy link
Member Author

Current Change Record:

By default, a new Permissions-Policy: interest-cohort=() header is now present on Backdrop websites. This header is added in response to the implementation of Federated Learning of Cohorts (FLoC), which is a way to gather user data without cookies, regardless of whether a website loads any tracking scripts. As of April 2021, Google's Chrome browser is the only major web browser to implement FLoC.

To disable this header and allow FLoC for the website, a new Backdrop setting, block_interest_cohort, can be set to FALSE in your settings.php:

$config['system.core']['block_interest_cohort'] = FALSE;

HTML
<p>By default, a new <code>Permissions-Policy: interest-cohort=()</code> header is now present on Backdrop websites. This header is added in response to the implementation of <a href="https://en.wikipedia.org/wiki/Federated_Learning_of_Cohorts" target="_blank">Federated Learning of Cohorts (FLoC)</a>, which is a way to gather user data without cookies, regardless of whether a website loads any tracking scripts. As of April 2021, Google's Chrome browser is the only major web browser to implement FLoC.</p>

<p>To disable this header and allow FLoC for the website, a new Backdrop setting, <code>block_interest_cohort</code>, can be set to <code>FALSE</code> in your settings.php:</p>

<pre>
<span class="blob-code-inner blob-code-marker" data-code-marker="+"><span class="pl-c">$config['system.core']['block_interest_cohort'] = FALSE;</span></span></pre>

Proposed New Version

In version 1.19.3 a new Permissions-Policy: interest-cohort=() header was added by default on Backdrop websites. This header was added in response to the implementation of Federated Learning of Cohorts (FLoC), which was a way to gather user data without cookies, regardless of whether a website loads any tracking scripts.
Due to widespread blocking by websites and the fact that no browser other than Google Chrome had implemented FloC, it was dropped in January 2022 and it now causes a warning to appear in the Console on Google Chrome and other Chromium based browsers:
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

It has been removed in 1.26 and 1.25.2

Feedback?

@quicksketch quicksketch added this to the 1.26.0 milestone Sep 7, 2023
@jenlampton
Copy link
Member

Code LGTM, and all tests are passing (with the exception of the spell checker).

For the change record, I would prefer if we reword it so the fact that this was removed appears first, and then later mention when it was added, so that at first glance people know it's gone. Something like this...


The Permissions-Policy: interest-cohort=() header has been removed in Backdrop versions 1.26 and 1.25.2.

This header was added to Backdrop websites by default, in version 1.19.3. The addition was in response to the implementation of Federated Learning of Cohorts (FLoC), which was a way to gather user data without cookies, regardless of whether a website loads any tracking scripts.

The recent removal was due to widespread blocking by websites, and the fact that no browser other than Google Chrome had implemented FloC. Support for this header was dropped in January 2022 and it now causes a warning to appear in the Console on Google Chrome and other Chromium based browsers:

Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.

@yorkshire-pudding
Copy link
Member Author

Thanks @jenlampton - CR text looks good to me.

@quicksketch
Copy link
Member

quicksketch commented Sep 15, 2023

I updated the change record, now located at https://docs.backdropcms.org/change-records/permissions-policy-header and I have merged the PR into 1.x for 1.26.0. I could not cherry-pick it back into 1.25.x because of conflicting update hook numbers in system.install. Thanks @yorkshire-pudding for taking the lead on this!

@klonos
Copy link
Member

klonos commented Oct 5, 2023

I could not cherry-pick it back into 1.25.x ...

Shouldn't we update the change record at https://docs.backdropcms.org/change-records/permissions-policy-header then? It mentions:

  • Introduced in branch: 1.25.x
  • Introduced in version: 1.25.2

@klonos klonos reopened this Oct 5, 2023
@quicksketch
Copy link
Member

Thanks, I updated the change record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants