-
Notifications
You must be signed in to change notification settings - Fork 56
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
Should browser.tabs.create
send SameSite=Strict cookies?
#663
Comments
TL;DR: By default, I would however also like the ability for extensions to opt out of this default behavior, that is to not send SameSite=Strict cookies (but only SameSite=Lax and SameSite=None cookies - see MDN: SameSite). Imagine the use case of an extension that wants to re-open a closed tab (I have created such an extension for myself because Chrome does not offer that feature in incognito mode). The most straightforward way to implement this is to keep track of the list of URLs and then re-open it if the user wants to. The problem with that is that a re-opened tab may then suddenly see a different set of cookies than originally received. I'm proposing to allow extensions to specify the initiator of a navigation request (in For top-level navigations, the relevant set of cookies are directly derived from the relation between the initiator of the navigation request and the opened destination:
Note: a special case is opaque origins. Opaque origins can be encountered on the web when I'll put up a more detailed API proposal when I have some more time (maybe in a month or so).
This happens because we internally set the initiator to the extension's base URL, to associate the navigation with the extension. Because initiator is set, the request is no longer considered to be a first-party request unconditionally, and the "usual" third party checks happen. Note for myself: The extension permission check in |
Chrome is aligned with Firefox that SameSite=Strict cookies should be included by default. We are also open to a way to control this through an |
We are open to an |
A developer recently filed a Chromium issue with questions about the fact that Chrome sends SameSite=Strict cookies when a site is opened with
browser.tabs.create
. We don't think this is a security issue, but acknowledged it may be useful behavior to clarify across browser vendors.I have done some testing and included my results below. The developer also mentioned opening from an external application as being an interesting test case, so I have included that too.
[1] I wasn't able to find any documentation on this, but that was what seemed to happen in a quick test.
I would lean towards aligning with the behavior from an external application, i.e including them regardless of host permissions.
The text was updated successfully, but these errors were encountered: