-
Notifications
You must be signed in to change notification settings - Fork 9
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
Do we need a permissions policy for third-party frames? #78
Comments
There is some level of precedent for this from WebAuthn:
This is also another reason to consider a clientData equivalent to include things like cross-origin boolean and origin value vs topOrigin value (ref: w3c/webauthn#1891). (Other uses include TLS context, request type, |
Oh definitely our intent was not to have it available by default (we discussed that somewhere, thanks for catching it wasn't in the spec yet). I personally always assumed that we'd need the permission policy for it, but I'm guessing it's not urgent so I'd be happy to wait until we have a legitimate case that needs it before proposing spec'ing it (where I assume we will have a utility vs. privacy risk debate). |
Agree... at the same time, we need to explicitly forbid access to Noting (and not that it matter too much) that CredMan doesn't have a permission policy, but talks about potential issues with allowing this in iframes: So, we might not ever allow it either. |
I have a real use case for this! While working through an integration, I got the exception:
My use case is something like:
To me, the suggestion in #78 (comment) makes sense, as the toplevel frame would know which child iframe to trust to make a credential request. I dont see this use case as much different than a website using an JS file to accept payments (like |
Thanks Ryan, and agreed! Using an iframe like this is IMHO a strict security improvement over putting it all in the main frame. Of course you could use a simple RPC script in the main frame which communicates via postMessage to the subframe to implement this yourself without a permission policy, but that's silly and adds to the attack surface area. So I think we should just do the permission policy to prevent people from either building such RPC systems or hoisting all the code to the main frame. |
To be consistent with other permission policy names like |
Discussed in the meeting today we should also convey both the top and sub-frame origin in client-data (#95) |
Ok, we need to have the spec pass along the iframe's origin or something... we need to look at what Web Authn does? |
I still think we should try to be consistent with WebAuthn and FedCM, but just for transparency, I just realized that WebOTP picked - unfortunately - a slight variation: |
The digital identity draft - https://wicg.github.io/digital-identities/ - does not specify whether the digital identity API should be callable from an <iframe>
Should there be a digital-identity-specific permission policy - <iframe allow=""> which enables a toplevel frame to grant an <iframe> the ability to make a digital identity request?
The text was updated successfully, but these errors were encountered: