Skip to content

Clarify situation around browsing contexts and realms in context isolation #1029

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

Merged
merged 2 commits into from
May 11, 2020

Conversation

Manishearth
Copy link
Contributor

@Manishearth Manishearth commented May 11, 2020

Fixes #497


Preview | Diff

@Manishearth Manishearth requested a review from toji May 11, 2020 21:39
@Manishearth
Copy link
Contributor Author

cc @asajeffrey

index.bs Outdated
@@ -2402,7 +2402,9 @@ Context Isolation {#contextisolation-security}

The trusted UI must be drawn by an independent rendering context whose state is isolated from any rendering contexts used by the page. (For example, any WebGL rendering contexts.) This is to prevent the page from corrupting the state of the trusted UI's context, which may prevent it from properly rendering a tracked environment. It also prevents the possibility of the page being able to capture imagery from the trusted UI, which could lead to private information being leaked.

Also, to prevent CORS-related vulnerabilities each page will see a new instance of objects returned by the API, such as {{XRSession}}. Attributes such as the [=XRWebGLLayer/context=] set by one page must not be able to be read by another. Similarly, methods invoked on the API MUST NOT cause an observable state change on other pages. For example: No method will be exposed that enables a system-level orientation reset, as this could be called repeatedly by a malicious page to prevent other pages from tracking properly. The user agent MUST, however, respect system-level orientation resets triggered by a user gesture or system menu.
Also, to prevent CORS-related vulnerabilities each [=browsing context=] will see a new instance of objects returned by the API, such as {{XRSession}}. Attributes such as the [=XRWebGLLayer/context=] set on an {{XRWebGLLayer}} with one [=relevant realm=] should not be able to be read through an {{XRWebGLLayer}} with a different [=relevant realm=]. Similarly, methods invoked on the API MUST NOT cause an observable state change on other [=browsing contexts=]. For example: No method will be exposed that enables a system-level orientation reset, as this could be called repeatedly by a malicious page to prevent other pages from tracking properly. The user agent MUST, however, respect system-level orientation resets triggered by a user gesture or system menu.

Choose a reason for hiding this comment

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

with a different [=relevant realm=] should be with a [=relevant realm=] that does not have the [=same origin=].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I feel like this doesn't matter much: I'd imagine if an iframe creates an XRWebGLLayer it's fine if it's completely fresh and it might actually lead to unexpected behavior if it isn't, but this seems really minor so might as well specify the necessary stuff.

Copy link
Member

@toji toji left a comment

Choose a reason for hiding this comment

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

LGTM with Alan's comment addressed.

Also, from #497:

I don't know, I'm not a spec editor 😄 @NellWaliczek might

I'll take "Comments that didn't age well for $100, Alex?"

@Manishearth Manishearth merged commit 5434a7c into immersive-web:master May 11, 2020
@Manishearth Manishearth deleted the clarify-realm branch May 11, 2020 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Which globals apply to security policy?
3 participants