Error with permissions policy header unrecognized feature interest cohort

Что такое когорты Google (FLoC), безопасна ли эта технология и чем отличается от Cookies Когорты Google – это всего лишь группы, которые формируются по определенным предпочтениям. В отличии от ориентации под одного пользователя, подбирать контент под группу пользователей гораздо проще. Это может использоваться в рекламных целях, что и было сделано компанией Google – была […]

Содержание

  1. Что такое когорты Google (FLoC), безопасна ли эта технология и чем отличается от Cookies
  2. Error with Permissions-Policy header: Parse of permissions policy failed
  3. Joomla! Issue Tracker — CMS
  4. [#33212] — [3.9][Privacy] Block usage of FLoC by default
  5. Pending
  6. Issue
  7. Summary of Changes
  8. Testing Instructions
  9. Documentation Changes Required
  10. Handling of this in the future

Что такое когорты Google (FLoC), безопасна ли эта технология и чем отличается от Cookies

Когорты Google – это всего лишь группы, которые формируются по определенным предпочтениям. В отличии от ориентации под одного пользователя, подбирать контент под группу пользователей гораздо проще. Это может использоваться в рекламных целях, что и было сделано компанией Google – была представлена технология FLoC (Federated Learning of Cohorts).

Данная технология внедряется в современные версии браузеров от Google (Chrome), пока это носит характер тестирования. Как работает FLoC? Пользователь при посещении какой-либо страницы сайта оставляет в браузере историю, на основе которой браузер относит данного пользователя к какой-либо группе такой же тематики. Такие группы имеют свои идентификаторы (Groupe ID) – данные хранятся на стороне клиента, а также отсылаются на сервера обработки.

Однако у такой технологии есть свои недостатки в плане безопасности и приватности личных предпочтений. Как раз об этом заявили прочие разработчики браузеров, таких как Firefox, Opera и т.д. Ведь существует потенциальная возможность вычислить пользователя, узнать его предпочтения, к каким он группам принадлежит. Всё это делает его личные предпочтения мишенью для злоумышленников, так как можно вычислить интересы пользователя и уже исходя из них совершать атаки.

Отличия технологии FLoC от Cookie совершенно очевидны, Cookie хранятся лишь в браузере и при правильном использовании отвечают базовым нормам безопасности пользователя. В то время как зачисление пользователя в когорту (группу) и последующая отправка такой информации партнерам и различным компаниям очевидно не самый безопасный способ персонализации контента и функционала сайта.

Могут возникать ошибки при работе с FLoC, например, ошибка:

Error with Permissions-Policy header: Unrecognized feature: ‘interest-cohort’ (Ошибка с заголовком политики разрешений: неизвестный объект: когорта интересов).

Это значит, что необходимо пересмотреть настройки сайта, добавить правильные условия отправки заголовков и т.д. Также не стоит забывать о совместимости FLoC с разными браузерами, так как технология новая.

Источник

I am getting console log warnings after activating the plugin:

and then the following error which I believe is related:

Error with Permissions-Policy header: Parse of permissions policy failed because of errors reported by structured header parser.

WordPress Version 6.0
WPEngine hosting
Headers Security Advanced & HSTS WP Version 4.8.88
Present on both Firefox & Chrome/Webkit

Any insight is greatly appreciated! Thanks!

Hi @dankfresh, Thank you for installing Headers Security Advanced & HSTS WP.

I am Andrea and I will help you solve the issue you encountered as best as possible.

I will start internal audits and as soon as I finish I will contact you to update you with the solution.

Please help me with this
Every plugin is updated.
Checked with multiple theme same error displaying is Console.

Error with Feature-Policy header: Unrecognized feature: ‘geolocation=(self’.
Error with Feature-Policy header: Unrecognized feature: ‘microphone=()’.
Error with Feature-Policy header: Unrecognized feature: ‘accelerometer=()’.
Error with Feature-Policy header: Unrecognized feature: ‘gyroscope=()’.
Error with Feature-Policy header: Unrecognized origin: ‘(self’.
Error with Feature-Policy header: Unrecognized feature: ‘push=()’.
Error with Feature-Policy header: Unrecognized feature: ‘vibrate=()’.
Error with Feature-Policy header: Unrecognized feature: ‘magnetometer=()’.
Error with Feature-Policy header: Unrecognized feature: ‘interest-cohort=()’.

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

  • This reply was modified 7 months, 3 weeks ago by prash009 .

Hi @prash009 and @dankfresh, Thank you for installing the Headers Security advanced & HSTS WP plugin.

After your report I did some verification and testing, we have just released a new plugin update (version 4.8.89) this will fix the issue found in the console log.

Also if you need further assistance I will be at your disposal as soon as possible.

That update did the trick! With how often policies and security header compliance changes, I imagine it is difficult keeping up. I appreciate the effort in developing this plugin and the quick turnaround. Thanks!

Hi @dankfresh, thank you for the feedback 🙂 thanks for using Headers Security Advanced & HSTS WP.

We are trying to offer the best assistance in a short time and I hope you enjoyed it, but most importantly it was helpful.

We always try to optimize the plugin and release patches with new headers or improvement for the plugin in short time.

Thank you for your feedback and should you need support be here.

You can leave us a review to rate the support and the plugin.

Источник

Joomla! Issue Tracker — CMS

[#33212] — [3.9][Privacy] Block usage of FLoC by default

Pending

User tests: Successful: Unsuccessful:

Issue

As a replacement for third party cookies, Google has introduced the Federated Learning of Cohorts into the Chrome browser lately. This feature is supposed to allow better tracking of users while also keeping data privacy. Details can be read here. The Joomla! project disagrees that this feature is in the interests of the owners of Joomla!-powered websites as well as their visitors. We share the assessment of the EFF as well as many other organisations (Mozilla, Microsoft, Opera, WordPress).

We consider this a security issue and thus will roll out countermeasures with the next bugfix release of the Joomla 3.9 series.

Summary of Changes

This PR introduces a header to disable Federated Learning of Cohorts, which is sent with every request that is handled by the Joomla framework. The header specifically looks like this:
Permissions-Policy: interest-cohort=()
and is the equivalent of opting out of this feature. Please be aware that this only adds this header to requests which go through the Joomla! application. Assets like CSS files, images or javascript are handled by your webserver directly and we would advise to modify the webserver to add this header to every request directly.

If you really want to disable the blocking of this feature, we added a switch in the global configuration to remove this header.

A postinstall message has been added to the database to inform administrators of this decision.

Testing Instructions

Apply this patch and load a random page of your testing site. The answer to your request should contain the above noted header.

Documentation Changes Required

Handling of this in the future

This PR fixes this issue for the 3.9 and 3.10 releases. We will decide on how to implement this countermeasure in 4.0 in the time before the final release.

Category SQL Administration com_admin com_config Language & Strings Libraries

We will decide on how to implement this countermeasure in 4.0 in the time before the final release.

Assets like CSS files, images or javascript are handled by your webserver directly and we would advise to modify the webserver to add this header to every request directly.

Should we also be putting this in htaccess.txt like the other headers like no-sniff? This would then apply the header globally and not only on PHP requests through the app.

«Google is introducing a replacement. «

Should the language be written time independently, so that in a decade it is still true? Maybe something like «In 2021, Google introduced. «

We will decide on how to implement this countermeasure in 4.0 in the time before the final release.

Agreed, we are just still discussing about that. We definitely don’t want the above special case to live on in J4.

Assets like CSS files, images or javascript are handled by your webserver directly and we would advise to modify the webserver to add this header to every request directly.

Should we also be putting this in htaccess.txt like the other headers like no-sniff? This would then apply the header globally and not only on PHP requests through the app.

Maybe, however since most people don’t update their htaccess on a Joomla update, we can’t rely on this alone. Be my guest to add this header to the htaccess.

«Google is introducing a replacement. «

Should the language be written time independently, so that in a decade it is still true? Maybe something like «In 2021, Google introduced. «

I’m happy to accept a changed text PR to this branch.

Agreed, but the htaccess is still the right place for this also to be, over and above this PR. Just thought you might like to add it here for completeness.

I’m happy to accept a changed text PR to this branch.

haha that’s @brianteeman domain 🙂 I only speak crap.

Maybe, however since most people don’t update their htaccess on a Joomla update, we can’t rely on this alone. Be my guest to add this header to the htaccess.

Also need to check if .htaccess has this header, and Joomla outputs this header, do they resolve to a single header, or to two separate duplicated headers in the response — need to test that first.

Such a shame that the project doesn’t take the use of cookies as seriously

Maybe, however since most people don’t update their htaccess on a Joomla update, we can’t rely on this alone. Be my guest to add this header to the htaccess.

Also need to check if .htaccess has this header, and Joomla outputs this header, do they resolve to a single header, or to two separate duplicated headers in the response — need to test that first.

Header has been set in htaccess.txt as well. Testing on my system only showed one header to be sent.

Update SQL scripts for PostgreSQL and for MS SQL Server/SQL Azure are missing.

Category SQL Administration com_admin com_config Language & Strings Libraries SQL Administration com_admin Postgresql MS SQL com_config Language & Strings Libraries

Have been added. Sorry, it was late yesterday.

Such a shame that the project doesn’t take the use of cookies as seriously

Since J4 has already the system_httpheader and @zero-24 already did the backport for J3 https://github.com/zero-24/plg_system_httpheader why don’t you merge that to J3 (assuming that @zero-24 has no objections)?

Was consideration given to implement this as a standalone Plugin instead of «yet another» configuration option?

Was consideration given to the Post Installation message, to have «condition» for showing only if not enabled in global config and «a one click action» to implement the change like the 2FA and the Load Balancer change recently?

Since J4 has already the system_httpheader and @zero-24 already did the backport for J3 zero-24/plg_system_httpheader why don’t you merge that to J3 (assuming that @zero-24 has no objections)?

Was consideration given to implement this as a standalone Plugin instead of «yet another» configuration option?

It was decided to keep the implementation minimal and to not use a separate plugin.

Was consideration given to the Post Installation message, to have «condition» for showing only if not enabled in global config and «a one click action» to implement the change like the 2FA and the Load Balancer change recently?

This feature is enabled by default, so people would need to disable it actively. In that case they can also click away the post install message.

We consider this a security issue and thus will roll out countermeasures

This has nothing to do with security, add it in J4 (default off), but don’t force this in J3 in the name of security. At best this is a privacy concern (in the browser).

I see that Joomla is trying to not fall behind WP but please note that WP is NOT including this feature in its code, despite what the tech press misguidedly reported.

Moreover, this is not a definite security or privacy issue. Please do read https://twitter.com/Log3overLog2/status/1384337637763387394 for the whole story. In short, FLoC is only a concern if you include JavaScript which explicitly requests the FLoC cohort. Moreover, FLoC is currently an experiment, not a final implementation. In the few Chrome browsers this experiment is enabled — notably none in the EU, where the author of this PR lives — this is currently an opt-out feature just because it’s the only way to run an experiment of a technology nobody has heard about before. Google seems to indicate that the final implementation is very likely to be opt-in, not opt-out, or at the very least provide a user warning the same way that asking for location data does. It is, in fact, extremely likely to be so because of GDRP and that’s probably why the opt-out format experiment does not run in browsers of EU residents.

Further to that, this has NOTHING AT ALL to do with security. Your site can’t be hacked with FLoC. Maybe — MAYBE — it will have to do with privacy IF AND ONLY IF the final implementation of FLoC is opt-out instead of opt-in. Marking it as a security concern dilutes the importance of fixing real security issues and projects the wrong message to users. If we label speculative, non-security issues as «SECURITY» the users are trained to ignore any security fix as superficial and unimportant, undermining their safety in the long term.

On top of that, sending a Permissions-Policy to disable FLoC doesn’t mean that the user will magically no longer be tracked. In fact, it’s possible that instead of being assigned into a cohort of at least 1000 users he will be otherwise tracked and placed in a finer grained cohort using a different set of tracking technologies including but not limited to ISP detection, IP geolocation, per-user subdomain pinging and so on. FLoC was actually designed to strengthen the privacy by making cohorts large enough so as not to allow individual tracking and deanonymisation. Whether we trust Google to do that is a largely philosophical question, not a technical one. From a technical perspective using the Permissions-Policy might actually prove counter-productive to the stated goal of protecting the user’s privacy.

It is also worth noting that FLoC is only ever enabled if you include JavaScript in your page which uses FLoC (either directly on the page or via an IFRAME). This means that unless you are using analytics, ads or similar technology which uses FLoC-enabled JavaScript there is no placement in a cohort. Pretending that merely using Chrome on any site is magically destroying your privacy is misguided at best.

Based on this, there is no real benefit in including this in Joomla, let alone as a feature enabled by default. We are not protecting anyone from anything, especially the site owner i.e. it’s not a «security» feature. What this feature does is probably disable FLoC if you are using third party ads, analytics etc on your site. Whether it will succeed depends entirely on the implementation. If a third party ad is included in your site via an IFRAME it’s easy for it to add the allow=»interest-cohort» in the attribute, nullifying this «protection». It would only work if the FLoC-enabled third-party JS only ever runs in the main page context on your site. Even then, whether it would be something that actually protects your users instead of enabling more tracking for them is something to be determined. Not to mention that we still do not know if Chrome will make it opt-in or display a warning before interest cohorts are used, especially in jurisdictions with strict personally identifiable information legislation.

In short, this PR jumps the shark by a freaking mile.

Finally, the implementation as it stands right now is completely wrong and breaks sites. It replaces the Permissions-Policy header instead of amending it. People who use plugins to set the Permissions-Policy for legal compliance, privacy or security reasons will be very surprised to see that their Permissions-Policy is overwritten and replaced with a BS non-fix of a speculative issue. So, while nothing (or at the very least nothing of importance) is fixed something of actual importance is broken for them! A better way to do it is more like along these lines (from a PR in Admin Tools Professional I have not merged yet for the reasons stated above):

While this won’t overwrite a permissions policy set by a plugin — including Joomla 4’s core feature — it’s still mostly window dressing because it can and will be overwritten by .htaccess or equivalent server-level code if it sets the Permissions-Policy header and can and will be overwritten by IFRAME attributes. As we say in Greece, this is very much like drilling holes in the water.

It’s important to get all the facts straight before jumping the gun and implementing something under a false security banner, even more so when the implementation is plain bad code that breaks another core feature.

Источник


?


?


?

  • Fixed in Code Base
  • 18 May 2021
  • Medium
  • Build: staging
  •  

    # 33212

  •  

    Diff

  •  

    Hackwar:j3floc

Pending

  • Categories:
  • SQL

  • Administration

  • com_admin

  • com_config

  • Language & Strings

  • Libraries

  • Postgresql

  • MS SQL

  • Installation

User tests:
Successful:

Unsuccessful:

Issue

As a replacement for third party cookies, Google has introduced the Federated Learning of Cohorts into the Chrome browser lately. This feature is supposed to allow better tracking of users while also keeping data privacy. Details can be read here. The Joomla! project disagrees that this feature is in the interests of the owners of Joomla!-powered websites as well as their visitors. We share the assessment of the EFF as well as many other organisations (Mozilla, Microsoft, Opera, WordPress).

We consider this a security issue and thus will roll out countermeasures with the next bugfix release of the Joomla 3.9 series.

Summary of Changes

This PR introduces a header to disable Federated Learning of Cohorts, which is sent with every request that is handled by the Joomla framework. The header specifically looks like this:
Permissions-Policy: interest-cohort=()
and is the equivalent of opting out of this feature. Please be aware that this only adds this header to requests which go through the Joomla! application. Assets like CSS files, images or javascript are handled by your webserver directly and we would advise to modify the webserver to add this header to every request directly.

If you really want to disable the blocking of this feature, we added a switch in the global configuration to remove this header.

A postinstall message has been added to the database to inform administrators of this decision.

Testing Instructions

Apply this patch and load a random page of your testing site. The answer to your request should contain the above noted header.

Documentation Changes Required

None.

Handling of this in the future

This PR fixes this issue for the 3.9 and 3.10 releases. We will decide on how to implement this countermeasure in 4.0 in the time before the final release.


avatar Hackwar
Hackwar
— open
20 Apr 2021


avatar Hackwar
Hackwar
— change
20 Apr 2021


avatar joomla-cms-bot
joomla-cms-bot
— change
20 Apr 2021

Category
SQL


Administration


com_admin


com_config


Language & Strings


Libraries

avatar PhilETaylor


avatar Hackwar
Hackwar
— change
20 Apr 2021

avatar PhilETaylor

avatar PhilETaylor

avatar Hackwar

avatar Hackwar

avatar Hackwar

avatar PhilETaylor

avatar PhilETaylor

avatar PhilETaylor

avatar brianteeman

avatar Hackwar

avatar richard67


avatar joomla-cms-bot
joomla-cms-bot
— change
21 Apr 2021

Category
SQL


Administration


com_admin


com_config


Language & Strings


Libraries

SQL


Administration


com_admin


Postgresql


MS SQL


com_config


Language & Strings


Libraries

avatar Hackwar

avatar bembelimen

avatar dgrammatiko

avatar PhilETaylor

avatar Hackwar

avatar rodlie

avatar nikosdion

avatar brianteeman

avatar ReLater

avatar brianteeman

avatar Hackwar

avatar PhilETaylor

avatar brianteeman

avatar PhilETaylor

avatar PhilETaylor


avatar joomla-cms-bot
joomla-cms-bot
— change
29 Apr 2021

Category
SQL


Administration


com_admin


com_config


Language & Strings


Libraries


Postgresql


MS SQL

SQL


Administration


com_admin


Postgresql


MS SQL


com_config


Language & Strings


Installation


Libraries

avatar Hackwar

avatar PhilETaylor

avatar brianteeman

avatar rachellawson

avatar brianteeman

avatar richard67

avatar PhilETaylor

avatar brianteeman

avatar rachellawson

avatar PhilETaylor

avatar brianteeman

avatar HLeithner


avatar richard67
richard67
— test_item
18 May 2021
Tested successfully

avatar richard67


avatar alikon
alikon
— test_item
18 May 2021
Tested successfully

avatar alikon


avatar alikon
alikon
— change
18 May 2021

Status Pending Ready to Commit

avatar alikon

avatar richard67


avatar HLeithner
HLeithner
— change
18 May 2021

Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-05-18 18:45:39
Closed_By HLeithner
Labels Added:
?


avatar HLeithner
HLeithner
— close
18 May 2021


avatar HLeithner
HLeithner
— merge
18 May 2021

avatar HLeithner

avatar alikon

avatar richard67

avatar PhilETaylor

avatar richard67

avatar richard67


avatar HLeithner
HLeithner
— change
24 May 2021

Title
[3.9][SECURITY] Block usage of FLoC by default
[3.9][Privacy] Block usage of FLoC by default


avatar HLeithner
HLeithner
— edited
24 May 2021

avatar PhilETaylor

avatar dmleeman

avatar dmleeman

avatar richard67

avatar brianteeman

avatar PhilETaylor

avatar dmleeman

avatar PhilETaylor

avatar molhokwai

avatar Sophist-UK

avatar PhilETaylor

avatar Sophist-UK

avatar PhilETaylor

avatar Sophist-UK

avatar PhilETaylor

avatar Sophist-UK

avatar PhilETaylor

avatar Hackwar

avatar PhilETaylor

avatar PhilETaylor

avatar PhilETaylor

avatar PhilETaylor

avatar Sophist-UK

Add a Comment

Login with GitHub to post a comment

Когорты Google – это всего лишь группы, которые формируются по определенным предпочтениям. В отличии от ориентации под одного пользователя, подбирать контент под группу пользователей гораздо проще. Это может использоваться в рекламных целях, что и было сделано компанией Google – была представлена технология FLoC (Federated Learning of Cohorts).

chto-takoe-kogorty-google-floc

Данная технология внедряется в современные версии браузеров от Google (Chrome), пока это носит характер тестирования. Как работает FLoC? Пользователь при посещении какой-либо страницы сайта оставляет в браузере историю, на основе которой браузер относит данного пользователя к какой-либо группе такой же тематики. Такие группы имеют свои идентификаторы (Groupe ID) – данные хранятся на стороне клиента, а также отсылаются на сервера обработки.

Однако у такой технологии есть свои недостатки в плане безопасности и приватности личных предпочтений. Как раз об этом заявили прочие разработчики браузеров, таких как Firefox, Opera и т.д. Ведь существует потенциальная возможность вычислить пользователя, узнать его предпочтения, к каким он группам принадлежит. Всё это делает его личные предпочтения мишенью для злоумышленников, так как можно вычислить интересы пользователя и уже исходя из них совершать атаки.

Отличия технологии FLoC от Cookie совершенно очевидны, Cookie хранятся лишь в браузере и при правильном использовании отвечают базовым нормам безопасности пользователя. В то время как зачисление пользователя в когорту (группу) и последующая отправка такой информации партнерам и различным компаниям очевидно не самый безопасный способ персонализации контента и функционала сайта.

Могут возникать ошибки при работе с FLoC, например, ошибка:

Error with Permissions-Policy header: Unrecognized feature: ‘interest-cohort’ (Ошибка с заголовком политики разрешений: неизвестный объект: когорта интересов).

Это значит, что необходимо пересмотреть настройки сайта, добавить правильные условия отправки заголовков и т.д. Также не стоит забывать о совместимости FLoC с разными браузерами, так как технология новая.

Usually my problem is that I dont find any answers to my questions, but this time i did find quite a few posts/articles but they are all way too complicated for me to understand.

Could I have an ELI5 ? and is there something I can do to my code to fix that ?

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options

import time

from pyvirtualdisplay import Display

from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC


def GetPrice(url):

    productUrl = url
    CHROME_PATH = "C:Program Files (x86)GoogleChromeApplicationchrome.exe"
    CHROMEDRIVER_PATH = "C:Program Files (x86)chromedriver.exe"

    WINDOW_SIZE = "1920,1080"

    chrome_options = Options()
    chrome_options.add_argument("--headless")
    chrome_options.add_argument("--window-size=%s" % WINDOW_SIZE)
    chrome_options.binary_location = CHROME_PATH

    driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH,options=chrome_options)

    driver.get(url)

    try:
                           
        main= WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.Class, "a-size-base a-color-price header-price a-text-normal")))
        print ('TEST 1')
        print ()
        print(main)
        print ('TEST 2')
        print ()
        print(main.text)
       
        price = main.text.replace('.', '').replace('€', '').replace(',', '.').strip()
        print(price)
        
    except:

        print("DIDNT WORK")

        price = ''

    return price
    
    
    time.sleep(2)
    driver.quit()



