-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Introduction
Deploying COEP is difficult for some developers, because of third party iframes. Here is the typical scenario:
- End users need performant websites.
- Some developers get performant websites by using multithreading/SharedArrayBuffer in their top-level document.
- To mitigate Spectre attacks, browsers vendors like Chrome, Firefox and Safari gate SharedArrayBuffer usage behind the crossOriginIsolated capability. This requires deploying both COEP and COOP
- COEP requirement is recursive: To use COEP, all the
<iframe>
must also use COEP. - Waiting for third party to deploy COEP is painful for developers. This is almost always out of their control.
Beyond performance, there are additionnal features gated behind the crossOriginIsolated capability: high resolution timers, getViewportMedia, etc...
Deploying COEP is challenging in cases where there's not a single developer involved, but many.
Anonymous iframe gives developers a way to load documents in a third party iframe from a new and ephemeral context, scoped to the current page. In return, the Cross-Origin-Embedder-Policy (COEP) embedding rules can be lifted.
This way, developers using COEP can now embed third party iframes that do not set COEP.
See repository
Links
- The problem
- Explainer
- Alternatives considered
- Tests
- Demo
- Specification
- Security considerations
- Privacy considerations
- Self-Review Questionnaire: Security and Privacy
Feedback
Zoom, StackBlitz, and Google Display Ads are supportive.
For instance, the latter loads ads content in iframes. The content can be served from 3rd parties, which is out of their direct control. It takes an industry-wide change and opt-in every resource for ads to work properly. It seems somewhat unlikely that they'll be able to ensure that all the ads creators will do the work. Implementing Anonymous-iframe would allow all publishers to get out of the SAB reverse origin trial.
Twitter:
Twitter is very close to ship COEP:credentialless
, modulo patching React and completing a few de-iframing tasks. So they will probably not need anonymous iframe to enable crossOriginIsolation. I will get more detailed feedback soon. For now:
Generally though, along the lines of the same-origin-allow-popups, if it can be done securely, this seems like a reasonable thing to support. My only hesitation would be that adding it means it's likely people will use this and never actually lean on the iframed site to upgrade.
+CC @mikewest @camillelamy @annevk @whatwg/cross-origin-isolation