oauth-2.0 - OAuth 2 是否使用随机数?

标签 oauth-2.0

我在 2.0 规范中的任何地方都没有看到它,OAuth 2 没有使用 nonce,如果没有,现在它是否可以防止重放攻击?
1.0 spec状态:

3.3. Nonce and Timestamp

The timestamp value MUST be a positive integer. Unless otherwise specified by the server's documentation, the timestamp is expressed in the number of seconds since January 1, 1970 00:00:00 GMT.

A nonce is a random string, uniquely generated by the client to allow the server to verify that a request has never been made before and helps prevent replay attacks when requests are made over a non-secure channel. The nonce value MUST be unique across all requests with the same timestamp, client credentials, and token combinations.

To avoid the need to retain an infinite number of nonce values for future checks, servers MAY choose to restrict the time period after which a request with an old timestamp is rejected. Note that this restriction implies a level of synchronization between the client's and server's clocks. Servers applying such a restriction MAY provide a way for the client to sync with the server's clock; alternatively, both systems could synchronize with a trusted time service. Details of clock synchronization strategies are beyond the scope of this specification.

最佳答案

这是在单独的规范中捕获的。见 OAuth 2.0 Threat Model and Security Considerations有关详细信息/答案:)

关于oauth-2.0 - OAuth 2 是否使用随机数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11837323/

相关文章:

facebook - 使用 Facebook/Google/etc 注册与使用 Facebook/Google/etc 登录之间的区别

node.js - 通过 OAuth2 从 Node.js 向 BigQuery REST API 进行身份验证

java - 使用OAuth Google客户端程序时出现redirect_uri_mismatch错误

asp.net core OAuth access_token 验证失败,错误为 "IDX10609: Decryption failed. No Keys tried: token: ' System.String'。 :"

oauth - token 返回后,Google 和帐户关联失败的操作

spring-boot - 使用 'spring-boot-starter-oauth2-resource-server' 设置资源服务器时,JwtDecoder bean 不会自动注入(inject)

asp.net-mvc-4 - Identityserver3 - HybridFlow 不返回配置文件范围

python - 如何在 GAE/Python 上进行 'access_type=offline'/server-only OAuth2 操作?

php - OAuth2 : Error 401 Unauthorized at PHP request with access_token (Discord API)

python - Django 重定向到自定义 URL