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

Early Design Review: Allowing First-Party SameSite=None Cookies in Sandboxed Contexts #1004

Closed
1 task done
aamuley opened this issue Oct 16, 2024 · 1 comment
Closed
1 task done

Comments

@aamuley
Copy link

aamuley commented Oct 16, 2024

こんにちは TAG-さん!

I'm requesting a TAG review for allowing SameSite=None cookies in first-party sandboxed contexts in browsers with third-party cookie (3PC) restrictions.

In order to prevent malicious attacks from untrusted content, servers can include a Content-Security-Policy: sandbox HTTP header or sandbox attribute on an embedded iframe. This policy results in the browser treating the frame as an opaque origin, and requests originating from it cannot include SameSite=Strict/Lax cookies. However, for the purposes of 3PC blocking, the opaque origin also causes the browser to treat same-site subresource embeds on the top-level as cross-site, so SameSite=None cookies are also excluded from requests.

To preserve legacy behavior and mitigate future breakage due to 3PC blocking, we would like to introduce a method for servers to indicate to the browser that they wish a sandboxed context to include first-party SameSite=None cookies in requests using a Content-Security-Policy or HTML iframe sandboxing value: 'allow-same-site-none-cookies'.

Further details:

@aamuley aamuley changed the title Allowing SameSite=None Cookies in Sandboxed Contexts Early Design Review: Allowing First-Party SameSite=None Cookies in Sandboxed Contexts Oct 16, 2024
@plinss plinss added this to the 2024-12-16-week milestone Dec 16, 2024
@jyasskin
Copy link
Contributor

Thanks for sending this to us. We think the use case looks reasonable, but we'd like to make sure that the relevant working groups get a chance to check that the behavior is right and that this doesn't add too much complexity to spec and other-engine infrastructure. In particular, it looks like it might be tricky to save the site so it's reliably only used for including these particular cookies in requests. Please drive w3c/webappsec-csp#664 to a conclusion, and work on a PR for the appropriate sections of HTML.

We are reminded again that cookies are now at the point that you need a doctorate in that domain to make any sense of them. The combination with the iframe sandbox attribute really takes it to the next level in terms of web developer hostility. That's not your fault, but we think that this area of the platform is well overdue for a serious rethink.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants