You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How could a credentialless iframe use BroadcastChannel? #15
Iframe credentialless does not mention specifically BroadcastChannel, but the behavior is the consequence of partitioning all the storage APIs . The added nonce makes them scoped by the current top-level document. So at most, they can only speak with other same-origin iframe credentialless inside the same frame tree.
The main goal with the design of iframe credentialless is to ease adoption of COOP/COEP, so we wanted every APIs to continue to work and not throw errors. We wanted to avoid breaking framed document. So the BroadcastChannel is quite useless, but still "usable".
Wait, I thought the nonce was per document? I guess that changed?
The nonce is indeed per document. Nothing changed.
It doesn't seem like it should be able to obtain any data really.
The API won't throw errors, but the iframe credentialless will be very lonely. It can only talk to itself, or with a second iframe credentialless inside the same top-level document.
The credentialless iframe could use side-channels (e.g. broadcast channels, postMessage) to attempt to get a form of personalization despite the lack of credentials.
Activity
ArthurSonzogni commentedon Jun 22, 2023
Iframe credentialless does not mention specifically BroadcastChannel, but the behavior is the consequence of partitioning all the storage APIs . The added
noncemakes them scoped by the current top-level document. So at most, they can only speak with other same-origin iframe credentialless inside the same frame tree.The main goal with the design of iframe credentialless is to ease adoption of COOP/COEP, so we wanted every APIs to continue to work and not throw errors. We wanted to avoid breaking framed document. So the BroadcastChannel is quite useless, but still "usable".
annevk commentedon Jun 22, 2023
Wait, I thought the
noncewas per document? I guess that changed?annevk commentedon Jun 22, 2023
What was misleading to me was
It doesn't seem like it should be able to obtain any data really.
ArthurSonzogni commentedon Jun 22, 2023
The nonce is indeed per document. Nothing changed.
The API won't throw errors, but the iframe credentialless will be very lonely. It can only talk to itself, or with a second iframe credentialless inside the same top-level document.
annevk commentedon Jun 22, 2023
How could it talk with a second iframe?
Wouldn't they have different nonces?Edit: I see, the nonce value is per top-level document.annevk commentedon Jun 22, 2023
I was wrong above, what I found misleading was:
How would this work with
BroadcastChannel?