-
Notifications
You must be signed in to change notification settings - Fork 147
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
Lax same-site cookies should allow <a target="_blank"> #226
Comments
Auxiliary browsing contexts are top-level browsing contexts (see https://html.spec.whatwg.org/#auxiliary-browsing-context). Given that, my understanding is that the algorithm in https://tools.ietf.org/html/draft-ietf-httpbis-cookie-same-site-00#section-4.3 includes them for |
Ughhh, you're right, I missed that detail. That means lax cookies will be sent on a I'm looking for ways to allow cookies on top level navigations unless another origin has access to the window proxy ( |
Use What timing detail leaks through
|
A window proxy gives you a load event for the window. We've been throwing ideas around in w3c/resource-timing#64 and have come to the conclusion that allowing (and recommending) developers to prevent cross-origin credentialed requests is the answer. Same-site cookies look like the answer (except for intranet and http auth cases), but losing cookies on navigation seems harsh and breaking. How widely deployed are same-site cookies? Is it too late to tweak the lax behaviour? |
I guess I don't understand how "allowing developers to prevent cross-origin credentialed requests" can be the answer, while at the same time "losing cookies on navigation seems harsh and breaking".
What is it that you'd like to change? If we're going to make changes, now seems like the right time. (FWIW: It looks like ~0.003% of cookies set in the last month were same-site (with all the usual caveats about audience, opt-ins, etc). We don't have a breakdown between |
Ah yeah, I wasn't clear. The (non-strict) problem is not so much about being able to make the request, but being able to learn something from the response. If I'm right (which isn't often), "lax" same-site only gives the initiator control over the new credentialed top level window in the case of |
Alternatively, can we stop doing this? :) |
We were discussing stuff like that (and padding load times etc), but the worry is it's a hacky patch, and the information will be leaked somewhere else. Even if we can drop the load event, the initiator can still scroll the page by changing the fragment of the URL whenever it wants. The alternative is to send headers that indicate the requesting origin (which could be the |
With the understanding that this is the wrong bug for this discussion: if we feel like this is data that shouldn't be exposed cross-origin, then it seems like a better idea to find and plug the holes rather than creating an opt-in mechanism that folks who know what they're doing can use to protect themselves from things that shouldn't be possible in the first place. That is, ideally, we'd make the leak opt-in, not the seal. All that said, from a practical perspective we can probably change How do you expect this to interact with |
Also, +@annevk, as it seems like we should probably define something at the Fetch level regarding whether or not a given |
It'd be great if the We've been encouraged to move away from "bandaid" solutions by @sleevi w3c/resource-timing#64 (comment), which is why we're looking at opt-ins that tackle the root of the problem. |
I see.
You don't get a handle to the window (
I think Ryan would agree that it would be better to stop cutting ourselves in the first place by removing features from the default set of things that we offer to developers if we can't build them safely.
Hrm. I think I disagree that opt-ins "tackle the root of the problem". They give developers who pay attention the ability to mitigate the effects of problems. That seems fundamentally different than making the platform sane in the first place. For instance, X years after introduction, ~52% of cookies are set over secure transport, but only 6% of cookies use the If solving timing attacks is actually important, then it seems like we're going to have to do significantly better than We can't be aggressive enough about I should probably be typing this on the other bug. |
The side-channel attacks via |
I'm closing this out, as I'm pretty sure COOP is what we're going to rely on. If I've misunderstood, reopen? :) |
Unless I'm misreading the spec, it seems like lax same-site cookies will only be sent for top-level browsing contexts.
<a href="…" target="_blank">
creates an auxiliary context.As far as I know, the initiator doesn't get any additional information from a
_blank
link, so this restriction seems unnecessary.+@mikewest
The text was updated successfully, but these errors were encountered: