Closed Bug 1589074 Opened 5 years ago Closed 4 years ago

Set referrer policy default to strict-origin-when-cross-origin

Categories

(Core :: DOM: Security, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: tnguyen, Assigned: dimi)

References

Details

(Keywords: dev-doc-complete, privacy, Whiteboard: [domsecurity-active])

Attachments

(13 files, 2 obsolete files)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review

https://github.com/w3c/webappsec-referrer-policy/pull/125

And Google planned to ship that, I think it's worth shipping it to in Firefox. But maybe we can wait until successfully shipping in Chrome

Whiteboard: [domsecurity-active]

FYI: We already set this strict-origin-when-cross-origin for known trackers in Nightly according to bug 1533763.

(In reply to Frederik Braun [:freddyb] from comment #1)

FYI: We already set this strict-origin-when-cross-origin for known trackers in Nightly according to bug 1533763.

Yes, but much more broadly, we've been shipping strict-origin-when-cross-origin as the default referrer policy for private browsing mode for several years now.

Assignee: nobody → tnguyen
Status: NEW → ASSIGNED

It is probably a good idea to measure the amount of unsafe-url usage using a long-term telemetry probe to make sure websites aren't reverting to using that en masse in response to this change.

We could try to ship https://github.com/w3c/webappsec-referrer-policy/pull/124 at the same time.

(In reply to Anne (:annevk) from comment #7)

We could try to ship https://github.com/w3c/webappsec-referrer-policy/pull/124 at the same time.

Interesting idea!

Anne, I think this one would be good to get out the door, right? Or can it remain in the backlog for now?

Assignee: tnguyen → nobody
Status: ASSIGNED → NEW
Flags: needinfo?(annevk)
Whiteboard: [domsecurity-active] → [domsecurity-backlog1]

Yeah, it would be good to do this (together with unsafe-url -> no-referrer-when-downgrade).

Flags: needinfo?(annevk)

Chrome Intent to Ship: New referrer policy default of strict-origin-when-cross-origin

https://groups.google.com/u/1/a/chromium.org/g/blink-dev/c/lqFuqwZDDR8/m/nKPRTc7DAQAJ

Keywords: dev-doc-needed

Bug 970136 seems a duplicate

Assignee: nobody → dlee
Status: NEW → ASSIGNED
Priority: -- → P2
Whiteboard: [domsecurity-backlog1] → [domsecurity-active]

Chrome shipped this so we could follow, I think. WPT has also been updated.

(In reply to Anne (:annevk) from comment #25)

Chrome shipped this so we could follow, I think. WPT has also been updated.

Thank you for the information. I'll update the patch and make sure we pass all those testcases.

Attachment #9172619 - Attachment is obsolete: true
Attachment #9172620 - Attachment is obsolete: true

We now changes the default referrer policy to strict-origin-when-cross-origin to follow the spec.
This patch reverts the changes made related to referrer policy in Bug 1678042 (bypassing referrer failures after syncing latest wpt tests).

Depends on D88555

Hi Anne, Christoph and Steven
The current plan is to land this change in 86 cycle, but there are two questions I would like to check with you before landing this:

  • Do we want to implement Comment 7 (make'unsafe-url' an alias for 'no-referrer-when-downgrade') along with the default policy change?
  • Do we also want to allow websites to override the default with a looser policy, or we prefer still allowing it at this moment and maybe add a telemetry to see how often sites will change it in the future?
    Thanks for your help!
Flags: needinfo?(steve.england)
Flags: needinfo?(ckerschb)
Flags: needinfo?(annevk)

That's great to hear Dimi. To address your questions in order:

  1. I think we should not touch unsafe-url for now as I don't think Chrome has either, but I pinged the PR to see if there are things we might be missing there. (Note that your link has an additional 0 at the end that causes it to 404.)
  2. I think for now we want to allow websites to override this, similar to Chrome, but longer term we should indeed be thinking about clamping that down. Telemetry and analysis of websites would definitely help. The risk with further clamping down is that websites will still leak this state via other means that might be harder to catch so we need to carefully think through that tradeoff as well.
Flags: needinfo?(annevk)

I suspect you meant to ping me Dimi. Anne's comment makes sense to me.

Flags: needinfo?(steve.england)

Hi Anne, Steven,
The original plan was to land this patch in the early 86 cycle, but after discussing with christoph, we both agree that landing the change right before Christmas may not be a good idea. We prefer changing the plan to land it in the early of 87 (25. Jan), so we will have time to react to breakages, if any. But we are also fine to land it when the holiday is over (3.Jan) if 87 is too late. Please let me know if you have any thoughts on this.

Flags: needinfo?(senglehardt)
Flags: needinfo?(ckerschb)
Flags: needinfo?(annevk)

Seems fine, we're not a in rush. (I'll also clear Steven's needinfo since I very much doubt he'd disagree.)

Flags: needinfo?(senglehardt)
Flags: needinfo?(annevk)
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/454beae0f635 Set referrer policy default to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/f093f3c48807 Fix anti-tracking mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=timhuang https://hg.mozilla.org/integration/autoland/rev/712f147c5a41 Fix network mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=kershaw,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/78df7f0ccb31 Fix worker mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=baku https://hg.mozilla.org/integration/autoland/rev/e8e6d9a6b90d Fix devtools mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/9fe67741eb5a Fix dom mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/3cffd4570c8e Fix sessionrestore mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=mconley https://hg.mozilla.org/integration/autoland/rev/da996dc79d5d Fix geckoview test failures after changing default referrer policy to strict-origin-when-cross-origin. r=geckoview-reviewers,agi https://hg.mozilla.org/integration/autoland/rev/b7a0d73a2885 Update wpt tests that are expected success after changing default referrer policy to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/a306f2483d73 Revert referrer related changes made in Bug 1678042 to pass wpt failures. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/10e37ec238ee Fix docshell mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=smaug
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/414252d2e46c Set referrer policy default to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/4d7a026e765e Fix anti-tracking mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=timhuang https://hg.mozilla.org/integration/autoland/rev/695ee14cd948 Fix network mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=kershaw,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/9831c19f47b9 Fix worker mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=baku https://hg.mozilla.org/integration/autoland/rev/c1b832f3ce06 Fix devtools mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/dd516f0ffc30 Fix dom mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/be5da5f62651 Fix sessionrestore mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=mconley https://hg.mozilla.org/integration/autoland/rev/c0d300b33c6b Fix geckoview test failures after changing default referrer policy to strict-origin-when-cross-origin. r=geckoview-reviewers,agi https://hg.mozilla.org/integration/autoland/rev/87753b6ce36f Update wpt tests that are expected success after changing default referrer policy to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/05c83764972e Revert referrer related changes made in Bug 1678042 to pass wpt failures. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/cbe882c7bff5 Fix docshell mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=smaug https://hg.mozilla.org/integration/autoland/rev/0b948812b858 Fix download xpcshell-test failures after changing default referrer policy to strict-origin-when-cross-origin r=ckerschb
Backout by apavel@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/17f61493037d Backed out 11 changesets for causing failures on test_DownloadCore.js.
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/9a469bfcf4f9 Set referrer policy default to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/328001ac7573 Fix anti-tracking mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=timhuang https://hg.mozilla.org/integration/autoland/rev/9a5186247b7a Fix network mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=kershaw,necko-reviewers https://hg.mozilla.org/integration/autoland/rev/e1bfeb2c467c Fix worker mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=baku https://hg.mozilla.org/integration/autoland/rev/69dfc7e086ec Fix devtools mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=nchevobbe https://hg.mozilla.org/integration/autoland/rev/1bdccdb8e90b Fix dom mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/aa07696c3f85 Fix sessionrestore mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=mconley https://hg.mozilla.org/integration/autoland/rev/36db07f697fd Fix geckoview test failures after changing default referrer policy to strict-origin-when-cross-origin. r=geckoview-reviewers,agi https://hg.mozilla.org/integration/autoland/rev/2e54315e8428 Update wpt tests that are expected success after changing default referrer policy to strict-origin-when-cross-origin. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/5555815ae0a6 Revert referrer related changes made in Bug 1678042 to pass wpt failures. r=ckerschb https://hg.mozilla.org/integration/autoland/rev/2c6b1318917b Fix docshell mochitest failures after changing default referrer policy to strict-origin-when-cross-origin. r=smaug CLOSED TREE
Flags: needinfo?(dlee)

FYI the MDN documentation for this in FF87 is (very nearly) complete and can be tracked here. The "live" docs here indicate the new preference. The browser compatibility update with relevant versions should merge in the next couple of days. Please comment in https://github.com/mdn/content/issues/2516 if you think we're missing anything obvious.

Documentation done, so marking as DDC. Thanks for the great work Hamish!

Regressions: 1698580

when i updated to ff87 my network.http.referer.XOriginTrimmingPolicy (which was on default setting 0) did not change. is this only for new installations and refreshes? and if so is it acceptable to open an issue asking for setting the new default also on updates (perhaps for cases the user did not change the value)?

(In reply to eyal gruss (eyaler) from comment #43)

when i updated to ff87 my network.http.referer.XOriginTrimmingPolicy (which was on default setting 0) did not change...

The pref changed here was network.http.referer.defaultPolicy - https://hg.mozilla.org/mozilla-central/rev/4d7a026e765e

Regressions: 1751604
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: