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

Origin isolation #464

Closed
1 task done
domenic opened this issue Jan 14, 2020 · 12 comments
Closed
1 task done

Origin isolation #464

domenic opened this issue Jan 14, 2020 · 12 comments
Assignees
Labels
Progress: review complete Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group

Comments

@domenic
Copy link
Member

domenic commented Jan 14, 2020

Hello TAG!

I'm requesting a TAG review of origin isolation.

Origin isolation allows web developers to opt in to giving up certain cross-origin same-site access capabilities (namely synchronous scripting via document.domain, and postMessage()ing of WebAssembly.Module instances). This allows browsers to potentially segregate the origin into its own process. The developer can also provide hints to the browser as to why they are doing so, in the hopes of guiding the browser's process allocation.

Note that this opt in and the accompanying hints are delivered via origin policy (#127).

Further details:

We'd prefer the TAG provide feedback as (please delete all but the desired option):

🐛 open issues in our GitHub repo for each point of feedback

@domenic domenic added Progress: untriaged Review type: CG early review An early review of general direction from a Community Group labels Jan 14, 2020
@plinss plinss modified the milestones: 2020-02-03-week, 2020-02-03-week-ni, 2020-02-10-week Jan 15, 2020
@domenic
Copy link
Member Author

domenic commented Apr 9, 2020

Hi TAG! A friendly ping for any thoughts you have here.

I'll note that the concept has been simplified a couple of times, first moving from origin policy to a header-based design, and today dropping the hints in favor of a simple boolean. We're hoping to start an origin trial in Chrome within the next 6 weeks for this new, simpler version.

@atanassov
Copy link

Hi @domenic! We did start the review just didn't write replies quickly enough, sorry.

The overall use case, feature proposal and explainer look great we have only few comments/questions (@hober will follow up with more).

As you've been working on this solution, have you considered and/or tried to make the feature behind a functional API rather than UACH? In other words, express hinting author needs via something more explicit like a web workers API that controls what will be in a separate process? In general I feel like explicit APIs are better than hinting as they give web developers better predictability.

@domenic
Copy link
Member Author

domenic commented Apr 13, 2020

I'm a bit unsure what your last paragraph is asking. How does it interact with the non-goals section in https://github.com/WICG/origin-isolation#objectives ? And what is UACH?

@atanassov
Copy link

Oh well, it seems like my reply from 10 days ago was just sitting in my edit box here :( sorry for delay.

Further, for whatever reason when reading and writing the comment to you I was thinking about User Agent Client Hints and referred to your response header additions as UACH.

As to the non-goals section you pointed out, I'm assuming you're referring to the 2nd point about 'Give web developers visibility into process allocation.". I did see this and also the first goal where you state the isolation is guaranteed and also "consistent web-developer-observable behavior regardless of implementation choices". This all led me think about this feature as better exposed through an explicit API, similar to web worker. Was that something you considered and rejected?

Again, sorry for the delay. Let's try and push this to completion soon.

@annevk
Copy link
Member

annevk commented Apr 28, 2020

By API do you mean something you call from JavaScript? How would that work?

@domenic
Copy link
Member Author

domenic commented Apr 28, 2020

This all led me think about this feature as better exposed through an explicit API, similar to web worker. Was that something you considered and rejected?

I too am confused by what feature you're referring to. The consistent web-developer behavior that origin isolation gives is allowing developers to opt in to the removal of some edge-case functionality (document.domain and sending WebAssembly.Modules to cross-origin same-site destinations). Are you using "this feature" to refer to those removals? What would an explicit API for those removals look like?

@dbaron
Copy link
Member

dbaron commented May 28, 2020

So one thing that I found difficult reading the explainer is that it makes a number of references to documents that are cross-origin and same-site. After reading the definitions of these concepts I think this is something that can result from use of document.domain, although I'm not particularly confident given that I didn't find a formal definition of "cross origin" (I found "same origin" and "same origin-domain"). Given the frequent references to documents that are cross-origin and same-site, it might be good if the explainer gave a brief summary of what that means so that it doesn't require digging through the definitions to understand it.

@annevk
Copy link
Member

annevk commented May 29, 2020

We should maybe define cross-origin as meaning "not same origin" and cross-site as meaning not https://html.spec.whatwg.org/#same-site as they are often used in less formal settings. But yeah, the minimal process boundary for browsers is a site, not an origin, due to document.domain. And origin isolation as well as COOP+COEP try to change that largely by disabling document.domain but also by shrinking the agent cluster boundary.

@domenic
Copy link
Member Author

domenic commented May 29, 2020

A simple example of two pages that are cross-origin but same-site are https://www.example.com and https://example.com. (no document.domain involved.) I'll add this to the explainer.

@plinss plinss added the Progress: propose closing we think it should be closed but are waiting on some feedback or consensus label Jun 22, 2020
@atanassov atanassov added Progress: review complete Resolution: satisfied The TAG is satisfied with this design and removed Progress: propose closing we think it should be closed but are waiting on some feedback or consensus labels Jul 1, 2020
@atanassov
Copy link

atanassov commented Jul 1, 2020

We reviewed this proposal one more time during our June 29 breakout. At this point we are happy to see it continue to evolve with the HTML community.

@dbaron issue about clarifying the concepts of cross-origin and same-site seems well handled.

@atanassov (my) issue about exposing the functionality behind an API such as document.domain has been self-answered after re-reading the explainer and your additional comments, thus, I consider it non-issue at this point.

Given all issues have been address to our satisfaction, closing the review.

@domenic
Copy link
Member Author

domenic commented Dec 11, 2020

FYI, we are planning to rename the feature to "origin-keyed agent clusters" (the header would be Origin-Agent-Cluster), as we encountered folks who thought that "isolation" meant security guarantees. See more details in whatwg/html#6192.

@kenchris
Copy link

I support that rename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Progress: review complete Resolution: satisfied The TAG is satisfied with this design Review type: CG early review An early review of general direction from a Community Group
Projects
None yet
Development

No branches or pull requests

8 participants