-
Notifications
You must be signed in to change notification settings - Fork 27
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
Per-frame or per-frames-that-can-access-each-other #14
Comments
Thanks for filing! Let's go with some example domain names since "party" is at play here. Are you envisioning something like: Or something like: ? |
A is example.com, B1 is test.invalid/1, B2 is test.invalid/2. (I.e., A and B are cross-site, Bs are same-origin.) |
Sorry for the delay. This is an interesting corner case. Looking back on earlier discussions, we've said that sibling iframes should not get storage access since they 1) don't know that a sibling of theirs is requesting access and 2) may have open connections or transactions with storage such as partitioned storage. I believe nested iframes are in the same situation. However, I did discuss with @englehardt and @ehsan about another idea, namely a way for iframes to opt in to shared storage access. That way they can be prepared for the sudden change and maybe also be required to not access partitioned storage (so as to not create situations where the browser would have to sever those connections). I'll open up a new issue where we can discuss that since it could potentially solve this for both sibling iframes and nested iframes. |
You're asserting that they don't know, but I'm not sure what you are basing that assertion on as they have direct access to each others state (and functions, etc.). And their storage is shared so any transaction would affect both frames. |
The call to requestStorageAccess() happens on tap/click in one iframe and asynchronously decides whether or not to grant storage access. I don’t know all the ways frames can communicate without consuming the gesture. Is that what you’re suggesting they do? Kind of “I just got a tap and will request storage access. Your access to cookies (and possibly other means of storage) may change at any moment from now.” That communication would have to be synchronous or else be racy, right? Similarly, the requesting iframe would have to tell all of its siblings and children that it was denied storage access so they can stop waiting. Maybe I’m missing some alternate way of handling this. |
They can directly access each other via script. In particular, when they are siblings, the first one can get to the second one by using |
I'm hoping the work to address #28 will clarify this. |
I'd like #3 to be clarified a bit. One thing I think is that if A embeds B1 that embeds B2, that B1 and B2 get their state flipped together as they can call each others functions. (In HTML terms the scope would be the window agent.)
Same if A embeds B1 and B2 (siblings).
The text was updated successfully, but these errors were encountered: