Do we really need “oauth_nonce”?

守給你的承諾、 提交于 2019-12-22 03:55:22

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/23088594/do-we-really-need-oauth-nonce

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!