Skip to content

Cookie layering - Http prefix - #3110

Merged
annevk merged 1 commit into
httpwg:mainfrom
yoavweiss:httponly_prefix
Jun 27, 2025
Merged

Cookie layering - Http prefix#3110
annevk merged 1 commit into
httpwg:mainfrom
yoavweiss:httponly_prefix

Conversation

@yoavweiss

@yoavweiss yoavweiss commented Jun 16, 2025

Copy link
Copy Markdown
Contributor

@yoavweiss
yoavweiss requested review from annevk and johannhof June 16, 2025 15:59
@yoavweiss

Copy link
Copy Markdown
Contributor Author

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?

@reschke reschke added the cookies Issues with the layered-cookies draft. label Jun 17, 2025
@annevk

annevk commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

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.

@yoavweiss

Copy link
Copy Markdown
Contributor Author

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:

  1. Add an HttpOnly (or Http) prefix
  2. Figure out a way to combine multiple prefixes

If that makes sense, I'm happy to turn this into (1) and open an issue to further discuss (2)

@annevk annevk left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md
@annevk

annevk commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

I like the idea of the prefix being just Http for brevity's sake. I also think we should have an issue for the multiple discussion as it'll come back.

@yoavweiss yoavweiss changed the title Cookie layering - HttpOnly and HostHttpOnly prefixes Cookie layering - HttpOnly prefix Jun 18, 2025
@yoavweiss yoavweiss changed the title Cookie layering - HttpOnly prefix Cookie layering - Http prefix Jun 18, 2025
@yoavweiss

Copy link
Copy Markdown
Contributor Author

I like the idea of the prefix being just Http for brevity's sake. I also think we should have an issue for the multiple discussion as it'll come back.

Revamped this PR to just handle the Http prefix, and opened #3111 for further discussion on prefix combinatorics.

@annevk

annevk commented Jun 18, 2025

Copy link
Copy Markdown
Contributor

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.

@yoavweiss

Copy link
Copy Markdown
Contributor Author

@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.

@yoavweiss
yoavweiss requested a review from annevk June 20, 2025 06:58

@annevk annevk left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
@yoavweiss
yoavweiss requested a review from annevk June 20, 2025 08:44
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
Comment thread draft-ietf-httpbis-layered-cookies.md Outdated
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 25, 2025
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 <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1478348}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 25, 2025
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 <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1478348}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 25, 2025
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 <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1478348}
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 25, 2025
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) <yoavweiss@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1478697}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 25, 2025
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) <yoavweiss@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1478697}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 25, 2025
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) <yoavweiss@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1478697}
As discussed at IETF 122:
https://httpwg.org/wg-materials/ietf122/minutes.html#delete-cookie-and-_httponly-prefix

Also fixes httpwg#3112 and several editorial issues.

Co-authored-by: Mike Taylor <miketaylr@google.com>
Co-authored-by: Anne van Kesteren <annevk@annevk.nl>
@annevk
annevk force-pushed the httponly_prefix branch from e99314a to a2b6e11 Compare June 27, 2025 08:10
@annevk
annevk merged commit 6a1de54 into httpwg:main Jun 27, 2025
1 check passed
aarongable pushed a commit to chromium/chromium that referenced this pull request Jun 30, 2025
As the relevant PR [1] has landed, and the I2S [2] approved, this is
now ready to be enabled by default.

[1] httpwg/http-extensions#3110
[2] https://groups.google.com/a/chromium.org/g/blink-dev/c/WsXlDO6oO2E


Bug: 426096760
Change-Id: I8195cab85387354f8773eedb4cb75ac13d2645cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6683341
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Reviewed-by: Adam Rice <ricea@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1480468}
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jul 4, 2025
Automatic update from web-platform-tests
__Http- cookie prefix

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 <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1478348}

--

wpt-commits: b42bb20b09d901cd28d8f9b2f0468998b88bcd98
wpt-pr: 53381
lando-worker Bot pushed a commit to mozilla-firefox/firefox that referenced this pull request Jul 4, 2025
Automatic update from web-platform-tests
__HostHttp- cookie prefix

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) <yoavweiss@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1478697}

--

wpt-commits: 3b3a5212b8fb4b3ea054b5150c74de66713cbe65
wpt-pr: 53394
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 4, 2025
Automatic update from web-platform-tests
__Http- cookie prefix

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 <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Commit-Queue: Yoav Weiss (@Shopify) <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1478348}

--

wpt-commits: b42bb20b09d901cd28d8f9b2f0468998b88bcd98
wpt-pr: 53381
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 4, 2025
Automatic update from web-platform-tests
__HostHttp- cookie prefix

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) <yoavweiss@chromium.org>
Reviewed-by: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Chris Fredrickson <cfredric@chromium.org>
Reviewed-by: Dylan Cutler <dylancutler@google.com>
Cr-Commit-Position: refs/heads/main@{#1478697}

--

wpt-commits: 3b3a5212b8fb4b3ea054b5150c74de66713cbe65
wpt-pr: 53394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cookies Issues with the layered-cookies draft.

Development

Successfully merging this pull request may close these issues.

4 participants