Introduce Cross-Origin Embedder Policy#1516
Conversation
This is part of whatwg/html#5454. - Define embedder policy in environment settings object for service workers. - Add the CORP check in #dom-cache-matchall.
|
Some links don't work because whatwg/html#5454 has not been landed yet. |
docs/index.bs
Outdated
| 1. [=list/For each=] |requestResponse| of |requestResponses|: | ||
| 1. Add a copy of |requestResponse|'s response to |responses|. | ||
| 1. [=list/For each=] |response| of |responses|: | ||
| 1. If |response|'s [=response/type=] is "`opaque`" and [=cross-origin resource policy check=] with |response|'s [=internal/internal response=], |promise|'s [=relevant settings object=]'s [=environment settings object/origin=], and |promise|'s [=relevant settings object=] returns <b>blocked</b>, then reject |promise| with a `TypeError` and abort these steps. |
There was a problem hiding this comment.
I think this needs some updating still to account for the parameter order in Fetch. And also, one of the arguments is a policy right, not an environment settings object?
There was a problem hiding this comment.
Oh sorry I fixed the parameter ordering. Reg: policy I think you are talking about the corp internal check, not the corp check.
…RP checking in cache APIs r=dom-workers-and-storage-reviewers,perry According to w3c/ServiceWorker#1516, Replacing RequestMode by ResponseType for CORP checking in cache.match() and cache.matchAll(). Differential Revision: https://phabricator.services.mozilla.com/D77747
…RP checking in cache APIs r=dom-workers-and-storage-reviewers,perry According to w3c/ServiceWorker#1516, Replacing RequestMode by ResponseType for CORP checking in cache.match() and cache.matchAll(). Differential Revision: https://phabricator.services.mozilla.com/D77747
Merges https://github.com/WICG/cross-origin-embedder-policy into HTML. Associated PRs: * whatwg/fetch#1030 * w3c/ServiceWorker#1516 * w3c/css-houdini-drafts#992 Fixes #5368, fixes #5634, fixes whatwg/fetch#985, and fixes w3c/ServiceWorker#1490. Follow-up: #4916, #4919, #4930 #5223, and #5391. (As well as defining cross-origin isolated, per #4732.)
|
Can we land this as well? |
jakearchibald
left a comment
There was a problem hiding this comment.
LGTM. I like this pattern much more than the pattern we currently use for CSP, which is a bit hand-wavey.
|
Do we have tests for the cache API change? |
|
Thank you!
Yes, as html/cross-origin-embedder-policy/*cache-storage*.https.html. |
Merges https://github.com/WICG/cross-origin-embedder-policy into HTML. Associated PRs: * whatwg/fetch#1030 * w3c/ServiceWorker#1516 * w3c/css-houdini-drafts#992 Fixes whatwg#5368, fixes whatwg#5634, fixes whatwg/fetch#985, and fixes w3c/ServiceWorker#1490. Follow-up: whatwg#4916, whatwg#4919, whatwg#4930 whatwg#5223, and whatwg#5391. (As well as defining cross-origin isolated, per whatwg#4732.)
…RP checking in cache APIs r=dom-workers-and-storage-reviewers,perry According to w3c/ServiceWorker#1516, Replacing RequestMode by ResponseType for CORP checking in cache.match() and cache.matchAll(). Differential Revision: https://phabricator.services.mozilla.com/D77747
This is part of whatwg/html#5454.
workers.
Closes #1490 and whatwg/fetch#985.
Preview | Diff