urlB = "https://www.amazon.com/Berserk-Deluxe-8-Kentaro-Mira/dp/1506717918/ref=sr_1_4?dchild=1&keywords=berzerk&qid=1627503468&s=books&sr=1-4"

link = ["https://www.amazon.com/Berserk-Deluxe-8-Kentaro-Mira/dp/1506717918/ref=sr_1_4?dchild=1&keywords=berzerk&qid=1627503468&s=books&sr=1-4",
        "https://www.amazon.com/Dawn-X-Vol-Jonathan-Hickman/dp/1302921568/ref=sr_1_1?dchild=1&keywords=dawn+of+x&qid=1627505355&sr=8-1",
        "https://www.amazon.com/Astra-Lost-Space-Vol-1/dp/1421596946/ref=sr_1_1?dchild=1&keywords=astra+lost+in+space&qid=1627505363&sr=8-1"]

GetPrice(urlB)

Sorry for all my weird print() in my code bloc, I use those so when my code crash (luckily for me it usually happen only 99 percent of the time), i can understand where the problem is from

Update: I’ve amended this post with a valid reason to use the header. More info at the bottom.

This post was written in a hurry in response to some misinformation about Google’s newest Web antifeature, Federated Learning of Cohorts (FLoC). Google’s FLoC is an attempt to track users even when their browsers (rightly) block third-party cookies. The initial blog posts about this issue were quite benign, but online discussions quickly devolved into panic and support for building flawed work-arounds into upstream software. I had to write this before things got out of hand.

A lot of misleading online discussion stems from one not-very-misleading blog postnote 1 that’s been making rounds, instructing webmasters everywhere to add the following HTTP response headers to all their pages:

Permissions-Policy: interest-cohort=()

Strictly speaking, this advice is correct; including this header will prevent your page form using Google’s FLoC. What the advice misses is that the header isn’t always necessary and isn’t even the ideal way to prevent your page from doing nefarious things.

That advice comes from a post by Plausible Analytics; the author of that post concluded that FLoC is an “opt-out” antifeature by reading the “Opting Out of Computation” section of the WICG’s FLoC README.

If you check that README yourself, you’ll notice the following statement one (1) paragraph above the mention of the HTTP permission policy (emphasis mine):

A site should be able to declare that it does not want to be included in the user’s list of sites for cohort calculation. This can be accomplished via a new interest-cohort permissions policy. This policy will be default allow. Any frame that is not allowed interest-cohort permission will have a default value returned when they call document.interestCohort(). If the main frame does not have interest-cohort permission then the page visit will not be included in interest cohort calculation.

If your website does not include JS that calls document.interestCohort(), it will not leverage Google’s FLoC. Explicitly opting out will not change this.

As per a post on Google’s web development blog, web.dev, FLoC also will be enabled during an origin trial if the page “loads ads or ads-related resource”; i.e., anything that Chromium’s ad tagger classifies as an ad. If your website loads third-party ads, it might end up getting opted-in even if those ads don’t call document.interestCohort().

What explicitly opting out actually entails

What adding this header does is exclude your website from being used when calcualting a user’s cohort. A cohort is an identifier shared with a few thousand other users, calculated locally from browsing history; sites that send this header will be excluded from this calculation. The EFF estimates that a cohort ID can add up to 8 bits of of entropy to a user’s fingerprint.

Being excluded from cohort calculation has a chance to place a user in a different cohort, altering a user’s fingerprint. This new fingerprint may or may not have more entropy than the one derived without being excluded. Excluding some portion of sites from a user’s cohort calculation doesn’t necessarily make a user less unique if a nontrivial number of sites doesn’t opt out.

Given this marginal improvement, I don’t think it’s right to place a burden or blame on webmasters when the burden and blame should rightfully be directed at those responsible for rolling this antifeature out in Chromium. We shouldn’t expect webmasters to add a tag or header every time Google advances the war against its own users.

How Permissions Policy works

I don’t think that every webmaster should have to read every single W3C spec. I do, however, think that people who offer prescriptive advice and interpretations of a spec should be expected to read the relevant spec first.

Here’s a copy of the Permissions Policy spec. Essentially, the Permissions-Policy header allows a webmaster to whitelist which parties (if any) are allowed to leverage certain APIs. If I make a website that doesn’t perform any geolocation directly but I load a third-party widget that does, I can forbid all parties from using Geolocation APIs by setting the following Permissions-Policy:

Permissions-Policy: geolocation=()

In other words, it provides a global override for any page contents requesting too many permissions. It’s ideal for situations in which authors aren’t in control of what content is being loaded.

Using the Permissions Policy to opt out of cohort calculation isn’t really what the Permissions Policy was intended for. That doesn’t seem like a big deal until you consider the history of HTTP headers being used to protect privacy.

This has happened before

Google’s non-standard usage of the Permissions Policy header to opt a site out of cohort calculation is reminiscent of the Do Not Track (DNT) header.

Do Not Track was a non-standard client header used to request websites not to track users. This ended up getting ignored by almost all sites it was intended to target, as adtech companies had no incentive to comply. Several websites initially obeyed the header until eventually dropping support; Reddit is a notable recent example.

Given that non-standard header usage has failed in the client-side fight against surveillance capitalism before, I’m not too optimistic about trying this again from the server side.

Better advice: how not to opt-in

Here’s how not to opt-in to Google’s FLoC:

  • Don’t load untrusted third-party content that might get classified as an ad (only applies during the origin trial)
  • Don’t call document.interestCohort(), and don’t load third-party scripts that might call it either.

If you have to resort to adding a Permissions-Policy header to opt your site out of FLoC, it means that you’ve accidentally opted yourself in by including a tracking script (malware) on your page. I’d wager that opting into FLoC wasn’t the only nefarious thing those scripts do; chances are they bundle a host of other fingerprinting measures.

To be extra safe, you can whitelist exactly what scripts can run with a Content Security Policy (CSP); seirdy.one, for instance, has a CSP that blocks all scripts, forms, frames, and third-party resources from loading.

If you’re concerned about Google breaking the spec and opting you in even after you’ve not done so yourself, what reason do you have to believe that they’ll stop there? There’s nothing preventing Google from ignoring your Permissions-Policy header, either.

Take a breath

If you want to be extra safe, you’re free to add this header to your site. Just manage your expectations. However:

Please, don’t spam maintainers of web server/backend software to tell them to include this header by default when it may or may not actually reduce user fingerprints. Don’t tell webmasters that they have a moral obligation to add a Permissions Policy header either.note 2 You don’t need to add this permission policy to every request, just as you don’t need to wear a helmet for every form of physical activity. Knee-jerk reactions like patching upstream software only galvanize Google to start ignoring this non-standard usage of the Permissions Policy header.

Some IRC discussions and a Hacker News commenter have helped me understand a valid reason to add a Permissions-Policy header: making a statement. Opting your site out of FLoC might not significantly improve user privacy, but it does send a clear message that you’re against it.

I was initially skeptical of this justification for two reasons:

  1. Google is unlikely to care if most of the non-adtech Web disabled FLoC, since they aren’t Google’s customers. If you work at Google, feel free to prove me wrong.
  2. Most websites won’t include the header, so it’s unlikely to make a big difference.

However, I’ve changed my mind for one reason: if enough people implement this header, then anyone looking at HTTP headers will be reminded of the existence of FLoC. Making a statement like this will help spread awareness. I do maintain that effort is better spent getting users off Chromium and Chromium-dependent browsers, though.

Normally, I’d be against making a statement in response header fields; messages meant to be parsed by humans should be sent in the body instead. I’m making an exception because interest-cohort will likely become an official addition to the Permissions-Policy standard.

In short: FLoC is a terrible idea partly because “opting out” your site won’t significantly improve users’ privacy. Opt out of FLoC with the suggested header if you want to make a statement, not because you think you think you’re fulfilling your moral obligation to protect your visitors. If you want to fulfill that obligation, get them off of Chrome and Google.


Notes

  1. This isn’t the only post making rounds, but it did hit the front page of a certain orange-colored website. I’m not blaming the author; if I hadn’t encountered the Permissions Policy spec earlier, I probably would have also taken the advice the author read at face-value. 

    Back

  2. I’ve noticed both of these behaviors on several threads online. I’ve decided against linking to them because I think the discourse there has heated past the point of reason. 

    Back

Понравилась статья? Поделить с друзьями:
  • Error with lpdd createsurface
  • Error with ipdd set display mode gens
  • Error with dll loading 101 aion
  • Error with command gdb version cannot run program gdb launching failed
  • Error with camera could not start video source