Implement the Origin-Agent-Cluster header
Categories
(Core :: DOM: Navigation, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox138 | --- | fixed |
People
(Reporter: d, Assigned: nika)
References
(Depends on 1 open bug, Blocks 3 open bugs, Regressed 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(11 files, 2 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
-
Explainer: https://github.com/WICG/origin-isolation
-
Spec PR: https://github.com/whatwg/html/pull/5545 + https://github.com/whatwg/html/pull/6214
-
Tests: https://github.com/web-platform-tests/wpt/tree/master/origin-isolation (still being updated to the new name)
-
Spec entrypoint: https://html.spec.whatwg.org/multipage/origin.html#origin-isolation
Comment 1•5 years ago
|
||
This is worth prototyping per https://mozilla.github.io/standards-positions/#domenic-origin-isolation.
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Please see how this lack-of-support impacts functionality in related projects. It would be a shame if the only browser that is able to perform is Meta.
Comment 3•3 years ago
|
||
(In reply to steve from comment #2)
Please see how this lack-of-support impacts functionality in related projects. It would be a shame if the only browser that is able to perform is Meta.
IIUC this kind of implies that we would want to use this mainly for performance improvements, not only for enhanced security. In fact the spec says about consequences:
In terms of observable effects, this means that attempting to relax the same-origin restriction using document.domain will instead do nothing, and it will not be possible to send WebAssembly.Module objects to cross-origin Documents (even if they are same site).
And then:
Behind the scenes, this isolation can allow user agents to allocate implementation-specific resources corresponding to agent clusters, such as processes or threads, more efficiently.
So supporting this for the mandatory part might be relatively easy (to be fair, I ignore what it really takes), but having also the resource benefits might be harder. Would it be worth doing one without the other?
Comment 4•2 years ago
|
||
Moving this to DOM: Navigation, though this is really cross-module thing. But I think most of the changes would be around document channel and how it selects the right process etc.
Comment 5•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 6•4 months ago
|
||
This exposes the specific BrowsingContext which will finish the load to the
caller, which will be required to set up state on the new BrowsingContextGroup
after a navigation.
Assignee | ||
Comment 7•4 months ago
|
||
The UsesOriginAgentCluster method returns a Maybe<bool>, to allow for an
uncertain state in the future (when the origin-agent-cluster status can be
unknown until a network request is received).
Assignee | ||
Comment 8•4 months ago
|
||
This attribute currently just reflects the potentially-cross-origin-isolated
status of the BrowsingContextGroup.
Assignee | ||
Comment 9•4 months ago
|
||
This aligns with what is written in the spec, as setting document.domain
is
only a concept which is useful for http(s) principals.
Assignee | ||
Comment 10•4 months ago
|
||
This adds a helper method to nsIHttpChannelInternal for parsing the
Origin-Agent-Cluster header. This header is intended to be interpreted as a
boolean structured-field-value header.
Assignee | ||
Comment 11•4 months ago
|
||
This adds support for the Origin-Agent-Cluster header. A map from principals to
their cached origin-agent-cluster status is maintained in the
BrowsingContextGroup, and synchronized to child processes such that it can be
used to create DocGroups.
Note that this patch does not implement origin-keyed process isolation for
Fission. Fission process isolation still always uses the site-origin.
It's likely we'll want to implement additional hereustics and/or tracking to
decide when to perform origin-keyed process isolation to avoid potential
process count increases when the default is changed to origin-isolated.
Assignee | ||
Comment 12•4 months ago
|
||
It appears the about-blank.https.sub.html test incorrectly was resolving the
createBlankIframe
test with the load event object, rather than with the
created iframe, which led to an exception being thrown when accessing the
contentDocument
property.
This patch makes returning the iframe explicit, fixing that failure.
Assignee | ||
Comment 13•4 months ago
|
||
This patch stack has implemented the Origin-Agent-Clusters header, meaning that
these WPTs should now pass.
The only remaining exception is for regression-1399759.https.sub.html, which
depends on non-standard behaviour around navigating to about:srcdoc
which is
not supported in Gecko.
Assignee | ||
Comment 14•4 months ago
|
||
Previously this warning could only fire in a cross-origin-isolated
context, but after the changes in this patch stack, it can also happen
if the webpage opts in with Origin-Agent-Cluster: ?1.
This updates the wording of the warning to more accurately reflect the
new situations which cause it to fire.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Assignee | ||
Comment 15•4 months ago
|
||
It is possible for frontend JS to call this method on a browser element
with an http(s) principal. In this case, treat the new about:blank
document like it was created without a Origin-Agent-Cluster header, and
ensure the map is updated before the message to create the viewer is
sent into the content process.
Assignee | ||
Comment 16•4 months ago
|
||
This is used to replace the places where all documents are iterated using
DocGroup. In another part, DocGroups are changed to hold Window Globals rather
than Document objects, so an alternative mechanism is required to allow for all
documents to be iterated.
A linked list is used to minimize document creation overhead.
Assignee | ||
Comment 17•4 months ago
|
||
This more closely aligns with the spec definition of Similar-origin Window
Agents, which is the concept a DocGroup is intended to implement.
This is required to ensure that DocGroups are not created for a cross-origin
data document in a process which otherwise cannot load those documents. There
is no agent for those documents, they are not loaded with DocumentLoadListener,
and creating them was violating assertions in other parts of the stack.
This change also removes some unused methods from DocGroup, as there's
no reason to re-implement them for Windows if they'll never be used.
Updated•4 months ago
|
Updated•4 months ago
|
Assignee | ||
Comment 18•4 months ago
|
||
This is a minimal patch which changes how DocGroups are created to make
cross-origin data documents share a DocGroup with their embedder.
This is required to better align DocGroups with Similar-origin Window
Agents (which correlate with DocGroups), which is required for other
parts of this patch stack.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Comment 19•4 months ago
|
||
Comment 21•4 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/cfbcedde3e49
https://hg.mozilla.org/mozilla-central/rev/2fc56ea1e5a1
https://hg.mozilla.org/mozilla-central/rev/52f43d497d4d
https://hg.mozilla.org/mozilla-central/rev/258f5ad9ffe3
https://hg.mozilla.org/mozilla-central/rev/6c26de8c5e15
https://hg.mozilla.org/mozilla-central/rev/dafc01f02f5b
https://hg.mozilla.org/mozilla-central/rev/54e28a4cba57
https://hg.mozilla.org/mozilla-central/rev/5a4d6c2e0dec
https://hg.mozilla.org/mozilla-central/rev/81c6cd7f8b5b
https://hg.mozilla.org/mozilla-central/rev/154ed8651d58
https://hg.mozilla.org/mozilla-central/rev/2727c78f7920
https://hg.mozilla.org/mozilla-central/rev/6b116c5e4c24
Comment 23•4 months ago
|
||
This increase the installer size on windows by 4.6KB, which is below the alert threshold. Please consider this comment only a FYI.
Updated•3 months ago
|
Updated•3 months ago
|
Comment 24•3 months ago
|
||
FF138 MDN docs for this can be tracked in https://github.com/mdn/content/issues/38908. The documentation for the HTTP header and the window property are already pretty good, so this is just a compatibility data update and a release note.
Description
•