#985: Realms Initialization Control

Visit on Github.

Opened Aug 28, 2024

こんにちは TAG-さん!

I'm requesting a TAG review of Realms Initialization Control.

Initialization of same origin realms in an application should be under that application's control.

This proposal describes an opt-in capability to set a script to be loaded first, every time a same origin realm with synchronous access to the main execution environment of the application is created.

The location of the script can be relative or absolute. Secure connection is required. The proposed method for setting the script is a Content Security Policy directive as follows: Content-Security-Policy: "realm-init: /scripts/on-new-same-origin-realm.js" so that the on-new-same-origin-realm.js script will execute before any other JavaScript code executes in the top realm execution environment, as well as any other child realm that matches its origin.

Further details:

  • I have reviewed the TAG's Web Platform Design Principles
  • The group where the incubation/design work on this is being done (or is intended to be done in the future): WICG
  • Existing major pieces of multi-implementer review or discussion of this design: None atm
  • Major unresolved issues with or opposition to this design: None atm
  • This work is being funded by: ConsenSys

Discussions

2024-10-14

Minutes

https://github.com/mozilla/standards-positions/issues/1062#issuecomment-2412451522 is fun

<blockquote>

We're very concerned about a belief that one can make Javascript secure against hostile Javascript by running first. We think WebAppSec and TC39 have relevant experience in this space, and you should make sure they're both happy with this before going forward.

</blockquote>