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

Disable FLOC by introducing permissions policy header #8145

Merged
merged 1 commit into from May 11, 2021

Conversation

davidfischer
Copy link
Contributor

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.

@davidfischer davidfischer requested a review from a team April 29, 2021 18:27
@davidfischer
Copy link
Contributor Author

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.

Copy link
Member

@ericholscher ericholscher left a 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 = {
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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 💯

Copy link
Member

@humitos humitos left a 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 💯

dockerfiles/nginx/proxito.conf Show resolved Hide resolved
@@ -99,6 +99,12 @@ class CommunityBaseSettings(Settings):
"/admin/",
)

# Permissions Policy
# https://github.com/adamchainz/django-permissions-policy
PERMISSIONS_POLICY = {
Copy link
Member

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 💯

@davidfischer davidfischer merged commit 91a17f6 into master May 11, 2021
@davidfischer davidfischer deleted the davidfischer/permissions-policy-floc branch May 11, 2021 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants