Skip to content
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

Add support for the Partitioned cookie attribute #55371

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

amcasey
Copy link
Member

@amcasey amcasey commented Apr 25, 2024

...to support CHIPS (Cookies Having Independent Partitioned State).

Fixes #53224
Fixes #55370

...to support CHIPS (Cookies Having Independent Partitioned State).

Fixes dotnet#53224
Fixes dotnet#55370
@amcasey amcasey requested a review from blowdart April 25, 2024 21:05
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions label Apr 25, 2024
@halter73
Copy link
Member

@blowdart I just left a comment on the issue you filed for this, but I'll repeat it here. Are we really doing this for an expired draft spec that's only supported by chromium-based browsers when the workaround is nearly as easy to use as the proposed API?

New API:

options.Cookie.Partitioned = true;

Workaround:

options.Cookie.Extensions.Add("partitioned");

We did approve the API, but we were a little rushed. And I don't think the workaround was ever demonstrated. The simplicity of the workaround really makes me want to hold off on this until the spec is final.

@blowdart
Copy link
Contributor

I take your point about the spec, but it's one of those that is unlikely to change (in my opinion) now that cookie has full throttle committed to it.

@amcasey
Copy link
Member Author

amcasey commented Apr 26, 2024

I take your point about the spec, but it's one of those that is unlikely to change (in my opinion) now that cookie has full throttle committed to it.

I'm guessing that was meant to be "chrome has full throttle committed to it".

@blowdart
Copy link
Contributor

Mozilla views it positively
Webkit views it positively

(Basically we'll add it soon)

Google started the staged rollout in chrome for 1% of users. although they stopped because regulators objected.

@amcasey
Copy link
Member Author

amcasey commented Apr 26, 2024

@blowdart @halter73 Would it be preferable to merge early and get feedback but be ready to pull it or save this until the last minute to build confidence that browsers will actually adopt it?

}

[Flags]
private enum MessagesToLog
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if it matters here, as the enum isn't embedded in a type.

Suggested change
private enum MessagesToLog
private enum MessagesToLog : byte

to make the enum smaller (1 byte vs. 4 bytes for int (default)).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I considered that, but decided against it for two reasons. First, I'm expecting there to be more flags in the future. I've already added one since the PR began. 😆 Second, I figured space saving was probably less valuable than simplified alignment on the stack (though I didn't measure).

Copy link
Contributor

Looks like this PR hasn't been active for some time and the codebase could have been changed in the meantime.
To make sure no conflicting changes have occurred, please rerun validation before merging. You can do this by leaving an /azp run comment here (requires commit rights), or by simply closing and reopening.

@dotnet-policy-service dotnet-policy-service bot added the pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions pending-ci-rerun When assigned to a PR indicates that the CI checks should be rerun
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Partitioned Cookies Add support for Partitioned Cookies
4 participants