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

How could a credentialless iframe use BroadcastChannel? #15

Open
annevk opened this issue Jun 19, 2023 · 6 comments
Open

How could a credentialless iframe use BroadcastChannel? #15

annevk opened this issue Jun 19, 2023 · 6 comments

Comments

@annevk
Copy link

annevk commented Jun 19, 2023

Wouldn't that only allow talking to itself? Or it would construct an instance in its parent or something like that?

@ArthurSonzogni
Copy link
Collaborator

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".

@annevk
Copy link
Author

annevk commented Jun 22, 2023

Wait, I thought the nonce was per document? I guess that changed?

@annevk
Copy link
Author

annevk commented Jun 22, 2023

What was misleading to me was

It can also access data from storage APIs: [WebStorage], [IndexedDB], [web-sql], BroadcastChannel, SharedWorker, ServiceWorker, etc

It doesn't seem like it should be able to obtain any data really.

@ArthurSonzogni
Copy link
Collaborator

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.

@annevk
Copy link
Author

annevk commented 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
Copy link
Author

annevk commented Jun 22, 2023

I was wrong above, what I found misleading was:

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.

How would this work with BroadcastChannel?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants