-
Notifications
You must be signed in to change notification settings - Fork 28
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
Fetch-Metadata to indicate when the browser is in a partitioned context #80
Comments
As I mentioned there I think we might want something that addresses this and #56 together. I also believe that Chrome's approach around partitioning has shifted somewhat to consider A2 in A1 -> B -> A2 to be partitioned. The main worry I have with a boolean is that you will then still need the other information to determine what your partition key actually is. (Though also see privacycg/storage-partitioning#14 for why exposing that in detail is not necessarily desirable either.) cc @wanderview |
How does this differ from the |
While it is true that the storage partitioning key being proposed for Chromium would consider A1 -> B -> A2 to be partitioned; the proposed partitioning approach for cookies would not treat A1 -> B -> A2 as partitioned. As the explainer describes, the partition key is only comprised of the top-level document's site (or First-Party Set owner if the site is in an FPS). My understanding is that with the storage partitioning approach, we are trying to address the interaction of I do think the requirements for partitioned cookies are slightly different from what is being proposed for
|
So that would mean that you get partitioned IndexedDB but unpartitioned cookies in A2 (assuming they use |
If we cannot reconcile these I think |
If a browser goes to the trouble of partitioning cookies for privacy reasons does it really want to reveal that fact to the websites? Not quite the same thing, but Firefox's "Containers" feature is supposed to make different containers appears as completely separate browser instances to web sites. What benefit does this proposal offer to privacy-concerned users? |
This behavior is supposed to be enabled for all users; as opposed to an opt-in mode (like Container Tabs). The intention here is to allow sites to detect and adapt to the new default behavior for compatibility reasons.
I think the main difference from Containers is that browsers are proposing to now make each new top-level site within the same tab/profile a separate "container tab"/"partition". For example, websites may have embedded login buttons on sites that perform top-level redirects for authentication, and redirect back to the original page. This type of flow has depended on access to unpartitioned cross-site cookies, and will break in the "partitioned by-default" world. |
Isn't that the exact problem addressed by the Storage Access API ? |
For many use-cases, websites can make do with partitioned state. I think we should enable sites to make that migration as much as possible. Storage Access API's usage should be restricted to cases that really cannot make do with partitioned state. Edit: I should also clarify that Chrome currently does not ship Storage Access API. We are investing in more focused solutions at this time. |
I don't think the comparison with Firefox Containers is useful here. Containers enables browsers-within-a-browser. Partitioning isolates cross-site website state within a single top-level site within a browser (or container, if you will). Revealing to a cross-site website that it is partitioned mostly reveals that it is cross-site, a fact it can often obtain through other means already. I'd classify this mostly as an ergonomics feature for web developers. |
@annevk On the Chrome side, we are looking into whether it's possible to reconcile or not.
But in the meantime, I thought it might be worth exploring this direction. "[...] same-origin for SameSite=None cookie purposes." doesn't quite sound right since SameSite=None cookies don't need the context to be same-origin, or even same-site. Maybe we just add a token like |
Why don't |
Perhaps you are conflating SameSite's CSRF protections with third-party/partitioning behavior? With the CHIPS explainer, we are proposing that if developers add the |
The precondition for CHIPS is that cross-site cookies are blocked. That raises the question of what cross-site is. It seems that for A1 -> B -> A2 there are different definitions. That's what I was trying to express. (We might also want to consider script access here.) |
Actually, since CHIPS needs developer opt-in; that is not a precondition. We are proposing that even if unpartitioned third-party (i.e. request is to a URL that is cross-site to the top-level document) cookies are supported on the client; we will partition cookies that are labeled with the
I'm not sure if we have a canonical definition of This is why I'm wondering if we need to define a new concept to avoid confusion with the 6265bis definition? |
The problem
To improve privacy on the web, browsers are partitioning their cookie jars by first-party context. Chrome is planning on blocking (unpartitioned) third-party cookies by default. Browsers are only exposing state to third-parties that is partitioned by top-level site. CHIPS proposes that servers use the Set-Cookie header to set cross-site, Partitioned cookies which can still be sent in cross-site contexts. Firefox’s Total Cookie Protection feature also partitions all third-party cookies by default.
Servers will need to serve clients that may or may not partition third-party cookies. This could be older clients that support unpartitioned third-party cookies, or even newer clients. It would be helpful for site developers if their servers received some signal that user agents are sending requests from a partitioned context, especially during this transitory time when the web is phasing out unpartitioned cross-site (i.e. third-party) cookies.
Proposed solution
Part of the existing Fetch Metadata proposal includes a new header, Sec-Fetch-Site, an enum whose value can be same-origin, same-site, or cross-site. This header can indicate to servers that the request is coming from a cross-site context, but not if the current user agent is in a partitioned embedded context. One possible solution is to add a variant to this enum, cross-site-partitioned, and have it be sent by clients which partition embedded third-party contexts by top-level site. One con of this particular scheme is that some servers may use
Sec-Fetch-Site: cross-site
for logic used for security decisions.Another option would be to add a new request header, Sec-Partitioned: ?1 or Sec-Partitioned-Context: ?1, which is only sent when the request is coming from a partitioned context. One difference between this option and the former design is that this header could also provide a signal to the top-level site that the user agent is in a partitioned context as well, if that signal is useful for them.
@annevk suggested this as a possible approach in WICG/CHIPS/issues/2.
cc / @krgovind
The text was updated successfully, but these errors were encountered: