# Contact emailsmk...@chromium.org# Spechttps://tools.ietf.org/html/draft-west-first-party-cookies (note that there's an -07 draft that I can't upload at the moment because the IETF has closed down submissions prior to their upcoming face-to-face meeting)
I haven't discussed this spec with the TAG, as cookies are somewhat outside their purview.
# SummaryI'd like to ship the `SameSite` attribute (née "First-Party-Only" (née "First-Party")) for cookies. This attribute can mitigate cross-site request forgery and information leakage attacks by ensuring that a particular cookie is sent only in a "same-site" context. That is, `
https://evil.com` will have a harder time tricking `
https://bank.com/` into honoring a forged request if the latter marks its cookies as same-site.
I've CC'd the folks who were involved in that discussion. I think they'll be pleased with where the spec ended up.
Sorry it took so long... I got distracted. :/
# Is this feature supported on all six Blink platforms?
# Interoperability and Compatibility Risk
The "SameSite" attribute provides defense-in-depth, and gracefully degrades into a "normal" cookie in browsers that don't support the new attribute. That is, they'll treat `Set-Cookie: name=value; SameSite=Strict` as `Set-Cookie: name=value`. Sites which use the attribute will not break in browsers that don't support it, they just won't be locked to same-site contexts.
- Mozilla has been supportive of this feature. Mark Goodwin has signed on to co-edit the spec, and tells me that they plan to start implementing in the near future.
- The HTTP WG has flagged the spec as a candidate for adoption.
- Developers are interested: GitHub has re-enabled its experiment, support
has landed in Rack, folks at Facebook and Twitter have expressed tentative interest, and it's possible that some folks at Google could use this as well (though `
youtube.com` and country-coded domains make it non-trivial to implement).
# Is this feature enabled in non-secure contexts?
Yes, which you might find surprising given my comments in some other threads. :)
I'm willing to go either way on this point, however; there's a good argument to be made in terms of reducing cognitive overhead for developers by restricting all new features to secure contexts rather than creating well-meaning exceptions. I think the feature's purely restrictive nature make it an exception that proves the rule, but I'd appreciate other opinions. :)
# OWP launch tracking bug