-
Notifications
You must be signed in to change notification settings - Fork 74
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
FedCM spec: IdP should validate nonce to prevent CSRF? #582
Comments
I'm thinking that this should be done as part of #536 in userland (e.g. an OAuth Profile layer), rather than in browserland in the FedCM spec per se. @timcappalli, wdyt? |
Agreed, if nonce was not already a top level parameter and removing it would be a breaking change it should be userland via https://github.com/fedidcg/FedCM/issues/556 - I guess it would be fair to just remove the note |
the comment in the sample code in the spec says this:
This assumes the client understands how to parse the token returned, which I thought was not an assumption the FedCM spec wanted to make. I would recommend removing the If there is anything FedCM needs to do at the FedCM API layer to mitigate this kind of injection/replay attacks, it should provide the other half of the validation story as well. |
@aaronpk's perspective on layering #582 (comment) makes a lot of sense. |
Yeah, |
In principle I agree with moving nonce to |
As changing API may be a bit tricky and needs more thinking through, could you at least remove the NOTE I mentioned as @achimschloss suggested? |
Yeah, that sounds reasonable. Care to send a PR? We'll get to this at some point, but if you could put together a PR, you may beat us to it. |
Co-authored-by: Kai Lehmann <[email protected]>
Should we close this issue now? |
SHA: 10794f7 Reason: push, by pull[bot] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Yeah, I think we can close this issue now that this PR has been merged:
The only suggestion left here unaddressed is this, and I kicked off a separate issue to track it independently of this one: |
Co-authored-by: Kai Lehmann <[email protected]>
Co-authored-by: Kai Lehmann <[email protected]>
In the current draft of the FedCM spec (https://fedidcg.github.io/FedCM/), section 3.5. Identity assertion endpoint contains the following:
NOTE: An [IDP](https://fedidcg.github.io/FedCM/#idp) should validate the nonce, if present, to prevent CSRF-style attacks.
There is some confusion amongst implementers, what should be validated here?
The nonce is optional and it is the RP's responsibility to define unique nonce values when initiating the FedCM call and compare the returned nonce with the provided one.
The text was updated successfully, but these errors were encountered: