Open Bug 1651119 (schemeful-samesite) Opened 5 years ago Updated 9 months ago

[meta] Enable cookie sameSite schemeful

Categories

(Core :: Networking: Cookies, task, P3)

task

Tracking

()

People

(Reporter: baku, Unassigned)

References

(Depends on 3 open bugs, Blocks 1 open bug)

Details

(Keywords: meta, Whiteboard: [necko-triaged])

https://github.com/sbingler/schemeful-same-site:
"Modify SameSite’s implementation in the user agent to consider origins with different schemes as cross-site. Thus https://site.example and http://site.example would now be considered cross-site.
Part of this effort will be to update Incrementally Better Cookies to match the intended behavior."

Depends on: 1651120
Severity: -- → N/A
Priority: -- → P2
Whiteboard: [necko-triaged]
Blocks: cookie
See Also: → 1687370
Alias: schemeful-samesite

The behavior of schemeful-samesite as found in Nightly seems to be different to what is described in https://github.com/sbingler/schemeful-same-site.

In particular, this part does not seem to hold:

This means that both secure and insecure origins will retain access to the same set of cookies. I.e., if a user visits http://site.example with http://site.example/image.jpg and the response sets a cookie then when that user visits https://site.example the request to https://site.example/image.jpg will still send that same cookie.

In Nightly, when a cookie is set from https://site.example.com/, when I visit http://site.example.com/ I get the following warning:

Cookie “foo” has been treated as cross-site against “http://test.example.com/” because the scheme does not match.

See Also: → 1665794
Webcompat Priority: --- → ?
Webcompat Priority: ? → ---
See Also: → 1744945
No longer depends on: 1746684
Depends on: 1748693
Depends on: 1749558
Depends on: 1751435
Depends on: 1744945
See Also: 1744945
Depends on: 1756213
No longer depends on: 1749558
Depends on: 1800273
Depends on: 1665794
See Also: 1665794

Hi Freddy, do you know what the plans are for samesite schemeful? Do we plan to ship it or can we close this bug?

Flags: needinfo?(fbraun)

We ended up removing cookies completely from our team's scope and roadmap.

When we worked on it, I thought it necessary and useful to make the SameSite attribute a schemeful comparison, as described in https://web.dev/articles/schemeful-samesite. However, given our decision not to go forward with samesite=lax by default (due to major compat issues), I am not sure how important that is right now.
Also, from [WPT]( https://wpt.fyi/results/cookies/schemeful-same-site?label=master&label=experimental&aligned&q=schemeful and) I can see that Safari and Firefox seem to align here.

Doing anything here requires close compat monitoring. If we make that switch though, we are the 2nd engine to adopt this behavior and thus changing the assumptions for what's "default" in the web platform.

Flags: needinfo?(fbraun)

(In reply to Frederik Braun [:freddy] (reo duty for Fx124) from comment #3)

When we worked on it, I thought it necessary and useful to make the SameSite attribute a schemeful comparison, as described in https://web.dev/articles/schemeful-samesite. However, given our decision not to go forward with samesite=lax by default (due to major compat issues), I am not sure how important that is right now.

Freddy, the network.cookie.sameSite.noneRequiresSecure pref has been enabled for @IS_EARLY_BETA_OR_EARLIER@ since 2022 (bug 1750972). Should we turn this pref off now (to reduce webcompat problems for pre-release users) or leave it on to continue pre-release testing?

https://searchfox.org/mozilla-central/rev/b73676a106c1655030bb876fd5e0a6825aee6044/modules/libpref/init/StaticPrefList.yaml#11475-11478

Flags: needinfo?(fbraun)

DOM: Security team has no further plans to work on cookies, but maybe Necko does. I personally think we should go ahead with "none requires secure" and "same-site is schemeful", but that's not my call to make.

Valentin, can you tell if there are plans for Necko team?

Flags: needinfo?(fbraun) → needinfo?(valentin.gosu)

(In reply to Frederik Braun [:freddy] (reo duty for Fx124) from comment #5)

DOM: Security team has no further plans to work on cookies, but maybe Necko does. I personally think we should go ahead with "none requires secure" and "same-site is schemeful", but that's not my call to make.

Thank you for the suggestion.

Valentin, can you tell if there are plans for Necko team?

I'll put this on the roadmap. It seems like we need to address this anyway to improve our WPT tests for cookies.

Flags: needinfo?(valentin.gosu)
Depends on: 1797033

DOM: Security team has no further plans to work on cookies, but maybe Necko does. I personally think we should go ahead with "none requires secure" and "same-site is schemeful", but that's not my call to make.

I agree with Freddy. Chrome has released both features years ago.

I'll put this on the roadmap. It seems like we need to address this anyway to improve our WPT tests for cookies.

I would proceed as the following:

  1. let's enable the schemeful pref in nightly to monitor breakage.
  2. let's enable non-require-secure pref by default.
  3. let's reintroduce schemeful in the featuregate list

edgul, thought?

Flags: needinfo?(edgul)

Yes, we want to at least be working toward this this year. I'd also recommend we review the blocking bugs to see if there are fixes we can make before flipping any prefs on in nightly.

Flags: needinfo?(edgul)

I agree with Freddy. Chrome has released both features years ago.

That was our optimistic take when we tried to release this as part of the laxByDefauklt constellation before. The crash and burn was so bad we had to ship an unscheduled point release to turn it back off. Granted that the most breakage was caused by our own bugs in edge cases that had not come up in a year or two of nightly testing, but even after that we ran into a bunch of bugs on sites that served us different content than Chrome because they had made their "laxByDefault" adjustments to be "if (Chrome)"

I agree we should try to ship this again, but we need to do it very deliberately and watchfully

See Also: → 1909673
Depends on: 1921495
See Also: → 1929614
See Also: → 1929615
See Also: → 1929616
You need to log in before you can comment on or make changes to this bug.