Trusted Types support in CSP Embedded Enforcement
- Category
- Security
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
CSP Embedded Enforcement checks the `require-trusted-types-for` and `trusted-types` directives when determining whether an embedded document satisfies an iframe's required CSP. This allows embedding sites to require Trusted Types protections before an embedded document loads.
Motivation
CSP Embedded Enforcement lets an embedding page require an iframe response to enforce a specified Content Security Policy before it loads. Its subsumption check currently ignores the `require-trusted-types-for` and `trusted-types` directives, so embedders cannot use this mechanism to require Trusted Types protections. Supporting these directives allows embedding applications to verify that embedded content enforces the required Trusted Types restrictions before loading. Note: No separate explainer is planned because this change does not introduce new API surface. It closes a gap in the existing subsumption check that prevents embedders from requiring and verifying Trusted Types protections on iframe responses.
Standards & signals
- Specification: https://w3c.github.io/webappsec-cspee/#subsume-policy,https://github.com/w3c/webappsec-cspee/pull/36
- Firefox: No signal
- Safari: No signal
- Web developers: Positive
- Tracking bug: https://issues.chromium.org/issues/40912894
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=trusted-types-support-in-csp-embedded-enforcement
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Trusted%20Types%20support%20in%20CSP%20Embedded%20Enforcement
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Trusted%20Types%20support%20in%20CSP%20Embedded%20Enforcement
- Baseline status: https://webstatus.dev/?q=Trusted%20Types%20support%20in%20CSP%20Embedded%20Enforcement