Internet Engineering Task Force (IETF) T. Lodderstedt, Ed. Request for Comments: 7009 Deutsche Telekom AG Category: Standards Track S. Dronia ISSN: 2070-1721 M. Scurtescu Google August 2013
Internet Engineering Task Force (IETF) T. Lodderstedt, Ed. Request for Comments: 7009 Deutsche Telekom AG Category: Standards Track S. Dronia ISSN: 2070-1721 M. Scurtescu Google August 2013
OAuth 2.0 Token Revocation
OAuth 2.0令牌撤销
Abstract
摘要
This document proposes an additional endpoint for OAuth authorization servers, which allows clients to notify the authorization server that a previously obtained refresh or access token is no longer needed. This allows the authorization server to clean up security credentials. A revocation request will invalidate the actual token and, if applicable, other tokens based on the same authorization grant.
本文档为OAuth授权服务器提供了一个额外的端点,它允许客户端通知授权服务器不再需要以前获得的刷新或访问令牌。这允许授权服务器清理安全凭据。撤销请求将使实际令牌以及基于相同授权授予的其他令牌(如果适用)失效。
Status of This Memo
关于下段备忘
This is an Internet Standards Track document.
这是一份互联网标准跟踪文件。
This document is a product of the Internet Engineering Task Force (IETF). It represents the consensus of the IETF community. It has received public review and has been approved for publication by the Internet Engineering Steering Group (IESG). Further information on Internet Standards is available in Section 2 of RFC 5741.
本文件是互联网工程任务组(IETF)的产品。它代表了IETF社区的共识。它已经接受了公众审查,并已被互联网工程指导小组(IESG)批准出版。有关互联网标准的更多信息,请参见RFC 5741第2节。
Information about the current status of this document, any errata, and how to provide feedback on it may be obtained at http://www.rfc-editor.org/info/rfc7009.
有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7009.
Copyright Notice
版权公告
Copyright (c) 2013 IETF Trust and the persons identified as the document authors. All rights reserved.
版权所有(c)2013 IETF信托基金和确定为文件作者的人员。版权所有。
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (http://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
本文件受BCP 78和IETF信托有关IETF文件的法律规定的约束(http://trustee.ietf.org/license-info)自本文件出版之日起生效。请仔细阅读这些文件,因为它们描述了您对本文件的权利和限制。从本文件中提取的代码组件必须包括信托法律条款第4.e节中所述的简化BSD许可证文本,并提供简化BSD许可证中所述的无担保。
Table of Contents
目录
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Revocation Request . . . . . . . . . . . . . . . . . . . 4 2.2. Revocation Response . . . . . . . . . . . . . . . . . . . 5 2.2.1. Error Response . . . . . . . . . . . . . . . . . . . 6 2.3. Cross-Origin Support . . . . . . . . . . . . . . . . . . 6 3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 7 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 4.1. OAuth Extensions Error Registration . . . . . . . . . . . 8 4.1.1. The "unsupported_token_type" Error Value . . . . . . 8 4.1.2. OAuth Token Type Hints Registry . . . . . . . . . . . 8 4.1.2.1. Registration Template . . . . . . . . . . . . . . 9 4.1.2.2. Initial Registry Contents . . . . . . . . . . . . 9 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1. Normative References . . . . . . . . . . . . . . . . . . 10 7.2. Informative References . . . . . . . . . . . . . . . . . 11
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 3 2. Token Revocation . . . . . . . . . . . . . . . . . . . . . . 3 2.1. Revocation Request . . . . . . . . . . . . . . . . . . . 4 2.2. Revocation Response . . . . . . . . . . . . . . . . . . . 5 2.2.1. Error Response . . . . . . . . . . . . . . . . . . . 6 2.3. Cross-Origin Support . . . . . . . . . . . . . . . . . . 6 3. Implementation Note . . . . . . . . . . . . . . . . . . . . . 7 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 8 4.1. OAuth Extensions Error Registration . . . . . . . . . . . 8 4.1.1. The "unsupported_token_type" Error Value . . . . . . 8 4.1.2. OAuth Token Type Hints Registry . . . . . . . . . . . 8 4.1.2.1. Registration Template . . . . . . . . . . . . . . 9 4.1.2.2. Initial Registry Contents . . . . . . . . . . . . 9 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 10 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1. Normative References . . . . . . . . . . . . . . . . . . 10 7.2. Informative References . . . . . . . . . . . . . . . . . 11
The OAuth 2.0 core specification [RFC6749] defines several ways for a client to obtain refresh and access tokens. This specification supplements the core specification with a mechanism to revoke both types of tokens. A token is a string representing an authorization grant issued by the resource owner to the client. A revocation request will invalidate the actual token and, if applicable, other tokens based on the same authorization grant and the authorization grant itself.
OAuth 2.0核心规范[RFC6749]定义了客户端获取刷新和访问令牌的几种方法。该规范补充了核心规范,提供了一种机制来撤销这两种类型的令牌。令牌是一个字符串,表示资源所有者向客户端颁发的授权授予。撤销请求将使实际令牌以及基于相同授权授予和授权授予本身的其他令牌(如果适用)失效。
From an end-user's perspective, OAuth is often used to log into a certain site or application. This revocation mechanism allows a client to invalidate its tokens if the end-user logs out, changes identity, or uninstalls the respective application. Notifying the authorization server that the token is no longer needed allows the authorization server to clean up data associated with that token (e.g., session data) and the underlying authorization grant. This behavior prevents a situation in which there is still a valid authorization grant for a particular client of which the end-user is not aware. This way, token revocation prevents abuse of abandoned tokens and facilitates a better end-user experience since invalidated authorization grants will no longer turn up in a list of authorization grants the authorization server might present to the end-user.
从最终用户的角度来看,OAuth通常用于登录到某个站点或应用程序。如果最终用户注销、更改标识或卸载相应的应用程序,此吊销机制允许客户端使其令牌无效。通知授权服务器不再需要令牌,授权服务器可以清理与该令牌相关联的数据(例如,会话数据)和基础授权授予。此行为可防止最终用户不知道的特定客户端仍然存在有效授权授予的情况。这样,令牌撤销可防止滥用废弃令牌,并有助于更好的最终用户体验,因为无效的授权授予将不再出现在授权服务器可能提供给最终用户的授权授予列表中。
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].
本文件中的关键词“必须”、“不得”、“要求”、“应”、“不应”、“应”、“不应”、“建议”、“可”和“可选”应按照RFC 2119[RFC2119]中所述进行解释。
Implementations MUST support the revocation of refresh tokens and SHOULD support the revocation of access tokens (see Implementation Note).
实现必须支持撤销刷新令牌,并且应该支持撤销访问令牌(请参阅实现说明)。
The client requests the revocation of a particular token by making an HTTP POST request to the token revocation endpoint URL. This URL MUST conform to the rules given in [RFC6749], Section 3.1. Clients MUST verify that the URL is an HTTPS URL.
客户端通过向令牌吊销端点URL发出HTTP POST请求来请求吊销特定令牌。此URL必须符合[RFC6749]第3.1节中给出的规则。客户端必须验证URL是否为HTTPS URL。
The means to obtain the location of the revocation endpoint is out of the scope of this specification. For example, the client developer may consult the server's documentation or automatic discovery may be used. As this endpoint is handling security credentials, the endpoint location needs to be obtained from a trustworthy source.
获取撤销端点位置的方法不在本规范的范围内。例如,客户机开发人员可以查阅服务器的文档,也可以使用自动发现。由于此端点正在处理安全凭据,因此需要从可靠来源获取端点位置。
Since requests to the token revocation endpoint result in the transmission of plaintext credentials in the HTTP request, URLs for token revocation endpoints MUST be HTTPS URLs. The authorization server MUST use Transport Layer Security (TLS) [RFC5246] in a version compliant with [RFC6749], Section 1.6. Implementations MAY also support additional transport-layer security mechanisms that meet their security requirements.
由于对令牌撤销端点的请求导致HTTP请求中的明文凭证传输,因此令牌撤销端点的URL必须是HTTPS URL。授权服务器必须在符合[RFC6749]第1.6节的版本中使用传输层安全性(TLS)[RFC5246]。实现还可以支持满足其安全需求的其他传输层安全机制。
If the host of the token revocation endpoint can also be reached over HTTP, then the server SHOULD also offer a revocation service at the corresponding HTTP URI, but it MUST NOT publish this URI as a token revocation endpoint. This ensures that tokens accidentally sent over HTTP will be revoked.
如果也可以通过HTTP访问令牌吊销端点的主机,那么服务器还应该在相应的HTTP URI上提供吊销服务,但它不能将此URI发布为令牌吊销端点。这确保通过HTTP意外发送的令牌将被撤销。
The client constructs the request by including the following parameters using the "application/x-www-form-urlencoded" format in the HTTP request entity-body:
客户端通过在HTTP请求实体体中使用“application/x-www-form-urlencoded”格式包含以下参数来构造请求:
token REQUIRED. The token that the client wants to get revoked.
需要代币。客户端希望被吊销的令牌。
token_type_hint OPTIONAL. A hint about the type of the token submitted for revocation. Clients MAY pass this parameter in order to help the authorization server to optimize the token lookup. If the server is unable to locate the token using the given hint, it MUST extend its search across all of its supported token types. An authorization server MAY ignore this parameter, particularly if it is able to detect the token type automatically. This specification defines two such values:
令牌\类型\提示可选。关于提交撤销的令牌类型的提示。客户端可以传递此参数,以帮助授权服务器优化令牌查找。如果服务器无法使用给定提示定位令牌,则必须将其搜索扩展到所有受支持的令牌类型。授权服务器可能会忽略此参数,特别是当它能够自动检测令牌类型时。本规范定义了两个此类值:
* access_token: An access token as defined in [RFC6749], Section 1.4
* 访问令牌:在[RFC6749]第1.4节中定义的访问令牌
* refresh_token: A refresh token as defined in [RFC6749], Section 1.5
* 刷新令牌:在[RFC6749]第1.5节中定义的刷新令牌
Specific implementations, profiles, and extensions of this specification MAY define other values for this parameter using the registry defined in Section 4.1.2.
本规范的特定实现、配置文件和扩展可使用第4.1.2节中定义的注册表定义此参数的其他值。
The client also includes its authentication credentials as described in Section 2.3. of [RFC6749].
客户端还包括第2.3节所述的身份验证凭据。属于[RFC6749]。
For example, a client may request the revocation of a refresh token with the following request:
例如,客户端可以通过以下请求请求撤销刷新令牌:
POST /revoke HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
POST /revoke HTTP/1.1 Host: server.example.com Content-Type: application/x-www-form-urlencoded Authorization: Basic czZCaGRSa3F0MzpnWDFmQmF0M2JW
token=45ghiukldjahdnhzdauz&token_type_hint=refresh_token
令牌=45ghiukldjahdnhzdauz&令牌类型提示=刷新令牌
The authorization server first validates the client credentials (in case of a confidential client) and then verifies whether the token was issued to the client making the revocation request. If this validation fails, the request is refused and the client is informed of the error by the authorization server as described below.
授权服务器首先验证客户端凭据(如果是机密客户端),然后验证令牌是否已颁发给发出撤销请求的客户端。如果验证失败,请求将被拒绝,授权服务器将通知客户端错误,如下所述。
In the next step, the authorization server invalidates the token. The invalidation takes place immediately, and the token cannot be used again after the revocation. In practice, there could be a propagation delay, for example, in which some servers know about the invalidation while others do not. Implementations should minimize that window, and clients must not try to use the token after receipt of an HTTP 200 response from the server.
在下一步中,授权服务器将使令牌无效。失效立即发生,并且在撤销后不能再次使用令牌。实际上,可能存在传播延迟,例如,某些服务器知道失效,而其他服务器不知道。实现应该最小化该窗口,并且客户端在收到来自服务器的HTTP 200响应后不得尝试使用令牌。
Depending on the authorization server's revocation policy, the revocation of a particular token may cause the revocation of related tokens and the underlying authorization grant. If the particular token is a refresh token and the authorization server supports the revocation of access tokens, then the authorization server SHOULD also invalidate all access tokens based on the same authorization grant (see Implementation Note). If the token passed to the request is an access token, the server MAY revoke the respective refresh token as well.
根据授权服务器的吊销策略,特定令牌的吊销可能会导致相关令牌和基础授权授予的吊销。如果特定令牌是刷新令牌,并且授权服务器支持撤销访问令牌,则授权服务器还应基于相同的授权授予使所有访问令牌无效(请参见实施说明)。如果传递给请求的令牌是访问令牌,则服务器也可以撤销相应的刷新令牌。
Note: A client compliant with [RFC6749] must be prepared to handle unexpected token invalidation at any time. Independent of the revocation mechanism specified in this document, resource owners may revoke authorization grants, or the authorization server may invalidate tokens in order to mitigate security threats. Thus, having different server policies with respect to cascading the revocation of tokens should not pose interoperability problems.
注意:符合[RFC6749]的客户端必须随时准备处理意外的令牌失效。独立于本文档中指定的撤销机制,资源所有者可以撤销授权授予,或者授权服务器可以使令牌无效,以减轻安全威胁。因此,对于令牌的级联撤销,使用不同的服务器策略不应造成互操作性问题。
The authorization server responds with HTTP status code 200 if the token has been revoked successfully or if the client submitted an invalid token.
如果令牌已成功撤销或客户端提交了无效令牌,则授权服务器将使用HTTP状态代码200进行响应。
Note: invalid tokens do not cause an error response since the client cannot handle such an error in a reasonable way. Moreover, the purpose of the revocation request, invalidating the particular token, is already achieved.
注意:无效令牌不会导致错误响应,因为客户端无法以合理的方式处理此类错误。此外,撤销请求使特定令牌无效的目的已经实现。
The content of the response body is ignored by the client as all necessary information is conveyed in the response code.
响应主体的内容被客户机忽略,因为所有必要的信息都在响应代码中传递。
An invalid token type hint value is ignored by the authorization server and does not influence the revocation response.
授权服务器将忽略无效的令牌类型提示值,并且不会影响吊销响应。
The error presentation conforms to the definition in Section 5.2 of [RFC6749]. The following additional error code is defined for the token revocation endpoint:
错误表示符合[RFC6749]第5.2节中的定义。为令牌吊销终结点定义了以下附加错误代码:
unsupported_token_type: The authorization server does not support the revocation of the presented token type. That is, the client tried to revoke an access token on a server not supporting this feature.
不支持的\u令牌\u类型:授权服务器不支持撤销所提供的令牌类型。也就是说,客户端试图在不支持此功能的服务器上吊销访问令牌。
If the server responds with HTTP status code 503, the client must assume the token still exists and may retry after a reasonable delay. The server may include a "Retry-After" header in the response to indicate how long the service is expected to be unavailable to the requesting client.
如果服务器以HTTP状态代码503响应,则客户端必须假定令牌仍然存在,并且可以在合理延迟后重试。服务器可在响应中包括“重试后”报头,以指示服务预期对请求客户端不可用的时间。
The revocation endpoint MAY support Cross-Origin Resource Sharing (CORS) [W3C.WD-cors-20120403] if it is aimed at use in combination with user-agent-based applications.
如果撤销端点旨在与基于用户代理的应用程序结合使用,则它可能支持跨源资源共享(CORS)[W3C.WD-CORS-20120403]。
In addition, for interoperability with legacy user-agents, it MAY also offer JSONP (Remote JSON - JSONP) [jsonp] by allowing GET requests with an additional parameter:
此外,为了与遗留用户代理的互操作性,它还可以通过允许GET请求使用附加参数来提供JSONP(远程JSON-JSONP)[JSONP]:
callback OPTIONAL. The qualified name of a JavaScript function.
回调是可选的。JavaScript函数的限定名称。
For example, a client may request the revocation of an access token with the following request (line breaks are for display purposes only):
例如,客户端可以通过以下请求请求撤销访问令牌(换行符仅用于显示目的):
https://example.com/revoke?token=agabcdefddddafdd& callback=package.myCallback
https://example.com/revoke?token=agabcdefddddafdd& callback=package.myCallback
Successful response:
成功回应:
package.myCallback();
package.myCallback();
Error response:
错误响应:
package.myCallback({"error":"unsupported_token_type"});
package.myCallback({"error":"unsupported_token_type"});
Clients should be aware that when relying on JSONP, a malicious revocation endpoint may attempt to inject malicious code into the client.
客户机应该知道,当依赖JSONP时,恶意撤销端点可能会试图将恶意代码注入客户机。
OAuth 2.0 allows deployment flexibility with respect to the style of access tokens. The access tokens may be self-contained so that a resource server needs no further interaction with an authorization server issuing these tokens to perform an authorization decision of the client requesting access to a protected resource. A system design may, however, instead use access tokens that are handles referring to authorization data stored at the authorization server. This consequently requires a resource server to issue a request to the respective authorization server to retrieve the content of the access token every time a client presents an access token.
OAuth 2.0允许在访问令牌的样式方面具有部署灵活性。访问令牌可以是自包含的,以便资源服务器不需要与发出这些令牌的授权服务器进一步交互来执行请求访问受保护资源的客户端的授权决策。然而,系统设计可以使用访问令牌,访问令牌是指存储在授权服务器上的授权数据的句柄。因此,每当客户端呈现访问令牌时,这就需要资源服务器向相应的授权服务器发出请求,以检索访问令牌的内容。
While these are not the only options, they illustrate the implications for revocation. In the latter case, the authorization server is able to revoke an access token previously issued to a client when the resource server relays a received access token. In the former case, some (currently non-standardized) backend interaction between the authorization server and the resource server may be used when immediate access token revocation is desired. Another design alternative is to issue short-lived access tokens, which can be refreshed at any time using the corresponding refresh tokens. This allows the authorization server to impose a limit on the time revoked when access tokens are in use.
虽然这些不是唯一的选择,但它们说明了撤销的含义。在后一种情况下,当资源服务器中继接收到的访问令牌时,授权服务器能够撤销先前发给客户端的访问令牌。在前一种情况下,当需要立即撤销访问令牌时,可以使用授权服务器和资源服务器之间的一些(当前非标准化的)后端交互。另一种设计方案是发行短期访问令牌,可以随时使用相应的刷新令牌刷新。这允许授权服务器在使用访问令牌时对撤销的时间施加限制。
Which approach of token revocation is chosen will depend on the overall system design and on the application service provider's risk analysis. The cost of revocation in terms of required state and communication overhead is ultimately the result of the desired security properties.
选择哪种令牌撤销方法将取决于整个系统设计和应用程序服务提供商的风险分析。从所需状态和通信开销的角度来看,撤销的成本最终是所需安全属性的结果。
This specification registers an error value in the "OAuth Extensions Error Registry" and establishes the "OAuth Token Type Hints" registry.
本规范在“OAuth扩展错误注册表”中注册一个错误值,并建立“OAuth令牌类型提示”注册表。
This specification registers the following error value in the "OAuth Extensions Error Registry" defined in [RFC6749].
本规范在[RFC6749]中定义的“OAuth扩展错误注册表”中注册以下错误值。
Error name: unsupported_token_type
错误名称:不支持的\u令牌\u类型
Error Usage Location: Revocation endpoint error response
错误使用位置:吊销终结点错误响应
Related Protocol Extension: Token Revocation Endpoint
相关协议扩展:令牌吊销端点
Change controller: IETF
更改控制器:IETF
Specification document(s): [RFC7009]
规范文件:[RFC7009]
This specification establishes the "OAuth Token Type Hints" registry. Possible values of the parameter "token_type_hint" (see Section 2.1) are registered with a Specification Required ([RFC5226]) after a two-week review period on the oauth-ext-review@ietf.org mailing list, on the advice of one or more Designated Experts. However, to allow for the allocation of values prior to publication, the Designated Expert(s) may approve registration once they are satisfied that such a specification will be published. Registration requests must be sent to the oauth-ext-review@ietf.org mailing list for review and comment, with an appropriate subject (e.g., "Request for parameter: example"). Within the review period, the Designated Expert(s) will either approve or deny the registration request, communicating this decision to the review list and IANA. Denials should include an explanation and, if applicable, suggestions as to how to make the request successful. IANA must only accept registry updates from the Designated Expert(s) and should direct all requests for registration to the review mailing list.
本规范建立“OAuth令牌类型提示”注册表。参数“token_type_hint”(参见第2.1节)的可能值在oauth ext上经过两周的审查后,按照所需规范([RFC5226])注册-review@ietf.org根据一名或多名指定专家的建议,提供邮件列表。但是,为了允许在发布前分配值,指定专家可在确信此类规范将发布后批准注册。注册请求必须发送到oauth ext-review@ietf.org用于审查和评论的邮件列表,带有适当的主题(例如,“参数请求:示例”)。在审查期内,指定专家将批准或拒绝注册请求,并将该决定告知审查名单和IANA。拒绝应包括解释,以及(如适用)关于如何使请求成功的建议。IANA必须只接受指定专家的注册更新,并将所有注册请求发送至审查邮件列表。
Hint Value: The additional value, which can be used to indicate a certain token type to the authorization server.
提示值:附加值,可用于向授权服务器指示特定令牌类型。
Change controller: For Standards Track RFCs, state "IETF". For others, give the name of the responsible party. Other details (e.g., postal address, email address, and home page URI) may also be included.
更改控制器:对于标准跟踪RFC,请注明“IETF”。对于其他人,请提供责任方的名称。还可以包括其他详细信息(例如,邮政地址、电子邮件地址和主页URI)。
Specification document(s): Reference to the document(s) that specifies the type, preferably including a URI that can be used to retrieve a copy of the document(s). An indication of the relevant sections may also be included but is not required.
规范文档:对指定类型的文档的引用,最好包括可用于检索文档副本的URI。也可以包括相关章节的指示,但不需要。
The OAuth Token Type Hint registry's initial contents are as follows.
OAuth令牌类型提示注册表的初始内容如下所示。
+---------------+-------------------+-----------+ | Hint Value | Change Controller | Reference | +---------------+-------------------+-----------+ | access_token | IETF | [RFC7009] | | refresh_token | IETF | [RFC7009] | +---------------+-------------------+-----------+
+---------------+-------------------+-----------+ | Hint Value | Change Controller | Reference | +---------------+-------------------+-----------+ | access_token | IETF | [RFC7009] | | refresh_token | IETF | [RFC7009] | +---------------+-------------------+-----------+
Table 1: OAuth Token Type Hints initial registry contents
表1:OAuth令牌类型提示初始注册表内容
If the authorization server does not support access token revocation, access tokens will not be immediately invalidated when the corresponding refresh token is revoked. Deployments must take this into account when conducting their security risk analysis.
如果授权服务器不支持访问令牌吊销,则当相应的刷新令牌被吊销时,访问令牌不会立即失效。部署在进行安全风险分析时必须考虑到这一点。
Cleaning up tokens using revocation contributes to overall security and privacy since it reduces the likelihood for abuse of abandoned tokens. This specification in general does not intend to provide countermeasures against token theft and abuse. For a discussion of respective threats and countermeasures, consult the security considerations given in Section 10 of the OAuth core specification [RFC6749] and the OAuth threat model document [RFC6819].
使用撤销清理令牌有助于提高整体安全性和隐私性,因为它降低了滥用废弃令牌的可能性。本规范一般不打算提供防止令牌盗窃和滥用的对策。有关各个威胁和对策的讨论,请参考OAuth核心规范[RFC6749]第10节和OAuth威胁模型文档[RFC6819]中给出的安全注意事项。
Malicious clients could attempt to use the new endpoint to launch denial-of-service attacks on the authorization server. Appropriate countermeasures, which should be in place for the token endpoint as well, MUST be applied to the revocation endpoint (see [RFC6819], Section 4.4.1.11). Specifically, invalid token type hints may
恶意客户端可能试图使用新端点在授权服务器上发起拒绝服务攻击。必须对撤销端点应用适当的对策,该对策也应适用于令牌端点(见[RFC6819],第4.4.1.11节)。具体来说,可能会出现无效的令牌类型提示
misguide the authorization server and cause additional database lookups. Care MUST be taken to prevent malicious clients from exploiting this feature to launch denial-of-service attacks.
误导授权服务器并导致额外的数据库查找。必须小心防止恶意客户端利用此功能发起拒绝服务攻击。
A malicious client may attempt to guess valid tokens on this endpoint by making revocation requests against potential token strings. According to this specification, a client's request must contain a valid client_id, in the case of a public client, or valid client credentials, in the case of a confidential client. The token being revoked must also belong to the requesting client. If an attacker is able to successfully guess a public client's client_id and one of their tokens, or a private client's credentials and one of their tokens, they could do much worse damage by using the token elsewhere than by revoking it. If they chose to revoke the token, the legitimate client will lose its authorization grant and will need to prompt the user again. No further damage is done and the guessed token is now worthless.
恶意客户端可能会试图通过针对潜在的令牌字符串发出撤销请求来猜测此端点上的有效令牌。根据本规范,对于公共客户端,客户端请求必须包含有效的客户端id;对于机密客户端,客户端请求必须包含有效的客户端凭据。被撤销的令牌也必须属于请求客户端。如果攻击者能够成功猜出公共客户端的客户端id和其中一个令牌,或者私人客户端的凭据和其中一个令牌,那么他们在别处使用令牌可能造成比撤销令牌更严重的破坏。如果他们选择撤销令牌,合法客户端将失去其授权授权,并需要再次提示用户。没有造成进一步的伤害,猜测的令牌现在一文不值。
Since the revocation endpoint is handling security credentials, clients need to obtain its location from a trustworthy source only. Otherwise, an attacker could capture valid security tokens by utilizing a counterfeit revocation endpoint. Moreover, in order to detect counterfeit revocation endpoints, clients MUST authenticate the revocation endpoint (certificate validation, etc.).
由于吊销端点正在处理安全凭据,因此客户端只需要从可靠来源获取其位置。否则,攻击者可以利用伪造的吊销端点捕获有效的安全令牌。此外,为了检测伪造的吊销端点,客户端必须对吊销端点进行身份验证(证书验证等)。
We would like to thank Peter Mauritius, Amanda Anganes, Mark Wubben, Hannes Tschofenig, Michiel de Jong, Doug Foiles, Paul Madsen, George Fletcher, Sebastian Ebling, Christian Stuebner, Brian Campbell, Igor Faynberg, Lukas Rosenstock, and Justin Richer for their valuable feedback.
我们要感谢彼得·毛里求斯、阿曼达·安加内斯、马克·伍本、汉内斯·茨霍芬尼、米切尔·德容、道格·福利斯、保罗·马德森、乔治·弗莱彻、塞巴斯蒂安·艾布林、克里斯蒂安·斯图布纳、布赖恩·坎贝尔、伊戈尔·费伯格、卢卡斯·罗森斯托克和贾斯汀·里希,感谢他们的宝贵反馈。
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。
[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, May 2008.
[RFC5226]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 5226,2008年5月。
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5246]Dierks,T.和E.Rescorla,“传输层安全(TLS)协议版本1.2”,RFC 5246,2008年8月。
[RFC6749] Hardt, D., "The OAuth 2.0 Authorization Framework", RFC 6749, October 2012.
[RFC6749]Hardt,D.,“OAuth 2.0授权框架”,RFC 6749,2012年10月。
[RFC6819] Lodderstedt, T., McGloin, M., and P. Hunt, "OAuth 2.0 Threat Model and Security Considerations", RFC 6819, January 2013.
[RFC6819]Lodderstdt,T.,McGloin,M.,和P.Hunt,“OAuth 2.0威胁模型和安全注意事项”,RFC 6819,2013年1月。
[W3C.WD-cors-20120403] Kesteren, A., "Cross-Origin Resource Sharing", World Wide Web Consortium LastCall WD-cors-20120403, April 2012, <http://www.w3.org/TR/2012/WD-cors-20120403>.
[W3C.WD-cors-20120403]Kesteren,A.,“跨来源资源共享”,万维网联盟最后一次呼叫WD-cors-20120403,2012年4月<http://www.w3.org/TR/2012/WD-cors-20120403>.
[jsonp] Ippolito, B., "Remote JSON - JSONP", December 2005, <http://bob.pythonmac.org/archives/2005/12/05/ remote-json-jsonp>.
[jsonp]Ippolito,B.,“远程JSON-jsonp”,2005年12月<http://bob.pythonmac.org/archives/2005/12/05/ 远程json jsonp>。
Authors' Addresses
作者地址
Torsten Lodderstedt (editor) Deutsche Telekom AG
Torsten Lodderstedt(编辑)德国电信公司
EMail: torsten@lodderstedt.net
EMail: torsten@lodderstedt.net
Stefanie Dronia
斯蒂芬妮·德罗尼亚
EMail: sdronia@gmx.de
EMail: sdronia@gmx.de
Marius Scurtescu Google
马吕斯·斯库特斯库·谷歌
EMail: mscurtescu@google.com
EMail: mscurtescu@google.com