Open jonathanKingston opened 7 years ago
Hmm. I was really hoping to avoid modifying the definition of origins, but it might be inevitable.
We could follow the suborigins model; however, my concern is that origin serialization is not really extensible (https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin). Suborigins serialize into the host component of an origin, with a suffix on the scheme to indicate that a suborigin is present. It's not easy to extend that to an isolated origin... plus, isolation is even more complicated because we'd have to encode a whole other origin in the serialization. (That is, if https://embedded.com is embedded in https://isolated.com, the serialized origin for embedded.com has to somehow encode the fact that it is embedded in the isolated origin https://isolated.com.)
cc @mikewest @tanvihacks
On second thought, maybe we don't really need to encode isolation info into an origin serialization. My vague understanding is that suborigins needed to serialize in order for postMessage
to work. But in this case we don't really need isolation info in postMessage
origins because nothing inside an isolated origin should be able to postMessage
outside and vice versa.
Maybe @metromoxie or @devd can elaborate a little more on suborigin serialization. If postMessage
didn't exist, would suborigins need to have a special serialization?
For CORS too, right? Unless we want to make the origin header null in that case and use a new suborigin header.
Ah, right, CORS!
I think an isolated origin serialization isn't necessary for CORS; a server doesn't need to distinguish requests coming from an isolated context because the cookies will already be separated.
Well, a server might use origin for auth and ignore cookies.
Eh? Can you explain that more?
[chatted offline but we are still figuring out if this applies to isolate me]
The current draft mentions isolating local/session storage and also cookies. Will these be added?
Points to consider: