-
Notifications
You must be signed in to change notification settings - Fork 161
Cookie layering - Http prefix #3110
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
base: main
Are you sure you want to change the base?
Conversation
Given https://lists.w3.org/Archives/Public/ietf-http-wg/2025AprJun/0188.html, maybe we want to land __HttpOnly first while we figure out what the compounding mechanism here should be? |
It might be good to open an issue to discuss further, but my inclination would be that we turn this into some kind of table of prefix strings and their corresponding restrictions down the line. I don't think the combinatorial explosion is all that bad and allowing them in arbitrary order would in fact turn a simple prefix match into a parser question with all the resulting issues that come with that. |
Yeah, there's a discussion happening on that front in https://lists.w3.org/Archives/Public/ietf-http-wg/2025AprJun/0192.html I think we can split this into two separate things:
If that makes sense, I'm happy to turn this into (1) and open an issue to further discuss (2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately this will also need a corresponding PR to the Cookie Store API. Perhaps if we eventually abstract this convention somehow we can improve that.
I like the idea of the prefix being just |
Revamped this PR to just handle the |
I added a checklist to OP for what remains to be done. I suppose we also need to make some assessment as to whether this has broad enough support, but I think it has from the list discussion. |
@annevk - I tried to split out the conditions to separate algorithms, to make it easier/clearer when combining them for HostHttp. Let me know what you think. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it. I'm half-tempted to also suggest introducing a list of known prefixes so we can deduplicate some of that across specifications, but I think this is sufficient for now. At some point the abstractions might also impede clarity.
This CL implements the __Http- [1] cookie prefixes. They enable site operators to know that a certain cookie was issued with the HttpOnly attribute, and was not set by a malicious script on the client side. [1] httpwg/http-extensions#3110 Bug: 426096760 Change-Id: I13205747406a8b3c33bd9f0e60abd7526eb9490d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6638647 Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Chris Fredrickson <[email protected]> Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Cr-Commit-Position: refs/heads/main@{#1478348}
This CL implements the __Http- [1] cookie prefixes. They enable site operators to know that a certain cookie was issued with the HttpOnly attribute, and was not set by a malicious script on the client side. [1] httpwg/http-extensions#3110 Bug: 426096760 Change-Id: I13205747406a8b3c33bd9f0e60abd7526eb9490d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6638647 Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Chris Fredrickson <[email protected]> Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Cr-Commit-Position: refs/heads/main@{#1478348}
This CL implements the __Http- [1] cookie prefixes. They enable site operators to know that a certain cookie was issued with the HttpOnly attribute, and was not set by a malicious script on the client side. [1] httpwg/http-extensions#3110 Bug: 426096760 Change-Id: I13205747406a8b3c33bd9f0e60abd7526eb9490d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6638647 Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Chris Fredrickson <[email protected]> Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Cr-Commit-Position: refs/heads/main@{#1478348}
Remove the HostHttpOnly parts and review comments Remove some more hosthttponly rename Add back HostHttp and split out conditions Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Move algos to misc Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Mike Taylor <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Mike Taylor <[email protected]> know Add a path-attribute Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Revert incorrect default path changes has path attribute Cookie layering - HttpOnly and HostHttpOnly prefixes Remove the HostHttpOnly parts and review comments Remove some more hosthttponly rename Add back HostHttp and split out conditions Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Move algos to misc Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Mike Taylor <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Mike Taylor <[email protected]> know Add a path-attribute Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Update draft-ietf-httpbis-layered-cookies.md Co-authored-by: Anne van Kesteren <[email protected]> Revert incorrect default path changes has path attribute
c17fffa
to
e99314a
Compare
Similar to [1], this adds an __HostHttp- prefix that ensures that a cookies is both Host-scoped and httpOnly. Specified in [2] [1] https://chromium-review.googlesource.com/c/chromium/src/+/6638647 [2] httpwg/http-extensions#3110 Bug: 426096760 Change-Id: Id1637331eaa3035443d005450c022b326378aeed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6650996 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Chris Fredrickson <[email protected]> Reviewed-by: Dylan Cutler <[email protected]> Cr-Commit-Position: refs/heads/main@{#1478697}
Similar to [1], this adds an __HostHttp- prefix that ensures that a cookies is both Host-scoped and httpOnly. Specified in [2] [1] https://chromium-review.googlesource.com/c/chromium/src/+/6638647 [2] httpwg/http-extensions#3110 Bug: 426096760 Change-Id: Id1637331eaa3035443d005450c022b326378aeed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6650996 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Chris Fredrickson <[email protected]> Reviewed-by: Dylan Cutler <[email protected]> Cr-Commit-Position: refs/heads/main@{#1478697}
Similar to [1], this adds an __HostHttp- prefix that ensures that a cookies is both Host-scoped and httpOnly. Specified in [2] [1] https://chromium-review.googlesource.com/c/chromium/src/+/6638647 [2] httpwg/http-extensions#3110 Bug: 426096760 Change-Id: Id1637331eaa3035443d005450c022b326378aeed Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6650996 Commit-Queue: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Maks Orlovich <[email protected]> Reviewed-by: Chris Fredrickson <[email protected]> Reviewed-by: Dylan Cutler <[email protected]> Cr-Commit-Position: refs/heads/main@{#1478697}
As discussed at IETF 122, this is a stab at integrating https://yoavweiss.github.io/httponly_prefix/draft-httponlyprefix-weiss-http.html with the Cookie layering processing model.