Reputation: 8337
I found this in another SO thread:
Steps:
How are step 6-8 secured? The way I see it, the client is authenticating with the provider and reporting back the result to our server.
What is stopping the client from faking the authentication result?
Upvotes: 1
Views: 95
Reputation: 4715
Primarily, the authentication result is cryptographically signed by the provider. There are also other security measures protecting against other attacks.
Quoting the OpenID 2.0 specification, section 11.:
When the Relying Party receives a positive assertion, it MUST verify the following before accepting the assertion:
- The value of "openid.return_to" matches the URL of the current request (Section 11.1)
- Discovered information matches the information in the assertion (Section 11.2)
- An assertion has not yet been accepted from this OP with the same value for "openid.response_nonce" (Section 11.3)
- The signature on the assertion is valid and all fields that are required to be signed are signed (Section 11.4)
The client can, of course, send a fake authentication result, but it won't pass verification.
Upvotes: 2