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
Disable FLOC by introducing permissions policy header #8145
Conversation
Note, if you are a documentation author and for some reason you would like to have FLOC enabled on your documentation, please get in touch. I would like to hear from you and we would consider making this a configurable option on projects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
@@ -99,6 +99,12 @@ class CommunityBaseSettings(Settings): | |||
"/admin/", | |||
) | |||
|
|||
# Permissions Policy | |||
# https://github.com/adamchainz/django-permissions-policy | |||
PERMISSIONS_POLICY = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we can easily test? Would be good to have at least an integration test to make sure the setting, etc. is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you thinking a validatehttp check? Or a pagerduty/CF check? I think those would be the best places for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a regular Django test + validatehttp are 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
The description of the PR is 💯
@@ -99,6 +99,12 @@ class CommunityBaseSettings(Settings): | |||
"/admin/", | |||
) | |||
|
|||
# Permissions Policy | |||
# https://github.com/adamchainz/django-permissions-policy | |||
PERMISSIONS_POLICY = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a regular Django test + validatehttp are 💯
This PR introduces the Permissions-Policy header (MDN) which controls the features that a webpage is allowed to use. For example, Permissions-Policy could be used to disable access to the JS geolocation APIs or the accelerometer.
This PR, however, only uses Permissions-Policy to disable FLOC a new JS API in Chrome that can be used to categorize users together into cohorts with machine learning so they can be targeted with ads. FLOC will be disabled on the RTD dashboard as well as on documentation sites. There are a few reasons for this but the biggest is probably that FLOC has some privacy issues and can aid in fingerprinting users (see the EFF's coverage). While Read the Docs does display advertising on our documentation sites, we are quite explicit in the methods we use to target advertising -- basically just contextual targeting -- and FLOC definitely crosses into behavioral targeting and targeting ads based on past actions rather than content/context.