Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do we really need "oauth_nonce"?

Tags:

oauth

Right, I know how oauth works, but I don't know why we need oauth_nonce.

The specification says timestamp / nonce has to be unique to solve replay attacks, but what about if consumer_key is unique enough?

If consumer_key is not unique, how does it find corresponding oauth_nonce?

like image 836
user2234995 Avatar asked Apr 15 '14 15:04

user2234995


People also ask

What is Oauth_signature?

oauth_signature. The signature base string: a consistent, reproducible concatenation of several of the HTTP request elements into a single string. The string is used as an input to the signature method.

What is a request nonce?

The purpose of a nonce is to make each request unique so that an attacker can't replay a request in a different context. It doesn't matter if the attacker gets the nonce: in fact the point is that because the data includes a nonce, it won't be useful to the attacker.

What is nonce in oauth2?

Nonce. This is a random, unique string value to associate a user-session with an ID Token and to mitigate replay attacks.


1 Answers

Keys are unique but don't change often. A nonce on the other hand needs to be unique per request.

Consider the following scenario. Prerequisites are: An attacker can spy on your communication but does not know any secrets. If there is no nonce, he can do a replay attack: He can simply duplicate and resend any of your previous requests, because he knows the requests you already send are valid.

A nonce prevents this, as the server checks all recently used nonces (there is a time limit) and does not accept any nonce twice.

like image 55
kapex Avatar answered Oct 18 '22 14:10

kapex