Open
Description
Relying purely on the public-suffix-list for limiting cookie scope doesn't scale well.
It would be preferable if there was a way for servers to indicate that cookie scope
should be limited via a response header.
@mikewest wrote up https://www.w3.org/TR/csp-cookies/ a few years back but it stalled out.
One approach would be to define this as a new response header (not part of CSP) as part of 6265bis.
Outside of CSP this might be something like:
Cookie-Scope: none
Cookie-Scope: host, secure
From the csp-cookies draft it proposes:
The directive has one of four values:
- "host" allows "host only" cookies to be set, but will block setting cookies which set a domain attribute.
- "http" allows cookies to be set via the Set-Cookie HTTP header, but not via document.cookie.
- "none" blocks all cookies.
- "secure" allows cookies to be set with a secure attribute, and will block setting any non-secure cookies.