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

Realms Initialization Control #389

Open
weizman opened this issue Aug 28, 2024 · 2 comments
Open

Realms Initialization Control #389

weizman opened this issue Aug 28, 2024 · 2 comments
Labels
concerns: security This proposal may cause security risk if implemented venue: WICG Proposal is incubated in the Web Incubator Community Group

Comments

@weizman
Copy link

weizman commented Aug 28, 2024

WebKittens

No response

Title of the proposal

Realms Initialization Control

URL to the spec

https://github.com/WICG/Realms-Initialization-Control

URL to the spec's repository

https://github.com/WICG/Realms-Initialization-Control

Issue Tracker URL

No response

Explainer URL

No response

TAG Design Review URL

w3ctag/design-reviews#985

Mozilla standards-positions issue URL

mozilla/standards-positions#1062

WebKit Bugzilla URL

No response

Radar URL

No response

Description

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.

@annevk
Copy link
Contributor

annevk commented Aug 28, 2024

It seems the motivation here in part is security, but you cannot prevent code running in your process from accessing the process memory. See Meltdown and Spectre.

There's also a lot of overlap with shadow realms in terms of functionality offered that's not really addressed by the README.

@annevk annevk added concerns: security This proposal may cause security risk if implemented venue: WICG Proposal is incubated in the Web Incubator Community Group labels Aug 28, 2024
@weizman
Copy link
Author

weizman commented Sep 12, 2024

Hi @annevk, thanks for your feedback, sorry for taking a while, we spent most of that time to circle with experts to address your concerns the best way possible, by updating the explainer to refer to both ShadowRealms and Confidentiality (focusing on side channeling attacks such as "Meltdown and Spectre").

Hope this clarifies things, would love to provide more input however needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concerns: security This proposal may cause security risk if implemented venue: WICG Proposal is incubated in the Web Incubator Community Group
Projects
None yet
Development

No branches or pull requests

3 participants
@annevk @weizman and others