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 client-hints clearing support #74

Merged
merged 5 commits into from
Jul 14, 2023
Merged

Add client-hints clearing support #74

merged 5 commits into from
Jul 14, 2023

Conversation

arichiv
Copy link
Member

@arichiv arichiv commented Jun 28, 2023

We should be sure to cover this too for a new specific option, as well as the existing cookie and cache cases.

WICG/client-hints-infrastructure#155


Preview | Diff

We should be sure to cover this too for a new specific option, as well as the existing cookie and cache cases.
@arichiv arichiv requested a review from mikewest June 28, 2023 15:22
@arichiv arichiv self-assigned this Jun 28, 2023
arichiv added a commit to WICG/client-hints-infrastructure that referenced this pull request Jun 28, 2023
bikeshed -f spec ./index.src.htm
miketaylr pushed a commit to WICG/client-hints-infrastructure that referenced this pull request Jun 29, 2023
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 29, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 29, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jun 29, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Copy link
Member

@mikewest mikewest left a comment

Choose a reason for hiding this comment

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

Definition looks reasonable enough. I'm curious about why we'd separate this kind of cache out from cache or storage? The other options we currently have are fairly broad (storage vs. indexed-db/localstorage/etc); do you have thoughts about a guideline we could follow that would help us land on the right level of granularity?

@arichiv
Copy link
Member Author

arichiv commented Jun 30, 2023

That’s a good point, I’m not sure I have a hard and fast line to adhere to. This situation feels unique since the only way to clear the CH cache is via a header already, but the existing method (an empty Accept-CH header) was against the spec for an sf-list and would fail if a second header of the same type was sent. There likely may be a reason to clear the cache or cookies at the same time that the ch cache is cleared, but because we already had a targeted way to clear it the granularity felt reasonable.

Another option would be to just clear the ch cache on cache or cookie clears, and not add a granular target. Instead someone could send Accept-CH: clear. This would be compliant with the sf-list spec and even if other headers of the same type are sent we could just roll up the values, notice the clear token, and ignore all but it. @miketaylr @yoavweiss for comment

The main issue with that approach is that it’s incompatible with the older clear method and the user agent is being frozen so the site wouldn’t know which to use.

chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 5, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 5, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1165947}
aarongable pushed a commit to chromium/chromium that referenced this pull request Jul 5, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1165947}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 5, 2023
Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1165947}
@arichiv arichiv requested a review from mikewest July 6, 2023 17:30
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jul 12, 2023
…-Data method, a=testonly

Automatic update from web-platform-tests
[Client Hints] Support custom Clear-Site-Data method

Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1165947}

--

wpt-commits: fc5bb604a77419e6bdcd0f52a072713c04385cfb
wpt-pr: 40815
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 13, 2023
Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 13, 2023
Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Copy link
Member

@mikewest mikewest left a comment

Choose a reason for hiding this comment

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

LGTM % nits.

arichiv and others added 2 commits July 14, 2023 08:01
@arichiv arichiv merged commit f331dc0 into main Jul 14, 2023
@arichiv arichiv deleted the arichiv-patch-1 branch July 14, 2023 12:05
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jul 16, 2023
…-Data method, a=testonly

Automatic update from web-platform-tests
[Client Hints] Support custom Clear-Site-Data method

Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <avichromium.org>
Commit-Queue: Avi Drissman <avichromium.org>
Auto-Submit: Ari Chivukula <arichivchromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Cr-Commit-Position: refs/heads/main{#1165947}

--

wpt-commits: fc5bb604a77419e6bdcd0f52a072713c04385cfb
wpt-pr: 40815

UltraBlame original commit: d3360fa0d016dc45ffdad7991fb0c779a704d08c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Jul 16, 2023
…-Data method, a=testonly

Automatic update from web-platform-tests
[Client Hints] Support custom Clear-Site-Data method

Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <avichromium.org>
Commit-Queue: Avi Drissman <avichromium.org>
Auto-Submit: Ari Chivukula <arichivchromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Cr-Commit-Position: refs/heads/main{#1165947}

--

wpt-commits: fc5bb604a77419e6bdcd0f52a072713c04385cfb
wpt-pr: 40815

UltraBlame original commit: d3360fa0d016dc45ffdad7991fb0c779a704d08c
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jul 16, 2023
…-Data method, a=testonly

Automatic update from web-platform-tests
[Client Hints] Support custom Clear-Site-Data method

Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <avichromium.org>
Commit-Queue: Avi Drissman <avichromium.org>
Auto-Submit: Ari Chivukula <arichivchromium.org>
Reviewed-by: Arthur Sonzogni <arthursonzognichromium.org>
Cr-Commit-Position: refs/heads/main{#1165947}

--

wpt-commits: fc5bb604a77419e6bdcd0f52a072713c04385cfb
wpt-pr: 40815

UltraBlame original commit: d3360fa0d016dc45ffdad7991fb0c779a704d08c
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Jul 16, 2023
…-Data method, a=testonly

Automatic update from web-platform-tests
[Client Hints] Support custom Clear-Site-Data method

Let's add a (disabled by default) method to target just client hints for
clearing. This is per the proposed spec change:
w3c/webappsec-clear-site-data#74

Note: The next step is to ensure that the Clear-Site-Data directive
causes any Accept-CH or Critical-CH to be ignored when it does
clear client hints.

Bug: 1458394
Change-Id: Iae52b86d68bd6c0f81a9886c6ee29b7245d6915a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4652839
Reviewed-by: Avi Drissman <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Reviewed-by: Arthur Sonzogni <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1165947}

--

wpt-commits: fc5bb604a77419e6bdcd0f52a072713c04385cfb
wpt-pr: 40815
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 18, 2023
Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 19, 2023
Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 19, 2023
Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 20, 2023
Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 24, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 24, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 24, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 24, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 25, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 25, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683467
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1174862}
aarongable pushed a commit to chromium/chromium that referenced this pull request Jul 25, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683467
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1174862}
chromium-wpt-export-bot pushed a commit to web-platform-tests/wpt that referenced this pull request Jul 25, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683467
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1174862}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Aug 2, 2023
… overwrites Accept-CH and Critical-CH headers, a=testonly

Automatic update from web-platform-tests
[Clear-Site-Data] Ensure Clear-Site-Data overwrites Accept-CH and Critical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683467
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1174862}

--

wpt-commits: 80842019ed0a351468da763704ca45b04a17103c
wpt-pr: 41019
ErichDonGubler pushed a commit to erichdongubler-mozilla/firefox that referenced this pull request Aug 4, 2023
… overwrites Accept-CH and Critical-CH headers, a=testonly

Automatic update from web-platform-tests
[Clear-Site-Data] Ensure Clear-Site-Data overwrites Accept-CH and Critical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683467
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1174862}

--

wpt-commits: 80842019ed0a351468da763704ca45b04a17103c
wpt-pr: 41019
Lightning00Blade pushed a commit to Lightning00Blade/wpt that referenced this pull request Dec 11, 2023
…tical-CH headers

Per the spec:
w3c/webappsec-clear-site-data#74
We must not store new client hints if we are already clearing them.

Bug: 1458394
Change-Id: Ie82e60175784de52b6a3ac7756af31949c89df0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4683467
Reviewed-by: Avi Drissman <[email protected]>
Reviewed-by: Maks Orlovich <[email protected]>
Auto-Submit: Ari Chivukula <[email protected]>
Commit-Queue: Avi Drissman <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1174862}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants