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

COEP reflection #7948

Closed
wants to merge 1 commit into from
Closed

Conversation

ArthurSonzogni
Copy link
Member

@ArthurSonzogni ArthurSonzogni commented May 23, 2022

Original proposal

#7912

Description

This adds:

self.crossOriginEmbedderPolicy

It reflects the environment's cross-origin-embedder-policy's value.

Security/Privacy

It is already possible to deduce the value returned by the API, by making a fetch toward a known cross-origin URL responding with the request's cookies and no CORS header.
It is costly, but theoretically polyfillable. As such, it should be a security/privacy no-op.

Motivation

Depending on the Cross-Origin-Embedder-Policy value, not every iframe/subresources can be loaded inside the document. If this reflection API is provided, 3rd party scripts can take better decisions. They can implement fallbacks.

In particular, for trying Anonymous Iframe, Google DisplayAds, needs a way to know the COEP policy. The Ads's script could this way be able to decide in between inserting a normal or an anonymous iframe.


(See WHATWG Working Mode: Changes for more details.)


/webappapis.html ( diff )

Original proposal:
whatwg#7912

WPT tentative tests:
web-platform-tests/wpt#34141
- /html/cross-origin-embedder-policy/reflection-unsafe-none.tentative.https.any.js
- /html/cross-origin-embedder-policy/reflection-credentialless.tentative.https.any.js
- /html/cross-origin-embedder-policy/reflection-require-corp.tentative.https.any.js
@domenic domenic added addition/proposal New features or enhancements topic: cross-origin-embedder-policy Issues and ideas around the new "require CORP for subresource requests and frames and etc" proposal. labels May 23, 2022
Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

Spec text LGTM editorially, very nice!

@ArthurSonzogni
Copy link
Member Author

Thanks for this quick review!

I will follow the normal new feature path: w3ctag > request-for-position > blink-intent > chrome-security-review. I will be back in ~1-2 weeks when everything is completed.

@domenic
Copy link
Member

domenic commented Aug 21, 2023

Closing per w3ctag/design-reviews#742 (comment), although I'm very sad about this; it's silly that we can't just reflect HTTP headers into JS for some weird reason.

@domenic domenic closed this Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addition/proposal New features or enhancements topic: cross-origin-embedder-policy Issues and ideas around the new "require CORP for subresource requests and frames and etc" proposal.
Development

Successfully merging this pull request may close these issues.

None yet

2 participants