-
Notifications
You must be signed in to change notification settings - Fork 9
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
Request Limit #87
Comments
How about taking time into consideration? I'm not going to try to spec precisely here but at the high level:
The gaols I'm trying to reach with this are:
|
Maybe start with shipping something simpler and extend later? |
Pinging @yoavweiss @noamr As the OT is started, we might want to continue this discussion. |
I'd love to hear @annevk's opinion on the options in the OP. Let me try to clarify (for my own sake) the threat model this quota is protecting against. Hence, we're trying to protect against network abuse by any individual party on a particular site. If our quotas were to span across frames, they are likely to end up leaking cross-origin state or enable interference with cross-origin activity, and may cause more harm than their presumed protection. But if our quotas don't span across frames, abusers can easily circumvent them by creating more frames that send more data. Given the above, my preference would be:
|
I haven't really changed my thinking on this. We'd give a top-level origin/site a quota and it can share that quota using Permissions Policy. That still seems like the most robust approach. That also puts the blame squarely with the top-level origin/site, which is generally what you want if you were to surface any of this to end users. |
I also don't see a way around this. It does mean that |
I am going to add Permissions Policy into OT implementation, but houw about its default? I think from our side we still want to minimize the friction to make the API available to 3P frames, and making it to 'self' means that the API won't be available in most of the existing sites at all. |
That is the correct default though. Otherwise you make the top-level site responsible for something it didn't even know. |
I tend to agree with @annevk on this, though perhaps this is not a spec concern. I can't find any place in the spec that defines default values for these policies but perhaps I'm missing something. I can see how hypothetically a UA can e.g. decide to enable this by default but disable it when there are signs of abuse. |
Combing the comment from Yoav
Does that mean a top-level frame has 640KB quota by default, and it allows at most 10 reporting origins within this frame? What happens when 11th origin makes a fetchLater? Does all iframes share the same 640KB or has their own independent quota? And a quota for origin A in top-level frame is not shared for origin A in other top-level frame right? |
There is no limit to the number of reporting-sink origins. The proposal is:
|
This seems fine as long as we think that there won't be more than 10 reporting sink in the "typical" case. If that's the case, this policy would be fine, and won't result in reporters "ensuring their quota" by registering and using it early. @nicjansma - WDYT? |
OK, I'm working on the PR, the main thing I need fleshed-out is how to deal with workers, since they:
I see three options here:
thoughts? |
We are fine with supporting only documents for now. There are infra limitation in Chromium such that fetchLater can't be supported in workers. |
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit This CL follows the [guide] to define a new permissions policy `deferred-fetch`, which is used to gate the new `fetchLater()` API. Relevant WPT are added in this CL, and the subsequent CL will further use this policy to adjust the request quota. In this CL, `deferred-fetch` is not added to chrome://settings/content page. And no permission prompt for it. - webappsec request: w3c/webappsec-permissions-policy#544 - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md Bug: b:40276121 Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d
Although this is implementation-specific details, I just realized this requires a mechanism to enable cross-process iframes to update each other the size of their pending requests synchrounously (given the example), which is difficult to achieve and may not pass security review. The above is neccessary, as the steps introduced by whatwg/fetch@8d237d0 assumes that child cross-site iframes can obtain all body sizes of pending fetchLater requests from their parent documents in real time when JS fetchLater() is called (such that QuotaExceededError can be thrown). However, traversing cross-site ancestors in renderer process won't provide anything useful Is there any alternative approach for it? |
Hi all, Chiming in from an ads perspective. Reliability is of utmost importance for us. Regarding origin related permissions: The usefulness of FetchLater is that it will allow us to send our data in a single beacon at the end of the session, as opposed to many HTTP requests throughout the page life cycle. The problem for us is that we do not control the domain stack we are rendered into because we are often served and rendered with the ad. In most cases, we are rendered into a 3P iframe that we do not control meaning we cannot control the “deferred-fetch” permissions. If FetchLater is only available in 3P iframes when explicitly permitted with “deferred-fetch” AND we can detect the non-permitted case, then we would have to fallback to the “multiple HTTP requests” solution for that traffic (meaning two event processing stacks would need to exist). Worse, if FetchLater is only available in 3P iframes when explicitly permitted with “deferred-fetch” AND we CANNOT detect the non-permitted case, we will not be able to adopt this API at all. Knowing that the API is less reliable than stream solutions, would make the API a non-starter for us. Regarding the size budget: The beacon size limitation is less of a concern, under the assumption that it would be a constraint in exceedingly rare situations; however, if it turns out it happens often, that would also warrant us to revert to the multi-beacon approach. A size limitation feels like a premature optimization and seems like something we could investigate at a later point in time if there are issues in production. |
This will always be detectable using the permissions policy API, or by trying to call
Thanks for this feedback! |
This is a reland of commit 193729386996ac0bd40dba0aa98b7f85ff7b94d1 The failed test from https://crbug.com/339120680 is removed by https://crrev.com/c/5524593/1..2 as the same behavior is already covered by `/fetch/fetch-later/permissions-policy/deferred-fetch-default-permissions-policy.tentative.https.window.js` more carefully. Original change's description: > [fetch-later] Define new permissions policy `deferred-fetch` > > 1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit > > This CL follows the [guide] to define a new permissions policy > `deferred-fetch`, which is used to gate the new `fetchLater()` API. > Relevant WPT are added in this CL, and the subsequent CL will further > use this policy to adjust the request quota. > > In this CL, `deferred-fetch` is not added to chrome://settings/content > page. And no permission prompt for it. > > - webappsec request: w3c/webappsec-permissions-policy#544 > - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch > - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) > - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md > > > [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md > > Bug: b:40276121,339120680 > Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367481 > Reviewed-by: Adam Rice <[email protected]> > Reviewed-by: Thomas Nguyen <[email protected]> > Reviewed-by: Ian Clelland <[email protected]> > Commit-Queue: Ming-Ying Chung <[email protected]> > Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> > Reviewed-by: Takashi Toyoshima <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1297320} Bug: b:40276121,339120680 Change-Id: I41e2f0980f5d72eb6c0687a82d96ad4a59f59936
This is a reland of commit 193729386996ac0bd40dba0aa98b7f85ff7b94d1 The failed test from https://crbug.com/339120680 is removed by https://crrev.com/c/5524593/1..2 as the same behavior is already covered by `/fetch/fetch-later/permissions-policy/deferred-fetch-default-permissions-policy.tentative.https.window.js` more carefully. Original change's description: > [fetch-later] Define new permissions policy `deferred-fetch` > > 1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit > > This CL follows the [guide] to define a new permissions policy > `deferred-fetch`, which is used to gate the new `fetchLater()` API. > Relevant WPT are added in this CL, and the subsequent CL will further > use this policy to adjust the request quota. > > In this CL, `deferred-fetch` is not added to chrome://settings/content > page. And no permission prompt for it. > > - webappsec request: w3c/webappsec-permissions-policy#544 > - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch > - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) > - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md > > > [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md > > Bug: b:40276121,339120680 > Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367481 > Reviewed-by: Adam Rice <[email protected]> > Reviewed-by: Thomas Nguyen <[email protected]> > Reviewed-by: Ian Clelland <[email protected]> > Commit-Queue: Ming-Ying Chung <[email protected]> > Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> > Reviewed-by: Takashi Toyoshima <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1297320} Bug: b:40276121,339120680 Change-Id: I41e2f0980f5d72eb6c0687a82d96ad4a59f59936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5524593 Reviewed-by: Thomas Nguyen <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Ian Clelland <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Reviewed-by: Takashi Toyoshima <[email protected]> Reviewed-by: Adam Rice <[email protected]> Cr-Commit-Position: refs/heads/main@{#1310429}
This is a reland of commit 193729386996ac0bd40dba0aa98b7f85ff7b94d1 The failed test from https://crbug.com/339120680 is removed by https://crrev.com/c/5524593/1..2 as the same behavior is already covered by `/fetch/fetch-later/permissions-policy/deferred-fetch-default-permissions-policy.tentative.https.window.js` more carefully. Original change's description: > [fetch-later] Define new permissions policy `deferred-fetch` > > 1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit > > This CL follows the [guide] to define a new permissions policy > `deferred-fetch`, which is used to gate the new `fetchLater()` API. > Relevant WPT are added in this CL, and the subsequent CL will further > use this policy to adjust the request quota. > > In this CL, `deferred-fetch` is not added to chrome://settings/content > page. And no permission prompt for it. > > - webappsec request: w3c/webappsec-permissions-policy#544 > - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch > - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) > - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md > > > [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md > > Bug: b:40276121,339120680 > Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367481 > Reviewed-by: Adam Rice <[email protected]> > Reviewed-by: Thomas Nguyen <[email protected]> > Reviewed-by: Ian Clelland <[email protected]> > Commit-Queue: Ming-Ying Chung <[email protected]> > Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> > Reviewed-by: Takashi Toyoshima <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1297320} Bug: b:40276121,339120680 Change-Id: I41e2f0980f5d72eb6c0687a82d96ad4a59f59936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5524593 Reviewed-by: Thomas Nguyen <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Ian Clelland <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Reviewed-by: Takashi Toyoshima <[email protected]> Reviewed-by: Adam Rice <[email protected]> Cr-Commit-Position: refs/heads/main@{#1310429}
…ions policy `deferred-fetch`", a=testonly Automatic update from web-platform-tests Reland "[fetch-later] Define new permissions policy `deferred-fetch`" This is a reland of commit 193729386996ac0bd40dba0aa98b7f85ff7b94d1 The failed test from https://crbug.com/339120680 is removed by https://crrev.com/c/5524593/1..2 as the same behavior is already covered by `/fetch/fetch-later/permissions-policy/deferred-fetch-default-permissions-policy.tentative.https.window.js` more carefully. Original change's description: > [fetch-later] Define new permissions policy `deferred-fetch` > > 1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit > > This CL follows the [guide] to define a new permissions policy > `deferred-fetch`, which is used to gate the new `fetchLater()` API. > Relevant WPT are added in this CL, and the subsequent CL will further > use this policy to adjust the request quota. > > In this CL, `deferred-fetch` is not added to chrome://settings/content > page. And no permission prompt for it. > > - webappsec request: w3c/webappsec-permissions-policy#544 > - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch > - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) > - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md > > > [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md > > Bug: b:40276121,339120680 > Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367481 > Reviewed-by: Adam Rice <[email protected]> > Reviewed-by: Thomas Nguyen <[email protected]> > Reviewed-by: Ian Clelland <[email protected]> > Commit-Queue: Ming-Ying Chung <[email protected]> > Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> > Reviewed-by: Takashi Toyoshima <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1297320} Bug: b:40276121,339120680 Change-Id: I41e2f0980f5d72eb6c0687a82d96ad4a59f59936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5524593 Reviewed-by: Thomas Nguyen <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Ian Clelland <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Reviewed-by: Takashi Toyoshima <[email protected]> Reviewed-by: Adam Rice <[email protected]> Cr-Commit-Position: refs/heads/main@{#1310429} -- wpt-commits: cdd00c8bc0a087353a9dc26e80f11c87aa4fdfae wpt-pr: 46159
…ions policy `deferred-fetch`", a=testonly Automatic update from web-platform-tests Reland "[fetch-later] Define new permissions policy `deferred-fetch`" This is a reland of commit 193729386996ac0bd40dba0aa98b7f85ff7b94d1 The failed test from https://crbug.com/339120680 is removed by https://crrev.com/c/5524593/1..2 as the same behavior is already covered by `/fetch/fetch-later/permissions-policy/deferred-fetch-default-permissions-policy.tentative.https.window.js` more carefully. Original change's description: > [fetch-later] Define new permissions policy `deferred-fetch` > > 1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit > > This CL follows the [guide] to define a new permissions policy > `deferred-fetch`, which is used to gate the new `fetchLater()` API. > Relevant WPT are added in this CL, and the subsequent CL will further > use this policy to adjust the request quota. > > In this CL, `deferred-fetch` is not added to chrome://settings/content > page. And no permission prompt for it. > > - webappsec request: w3c/webappsec-permissions-policy#544 > - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch > - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) > - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md > > > [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md > > Bug: b:40276121,339120680 > Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367481 > Reviewed-by: Adam Rice <[email protected]> > Reviewed-by: Thomas Nguyen <[email protected]> > Reviewed-by: Ian Clelland <[email protected]> > Commit-Queue: Ming-Ying Chung <[email protected]> > Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> > Reviewed-by: Takashi Toyoshima <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1297320} Bug: b:40276121,339120680 Change-Id: I41e2f0980f5d72eb6c0687a82d96ad4a59f59936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5524593 Reviewed-by: Thomas Nguyen <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Ian Clelland <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Reviewed-by: Takashi Toyoshima <[email protected]> Reviewed-by: Adam Rice <[email protected]> Cr-Commit-Position: refs/heads/main@{#1310429} -- wpt-commits: cdd00c8bc0a087353a9dc26e80f11c87aa4fdfae wpt-pr: 46159
…ions policy `deferred-fetch`", a=testonly Automatic update from web-platform-tests Reland "[fetch-later] Define new permissions policy `deferred-fetch`" This is a reland of commit 193729386996ac0bd40dba0aa98b7f85ff7b94d1 The failed test from https://crbug.com/339120680 is removed by https://crrev.com/c/5524593/1..2 as the same behavior is already covered by `/fetch/fetch-later/permissions-policy/deferred-fetch-default-permissions-policy.tentative.https.window.js` more carefully. Original change's description: > [fetch-later] Define new permissions policy `deferred-fetch` > > 1-Pager: https://docs.google.com/document/d/1P70kdENIByy3qWabN5rUPmBVkkANNSOM_jZynLnqINY/edit > > This CL follows the [guide] to define a new permissions policy > `deferred-fetch`, which is used to gate the new `fetchLater()` API. > Relevant WPT are added in this CL, and the subsequent CL will further > use this policy to adjust the request quota. > > In this CL, `deferred-fetch` is not added to chrome://settings/content > page. And no permission prompt for it. > > - webappsec request: w3c/webappsec-permissions-policy#544 > - "deferred-fetch" usage in fetchLater draft spec: https://whatpr.org/fetch/1647.html#request-a-deferred-fetch > - "deferred-fetch" policy discussion: WICG/pending-beacon#87 (comment) > - FetchLater Explainer: https://github.com/WICG/pending-beacon/blob/main/docs/fetch-later-api.md > > > [guide]: https://chromium.googlesource.com/chromium/src/+/main/components/permissions/add_new_permission.md > > Bug: b:40276121,339120680 > Change-Id: I2db4dd7484610fefb50c463552155b220f13ac5d > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5367481 > Reviewed-by: Adam Rice <[email protected]> > Reviewed-by: Thomas Nguyen <[email protected]> > Reviewed-by: Ian Clelland <[email protected]> > Commit-Queue: Ming-Ying Chung <[email protected]> > Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> > Reviewed-by: Takashi Toyoshima <[email protected]> > Cr-Commit-Position: refs/heads/main@{#1297320} Bug: b:40276121,339120680 Change-Id: I41e2f0980f5d72eb6c0687a82d96ad4a59f59936 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5524593 Reviewed-by: Thomas Nguyen <[email protected]> Reviewed-by: Yoav Weiss (@Shopify) <[email protected]> Reviewed-by: Ian Clelland <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Reviewed-by: Takashi Toyoshima <[email protected]> Reviewed-by: Adam Rice <[email protected]> Cr-Commit-Position: refs/heads/main@{#1310429} -- wpt-commits: cdd00c8bc0a087353a9dc26e80f11c87aa4fdfae wpt-pr: 46159
This is a major loss and does not seem worth it to prevent some hypothetical quota stealing. If bad-acting 3rd parties turn out to be a real problem, it is easy for the top-level site to control that with a policy. With regard to making progress and launching with |
@jakeherron-google can you be more specific about "we do not control the domain stack we are rendered into because we are often served and rendered with the ad"? How does this work more in detail? |
Note that the Permissions Policy API does not have cross-browser agreement. (I thought the plan was to merge it into the Permissions API but to what extent that has happened is unclear.) |
Yes, to be more specific we deploy Javascript alongside the ad that conducts measurement throughout its lifecycle. The actual ad content along with any scripts will be served into a 3P iframe that the publisher webpage has control over. The publisher does not know anything about the ad served into the 3P frame, by design. Likewise, our ad measurement script has no control over this iframe by design. Our use of the fetchLater API would be beholden to the publisher opting into deferred-fetch for our ad’s iframe under the proposed permissions policy. |
Summarizing internal conversations about this: This quota can be small, e.g. 16kb per 3p-origin-in-a-top-level-document. We see the risk of using this "spare change fund" quota for abusing bandwidth after window close as small, and is anyway possible in other means today such as ordinary So proposing to keep the current spec wording, but to add a per-3p-origin quota to the effect of 16kb that doesn't require permissions policy. Allowing an iframe to use the overall quota would have the effect of increasing it to 64kb. We'd prefer to have this as a normal part of the spec, but also open to having it implementation-defined or a MAY/SHOULD that allows user-agents to choose their tradeoff between utility and risk of bandwidth abuse. FWIW I think it's a legitimate tradeoff to leave for browsers to differentiate, and is discoverable enough so that it shouldn't create a substantial interop issue. @annevk thoughts? |
We discussed this once more internally. We continue to be concerned about letting third parties consume end user system resources without explicit buy-in from the first party. To the extent that is possible today through service workers that will likely be something we will eliminate going forward (the main reason for keeping service workers alive in WebKit has been to make navigation quicker, not for web application shutdown purposes). And thus we would not want to use that as precedent when designing a new API. |
Understood. I suggest that having this as a MAY in the spec is a better way forward than remaining blocked on this, as allowing 3ps to use this feature without 1p buy-in is an important use case for us (with a very small quota). We'd prefer to tackle hypothetical problems that arise from this, keeping an eye on metrics, rather than constrain this API in advance in a way that would make it a lot less useful. Since this API is anyway built to not always work based on all kinds of constraints, I think having this as a constraint that's up to some implementation-specific discretion is probably the best we can come up with.
Apart from service-workers, another precedence is ordinary |
The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1351171}
The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1351171}
The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1351171}
Updated the PR, to include a 3p default quota of 16kb even if the permissions policy is not present (in a MAY clause). This is currently the only way I see forward given lack of consensus about this detail, which is really a small bit of this API. I think it's better to have one detail with an implementation-defined difference than hold this issue back indefinitely or ship it with a monkey-patch spec. Open to hear other alternatives! |
…d-fetch" for now, a=testonly Automatic update from web-platform-tests Update FetchLaterAPI to not use "deferred-fetch" for now The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1351171} -- wpt-commits: d575dc75ede770df322fbc5da3112dcf81f192ec wpt-pr: 47974
…d-fetch" for now, a=testonly Automatic update from web-platform-tests Update FetchLaterAPI to not use "deferred-fetch" for now The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1351171} -- wpt-commits: d575dc75ede770df322fbc5da3112dcf81f192ec wpt-pr: 47974
…d-fetch" for now, a=testonly Automatic update from web-platform-tests Update FetchLaterAPI to not use "deferred-fetch" for now The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <[email protected]> Commit-Queue: Ming-Ying Chung <[email protected]> Cr-Commit-Position: refs/heads/main@{#1351171} -- wpt-commits: d575dc75ede770df322fbc5da3112dcf81f192ec wpt-pr: 47974
…d-fetch" for now, a=testonly Automatic update from web-platform-tests Update FetchLaterAPI to not use "deferred-fetch" for now The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <nidhijajuchromium.org> Commit-Queue: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1351171} -- wpt-commits: d575dc75ede770df322fbc5da3112dcf81f192ec wpt-pr: 47974 UltraBlame original commit: 52384999063c6e9d9ab6e380ac75ac5608683b0a
…d-fetch" for now, a=testonly Automatic update from web-platform-tests Update FetchLaterAPI to not use "deferred-fetch" for now The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <nidhijajuchromium.org> Commit-Queue: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1351171} -- wpt-commits: d575dc75ede770df322fbc5da3112dcf81f192ec wpt-pr: 47974 UltraBlame original commit: 52384999063c6e9d9ab6e380ac75ac5608683b0a
…d-fetch" for now, a=testonly Automatic update from web-platform-tests Update FetchLaterAPI to not use "deferred-fetch" for now The [discussion][1] is not yet finalized, but we want to extend OT for other partners. [1]: WICG/pending-beacon#87 (comment) Bug: 40276121 Change-Id: I6f163add73707be7b9c2b34d58dce22542621293 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5833346 Reviewed-by: Nidhi Jaju <nidhijajuchromium.org> Commit-Queue: Ming-Ying Chung <mychchromium.org> Cr-Commit-Position: refs/heads/main{#1351171} -- wpt-commits: d575dc75ede770df322fbc5da3112dcf81f192ec wpt-pr: 47974 UltraBlame original commit: 52384999063c6e9d9ab6e380ac75ac5608683b0a
Open questions from last meeting:
Some concerns:
Relevant Discussions: w3c/beacon#38 (comment)
@noamr @annevk @nicjansma @yoavweiss
The text was updated successfully, but these errors were encountered: