Internet Engineering Task Force (IETF)                          M. Jones
Request for Comments: 7800                                     Microsoft
Category: Standards Track                                     J. Bradley
ISSN: 2070-1721                                            Ping Identity
                                                           H. Tschofenig
                                                             ARM Limited
                                                              April 2016
        
Internet Engineering Task Force (IETF)                          M. Jones
Request for Comments: 7800                                     Microsoft
Category: Standards Track                                     J. Bradley
ISSN: 2070-1721                                            Ping Identity
                                                           H. Tschofenig
                                                             ARM Limited
                                                              April 2016
        

Proof-of-Possession Key Semantics for JSON Web Tokens (JWTs)

JSON Web令牌(JWT)的占有权证明密钥语义

Abstract

摘要

This specification describes how to declare in a JSON Web Token (JWT) that the presenter of the JWT possesses a particular proof-of-possession key and how the recipient can cryptographically confirm proof of possession of the key by the presenter. Being able to prove possession of a key is also sometimes described as the presenter being a holder-of-key.

本规范描述了如何在JSON Web令牌(JWT)中声明JWT的呈现者拥有特定的占有证明密钥,以及接收者如何以加密方式确认呈现者拥有该密钥的证明。能够证明拥有钥匙有时也被描述为出示者是钥匙持有人。

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/rfc7800.

有关本文件当前状态、任何勘误表以及如何提供反馈的信息,请访问http://www.rfc-editor.org/info/rfc7800.

Copyright Notice

版权公告

Copyright (c) 2016 IETF Trust and the persons identified as the document authors. All rights reserved.

版权所有(c)2016 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  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   5
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Representations for Proof-of-Possession Keys  . . . . . . . .   5
     3.1.  Confirmation Claim  . . . . . . . . . . . . . . . . . . .   6
     3.2.  Representation of an Asymmetric Proof-of-Possession Key .   7
     3.3.  Representation of an Encrypted Symmetric Proof-of-
           Possession Key  . . . . . . . . . . . . . . . . . . . . .   7
     3.4.  Representation of a Key ID for a Proof-of-Possession Key    8
     3.5.  Representation of a URL for a Proof-of-Possession Key . .   9
     3.6.  Specifics Intentionally Not Specified . . . . . . . . . .  10
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   5.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .  11
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  11
     6.1.  JSON Web Token Claims Registration  . . . . . . . . . . .  12
       6.1.1.  Registry Contents . . . . . . . . . . . . . . . . . .  12
     6.2.  JWT Confirmation Methods Registry . . . . . . . . . . . .  12
       6.2.1.  Registration Template . . . . . . . . . . . . . . . .  12
       6.2.2.  Initial Registry Contents . . . . . . . . . . . . . .  13
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  13
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  13
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  14
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  15
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  15
        
   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   5
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   5
   3.  Representations for Proof-of-Possession Keys  . . . . . . . .   5
     3.1.  Confirmation Claim  . . . . . . . . . . . . . . . . . . .   6
     3.2.  Representation of an Asymmetric Proof-of-Possession Key .   7
     3.3.  Representation of an Encrypted Symmetric Proof-of-
           Possession Key  . . . . . . . . . . . . . . . . . . . . .   7
     3.4.  Representation of a Key ID for a Proof-of-Possession Key    8
     3.5.  Representation of a URL for a Proof-of-Possession Key . .   9
     3.6.  Specifics Intentionally Not Specified . . . . . . . . . .  10
   4.  Security Considerations . . . . . . . . . . . . . . . . . . .  10
   5.  Privacy Considerations  . . . . . . . . . . . . . . . . . . .  11
   6.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .  11
     6.1.  JSON Web Token Claims Registration  . . . . . . . . . . .  12
       6.1.1.  Registry Contents . . . . . . . . . . . . . . . . . .  12
     6.2.  JWT Confirmation Methods Registry . . . . . . . . . . . .  12
       6.2.1.  Registration Template . . . . . . . . . . . . . . . .  12
       6.2.2.  Initial Registry Contents . . . . . . . . . . . . . .  13
   7.  References  . . . . . . . . . . . . . . . . . . . . . . . . .  13
     7.1.  Normative References  . . . . . . . . . . . . . . . . . .  13
     7.2.  Informative References  . . . . . . . . . . . . . . . . .  14
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  15
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  15
        
1. Introduction
1. 介绍

This specification describes how a JSON Web Token [JWT] can declare that the presenter of the JWT possesses a particular proof-of-possession (PoP) key and how the recipient can cryptographically confirm proof of possession of the key by the presenter. Proof of possession of a key is also sometimes described as the presenter being a holder-of-key. The [OAUTH-POP-ARCH] specification describes key confirmation, among other confirmation mechanisms. This specification defines how to communicate confirmation key information in JWTs.

本规范描述了JSON Web令牌[JWT]如何声明JWT的呈现者拥有特定的占有证明(PoP)密钥,以及接收者如何以加密方式确认呈现者拥有该密钥的证明。持有钥匙的证明有时也被描述为出示人持有钥匙。[OAUTH-POP-ARCH]规范描述了密钥确认以及其他确认机制。本规范定义了如何在JWTs中传递确认密钥信息。

Envision the following two use cases. The first use case employs a symmetric proof-of-possession key and the second use case employs an asymmetric proof-of-possession key.

设想以下两个用例。第一个用例采用对称占有证明密钥,第二个用例采用不对称占有证明密钥。

     +--------------+
     |              |                         +--------------+
     |              |--(3) Presentation of -->|              |
     |              |      JWT w/ Encrypted   |              |
     |  Presenter   |      PoP Key            |              |
     |              |                         |              |
     |              |<-(4) Communication ---->|              |
     |              |      Authenticated by   |              |
     +--------------+      PoP Key            |              |
       ^          ^                           |              |
       |          |                           |              |
      (1) Sym.   (2) JWT w/                   |  Recipient   |
       |  PoP     |  Encrypted                |              |
       |  Key     |  PoP Key                  |              |
       v          |                           |              |
     +--------------+                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |<-(0) Key Exchange for ->|              |
     |   Issuer     |      Key Encryption Key |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         +--------------+
     +--------------+
        
     +--------------+
     |              |                         +--------------+
     |              |--(3) Presentation of -->|              |
     |              |      JWT w/ Encrypted   |              |
     |  Presenter   |      PoP Key            |              |
     |              |                         |              |
     |              |<-(4) Communication ---->|              |
     |              |      Authenticated by   |              |
     +--------------+      PoP Key            |              |
       ^          ^                           |              |
       |          |                           |              |
      (1) Sym.   (2) JWT w/                   |  Recipient   |
       |  PoP     |  Encrypted                |              |
       |  Key     |  PoP Key                  |              |
       v          |                           |              |
     +--------------+                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |<-(0) Key Exchange for ->|              |
     |   Issuer     |      Key Encryption Key |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         +--------------+
     +--------------+
        

Figure 1: Proof of Possession with a Symmetric Key

图1:使用对称密钥的占有证明

In the case illustrated in Figure 1, (1) either the presenter generates a symmetric key and privately sends it to the issuer or the issuer generates a symmetric key and privately sends it to the presenter. The issuer generates a JWT with an encrypted copy of this symmetric key in the confirmation claim. This symmetric key is encrypted with a key known only to the issuer and the recipient, which was previously established in step (0). The entire JWT is integrity protected by the issuer. The JWT is then (2) sent to the presenter. Now, the presenter is in possession of the symmetric key as well as the JWT (which includes the confirmation claim). When the presenter (3) presents the JWT to the recipient, it also needs to demonstrate possession of the symmetric key; the presenter, for example, (4) uses the symmetric key in a challenge/response protocol with the recipient. The recipient is then able to verify that it is interacting with the genuine presenter by decrypting the key in the confirmation claim of the JWT. By doing this, the recipient obtains the symmetric key, which it then uses to verify cryptographically protected messages exchanged with the presenter (4). This symmetric key mechanism described above is conceptually similar to the use of Kerberos tickets.

在图1所示的情况下,(1)呈现者生成对称密钥并私下将其发送给发布者,或者发布者生成对称密钥并私下将其发送给呈现者。发卡机构在确认声明中生成带有该对称密钥加密副本的JWT。此对称密钥使用仅发卡机构和收件人知道的密钥加密,该密钥先前在步骤(0)中建立。整个JWT受发行人的完整性保护。然后将JWT(2)发送给演示者。现在,演示者拥有对称密钥和JWT(包括确认声明)。当呈现者(3)向接收者呈现JWT时,它还需要证明拥有对称密钥;例如,演示者(4)在与接收者的质询/响应协议中使用对称密钥。然后,接收方可以通过解密JWT确认声明中的密钥来验证它是否与真正的演示者交互。通过这样做,接收者获得对称密钥,然后使用该密钥验证与呈现者交换的受加密保护的消息(4)。上述对称密钥机制在概念上类似于Kerberos票证的使用。

Note that for simplicity, the diagram above and associated text describe the direct use of symmetric keys without the use of derived keys. A more secure practice is to derive the symmetric keys actually used from secrets exchanged, such as the key exchanged in step (0), using a Key Derivation Function (KDF) and use the derived keys, rather than directly using the secrets exchanged.

请注意,为简单起见,上图和相关文本描述了在不使用派生键的情况下直接使用对称键。更安全的做法是使用密钥派生函数(KDF)从交换的密钥(如步骤(0)中交换的密钥)派生实际使用的对称密钥,并使用派生密钥,而不是直接使用交换的密钥。

     +--------------+
     |              |                         +--------------+
     |              |--(3) Presentation of -->|              |
     |              |      JWT w/ Public      |              |
     |  Presenter   |      PoP Key            |              |
     |              |                         |              |
     |              |<-(4) Communication ---->|              |
     |              |      Authenticated by   |              |
     +--------------+      PoP Key            |              |
       |          ^                           |              |
       |          |                           |              |
      (1) Public (2) JWT w/                   |  Recipient   |
       |  PoP     |  Public                   |              |
       |  Key     |  PoP Key                  |              |
       v          |                           |              |
     +--------------+                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         |              |
     |    Issuer    |                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         +--------------+
     +--------------+
        
     +--------------+
     |              |                         +--------------+
     |              |--(3) Presentation of -->|              |
     |              |      JWT w/ Public      |              |
     |  Presenter   |      PoP Key            |              |
     |              |                         |              |
     |              |<-(4) Communication ---->|              |
     |              |      Authenticated by   |              |
     +--------------+      PoP Key            |              |
       |          ^                           |              |
       |          |                           |              |
      (1) Public (2) JWT w/                   |  Recipient   |
       |  PoP     |  Public                   |              |
       |  Key     |  PoP Key                  |              |
       v          |                           |              |
     +--------------+                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         |              |
     |    Issuer    |                         |              |
     |              |                         |              |
     |              |                         |              |
     |              |                         +--------------+
     +--------------+
        

Figure 2: Proof of Possession with an Asymmetric Key

图2:使用非对称密钥的占有证明

In the case illustrated in Figure 2, the presenter generates a public/private key pair and (1) sends the public key to the issuer, which creates a JWT that contains the public key (or an identifier for it) in the confirmation claim. The entire JWT is integrity protected using a digital signature to protect it against modifications. The JWT is then (2) sent to the presenter. When the presenter (3) presents the JWT to the recipient, it also needs to demonstrate possession of the private key. The presenter, for example, (4) uses the private key in a Transport Layer Security (TLS) exchange with the recipient or (4) signs a nonce with the private key. The recipient is able to verify that it is interacting with the genuine presenter by extracting the public key from the confirmation claim of the JWT (after verifying the digital signature of the JWT)

在图2所示的情况下,演示者生成公钥/私钥对,并(1)将公钥发送给发行者,发行者在确认声明中创建一个包含公钥(或其标识符)的JWT。整个JWT使用数字签名进行完整性保护,以防止修改。然后将JWT(2)发送给演示者。当呈现者(3)向接收者呈现JWT时,它还需要证明拥有私钥。例如,演示者(4)在与接收者的传输层安全性(TLS)交换中使用私钥,或(4)使用私钥签署nonce。接收方可以通过从JWT的确认声明中提取公钥(在验证JWT的数字签名后)来验证其是否与真正的演示者进行了交互

and utilizing it with the private key in the TLS exchange or by checking the nonce signature.

以及在TLS交换中与私钥一起使用它,或者通过检查nonce签名来使用它。

In both cases, the JWT may contain other claims that are needed by the application.

在这两种情况下,JWT可能包含应用程序所需的其他权利要求。

1.1. Notational Conventions
1.1. 符号约定

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].

本文件中的关键词“必须”、“不得”、“必需”、“应”、“不应”、“建议”、“不建议”、“可”和“可选”应按照RFC 2119[RFC2119]中的说明进行解释。

Unless otherwise noted, all the protocol parameter names and values are case sensitive.

除非另有说明,否则所有协议参数名称和值都区分大小写。

2. Terminology
2. 术语

This specification uses terms defined in the JSON Web Token [JWT], JSON Web Key [JWK], and JSON Web Encryption [JWE] specifications.

本规范使用JSON Web令牌[JWT]、JSON Web密钥[JWK]和JSON Web加密[JWE]规范中定义的术语。

These terms are defined by this specification:

这些术语由本规范定义:

Issuer Party that creates the JWT and binds the proof-of-possession key to it.

创建JWT并将占有证明密钥绑定到JWT的发行方。

Presenter Party that proves possession of a private key (for asymmetric key cryptography) or secret key (for symmetric key cryptography) to a recipient.

向接收方证明拥有私钥(用于非对称密钥加密)或密钥(用于对称密钥加密)的演示方。

Recipient Party that receives the JWT containing the proof-of-possession key information from the presenter.

从演示者处接收包含持有证明密钥信息的JWT的接收方。

3. Representations for Proof-of-Possession Keys
3. 持有钥匙证明申述书

By including a "cnf" (confirmation) claim in a JWT, the issuer of the JWT declares that the presenter possesses a particular key and that the recipient can cryptographically confirm that the presenter has possession of that key. The value of the "cnf" claim is a JSON object and the members of that object identify the proof-of-possession key.

通过在JWT中包含“cnf”(确认)声明,JWT的发行人声明提交人拥有特定密钥,并且接收方可以加密方式确认提交人拥有该密钥。“cnf”声明的值是一个JSON对象,该对象的成员标识持有证明密钥。

The presenter can be identified in one of several ways by the JWT depending upon the application requirements. If the JWT contains a "sub" (subject) claim [JWT], the presenter is normally the subject

JWT可以通过多种方式之一根据应用程序需求识别演示者。如果JWT包含“子”(主题)声明[JWT],则演示者通常是主题

identified by the JWT. (In some applications, the subject identifier will be relative to the issuer identified by the "iss" (issuer) claim [JWT].) If the JWT contains no "sub" claim, the presenter is normally the issuer identified by the JWT using the "iss" claim. The case in which the presenter is the subject of the JWT is analogous to Security Assertion Markup Language (SAML) 2.0 [OASIS.saml-core-2.0-os] SubjectConfirmation usage. At least one of the "sub" and "iss" claims MUST be present in the JWT. Some use cases may require that both be present.

由JWT确定。(在某些应用中,主题标识符将与“iss”(发行人)权利要求[JWT]标识的发行人相关)。如果JWT不包含“子”权利要求,则提交人通常是JWT使用“iss”权利要求标识的发行人。演示者是JWT主题的情况类似于安全断言标记语言(SAML)2.0[OASIS.SAML-core-2.0-os]SubjectConfirmation用法。JWT中必须至少有一项“sub”和“iss”索赔。一些用例可能要求两者都存在。

Another means used by some applications to identify the presenter is an explicit claim, such as the "azp" (authorized party) claim defined by OpenID Connect [OpenID.Core]. Ultimately, the means of identifying the presenter is application specific, as is the means of confirming possession of the key that is communicated.

某些应用程序用于识别演示者的另一种方法是明确的声明,如OpenID Connect[OpenID.Core]定义的“azp”(授权方)声明。最终,识别演示者的方法是特定于应用程序的,确认所传送密钥的拥有的方法也是特定于应用程序的。

3.1. Confirmation Claim
3.1. 确认索赔

The "cnf" claim is used in the JWT to contain members used to identify the proof-of-possession key. Other members of the "cnf" object may be defined because a proof-of-possession key may not be the only means of confirming the authenticity of the token. This is analogous to the SAML 2.0 [OASIS.saml-core-2.0-os] SubjectConfirmation element in which a number of different subject confirmation methods can be included (including proof-of-possession key information).

JWT中使用了“cnf”声明来包含用于识别持有证明密钥的成员。“cnf”对象的其他成员可能会被定义,因为占有证明密钥可能不是确认代币真实性的唯一手段。这类似于SAML 2.0[OASIS.SAML-core-2.0-os]SubjectConfirmation元素,其中可以包括许多不同的主题确认方法(包括持有证明密钥信息)。

The set of confirmation members that a JWT must contain to be considered valid is context dependent and is outside the scope of this specification. Specific applications of JWTs will require implementations to understand and process some confirmation members in particular ways. However, in the absence of such requirements, all confirmation members that are not understood by implementations MUST be ignored.

JWT必须包含的一组确认成员才能被认为是有效的,这取决于上下文,不在本规范的范围内。JWTs的特定应用程序需要实现以特定方式理解和处理一些确认成员。但是,在没有此类要求的情况下,必须忽略实现不理解的所有确认成员。

This specification establishes the IANA "JWT Confirmation Methods" registry for these members in Section 6.2 and registers the members defined by this specification. Other specifications can register other members used for confirmation, including other members for conveying proof-of-possession keys using different key representations.

本规范在第6.2节中为这些成员建立IANA“JWT确认方法”注册表,并注册本规范定义的成员。其他规范可以注册用于确认的其他成员,包括使用不同密钥表示传递持有密钥证明的其他成员。

The "cnf" claim value MUST represent only a single proof-of-possession key; thus, at most one of the "jwk", "jwe", and "jku" (JWK Set URL) confirmation values defined below may be present. Note that if an application needs to represent multiple proof-of-possession keys in the same JWT, one way for it to achieve this is to use other claim names, in addition to "cnf", to hold the additional proof-of-

“cnf”索赔值必须仅代表一个拥有密钥的证明;因此,下面定义的“jwk”、“jwe”和“jku”(jwk集合URL)确认值中最多可能存在一个。请注意,如果一个应用程序需要在同一JWT中表示多个拥有权证明密钥,那么实现这一点的一种方法是使用除“cnf”之外的其他索赔名称来持有额外的拥有权证明密钥-

possession key information. These claims could use the same syntax and semantics as the "cnf" claim. Those claims would be defined by applications or other specifications and could be registered in the IANA "JSON Web Token Claims" registry [IANA.JWT.Claims].

拥有关键信息。这些声明可以使用与“cnf”声明相同的语法和语义。这些声明将由应用程序或其他规范定义,并可以在IANA“JSON Web令牌声明”注册表[IANA.JWT.claims]中注册。

3.2. Representation of an Asymmetric Proof-of-Possession Key
3.2. 非对称占有证明密钥的表示

When the key held by the presenter is an asymmetric private key, the "jwk" member is a JSON Web Key [JWK] representing the corresponding asymmetric public key. The following example demonstrates such a declaration in the JWT Claims Set of a JWT:

当演示者持有的密钥是非对称私钥时,“jwk”成员是JSON Web密钥[jwk],表示相应的非对称公钥。以下示例演示了JWT的JWT声明集中的此类声明:

     {
      "iss": "https://server.example.com",
      "aud": "https://client.example.org",
      "exp": 1361398824,
      "cnf":{
        "jwk":{
          "kty": "EC",
          "use": "sig",
          "crv": "P-256",
          "x": "18wHLeIgW9wVN6VD1Txgpqy2LszYkMf6J8njVAibvhM",
          "y": "-V4dS4UaLMgP_4fY4j8ir7cl1TXlFdAgcx55o7TkcSA"
         }
       }
     }
        
     {
      "iss": "https://server.example.com",
      "aud": "https://client.example.org",
      "exp": 1361398824,
      "cnf":{
        "jwk":{
          "kty": "EC",
          "use": "sig",
          "crv": "P-256",
          "x": "18wHLeIgW9wVN6VD1Txgpqy2LszYkMf6J8njVAibvhM",
          "y": "-V4dS4UaLMgP_4fY4j8ir7cl1TXlFdAgcx55o7TkcSA"
         }
       }
     }
        

The JWK MUST contain the required key members for a JWK of that key type and MAY contain other JWK members, including the "kid" (Key ID) member.

JWK必须包含该密钥类型的JWK所需的密钥成员,并且可以包含其他JWK成员,包括“kid”(密钥ID)成员。

The "jwk" member MAY also be used for a JWK representing a symmetric key, provided that the JWT is encrypted so that the key is not revealed to unintended parties. The means of encrypting a JWT is explained in [JWT]. If the JWT is not encrypted, the symmetric key MUST be encrypted as described below.

“jwk”成员还可用于表示对称密钥的jwk,前提是对JWT进行了加密,以使密钥不会泄露给非预期方。[JWT]中解释了加密JWT的方法。如果JWT未加密,则必须按如下所述加密对称密钥。

3.3. Representation of an Encrypted Symmetric Proof-of-Possession Key
3.3. 加密对称占有证明密钥的表示

When the key held by the presenter is a symmetric key, the "jwe" member is an encrypted JSON Web Key [JWK] encrypted to a key known to the recipient using the JWE Compact Serialization containing the symmetric key. The rules for encrypting a JWK are found in Section 7 of the JSON Web Key [JWK] specification.

当演示者持有的密钥是对称密钥时,“jwe”成员是加密的JSON Web密钥[JWK],使用包含对称密钥的jwe压缩序列化将其加密为收件人已知的密钥。JSON Web密钥[JWK]规范的第7节介绍了加密JWK的规则。

The following example illustrates a symmetric key that could subsequently be encrypted for use in the "jwe" member:

以下示例说明了一个对称密钥,该密钥随后可以加密以用于“jwe”成员:

     {
      "kty": "oct",
      "alg": "HS256",
      "k": "ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE"
     }
        
     {
      "kty": "oct",
      "alg": "HS256",
      "k": "ZoRSOrFzN_FzUA5XKMYoVHyzff5oRJxl-IXRtztJ6uE"
     }
        

The UTF-8 [RFC3629] encoding of this JWK is used as the JWE Plaintext when encrypting the key.

加密密钥时,此JWK的UTF-8[RFC3629]编码用作JWE明文。

The following example is a JWE Header that could be used when encrypting this key:

以下示例是加密此密钥时可以使用的JWE头:

     {
      "alg": "RSA-OAEP",
      "enc": "A128CBC-HS256"
     }
        
     {
      "alg": "RSA-OAEP",
      "enc": "A128CBC-HS256"
     }
        

The following example JWT Claims Set of a JWT illustrates the use of an encrypted symmetric key as the "jwe" member value:

以下示例JWT声明一组JWT说明了使用加密对称密钥作为“jwe”成员值:

     {
      "iss": "https://server.example.com",
      "sub": "24400320",
      "aud": "s6BhdRkqt3",
      "nonce": "n-0S6_WzA2Mj",
      "exp": 1311281970,
      "iat": 1311280970,
      "cnf":{
        "jwe":
          "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhDQkMtSFMyNTYifQ.
          (remainder of JWE omitted for brevity)"
        }
     }
        
     {
      "iss": "https://server.example.com",
      "sub": "24400320",
      "aud": "s6BhdRkqt3",
      "nonce": "n-0S6_WzA2Mj",
      "exp": 1311281970,
      "iat": 1311280970,
      "cnf":{
        "jwe":
          "eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhDQkMtSFMyNTYifQ.
          (remainder of JWE omitted for brevity)"
        }
     }
        
3.4. Representation of a Key ID for a Proof-of-Possession Key
3.4. 持有证明钥匙的钥匙ID的表示

The proof-of-possession key can also be identified by the use of a Key ID instead of communicating the actual key, provided the recipient is able to obtain the identified key using the Key ID. In this case, the issuer of a JWT declares that the presenter possesses a particular key and that the recipient can cryptographically confirm proof of possession of the key by the presenter by including a "cnf" claim in the JWT whose value is a JSON object with the JSON object containing a "kid" member identifying the key.

如果接收者能够使用密钥ID获得已识别的密钥,则也可以通过使用密钥ID而不是传递实际密钥来识别持有证明密钥。在这种情况下,JWT的发行人声明,提交人拥有特定密钥,接收人可以通过在JWT中包含“cnf”声明(其值为JSON对象,JSON对象包含标识密钥的“kid”成员)以加密方式确认提交人拥有密钥的证明。

The following example demonstrates such a declaration in the JWT Claims Set of a JWT:

以下示例演示了JWT的JWT声明集中的此类声明:

     {
      "iss": "https://server.example.com",
      "aud": "https://client.example.org",
      "exp": 1361398824,
      "cnf":{
        "kid": "dfd1aa97-6d8d-4575-a0fe-34b96de2bfad"
       }
     }
        
     {
      "iss": "https://server.example.com",
      "aud": "https://client.example.org",
      "exp": 1361398824,
      "cnf":{
        "kid": "dfd1aa97-6d8d-4575-a0fe-34b96de2bfad"
       }
     }
        

The content of the "kid" value is application specific. For instance, some applications may choose to use a JWK Thumbprint [JWK.Thumbprint] value as the "kid" value.

“kid”值的内容是特定于应用程序的。例如,一些应用程序可能选择使用JWK指纹[JWK.Thumbprint]值作为“kid”值。

3.5. Representation of a URL for a Proof-of-Possession Key
3.5. 表示占有证明密钥的URL

The proof-of-possession key can be passed by reference instead of being passed by value. This is done using the "jku" member. Its value is a URI [RFC3986] that refers to a resource for a set of JSON-encoded public keys represented as a JWK Set [JWK], one of which is the proof-of-possession key. If there are multiple keys in the referenced JWK Set document, a "kid" member MUST also be included with the referenced key's JWK also containing the same "kid" value.

拥有权证明密钥可以通过引用传递,而不是通过值传递。这是使用“jku”成员完成的。它的值是一个URI[RFC3986],该URI引用一组JSON编码的公钥的资源,这些公钥表示为JWK集[JWK],其中一个是拥有权证明密钥。如果引用的JWK集合文档中有多个键,则引用键的JWK中还必须包含一个“kid”成员,该成员还包含相同的“kid”值。

The protocol used to acquire the resource MUST provide integrity protection. An HTTP GET request to retrieve the JWK Set MUST use TLS [RFC5246] and the identity of the server MUST be validated, as per Section 6 of RFC 6125 [RFC6125].

用于获取资源的协议必须提供完整性保护。根据RFC 6125[RFC6125]第6节,检索JWK集的HTTP GET请求必须使用TLS[RFC5246],并且必须验证服务器的标识。

The following example demonstrates such a declaration in the JWT Claims Set of a JWT:

以下示例演示了JWT的JWT声明集中的此类声明:

     {
      "iss": "https://server.example.com",
      "sub": "17760704",
      "aud": "https://client.example.org",
      "exp": 1440804813,
      "cnf":{
        "jku": "https://keys.example.net/pop-keys.json",
        "kid": "2015-08-28"
       }
     }
        
     {
      "iss": "https://server.example.com",
      "sub": "17760704",
      "aud": "https://client.example.org",
      "exp": 1440804813,
      "cnf":{
        "jku": "https://keys.example.net/pop-keys.json",
        "kid": "2015-08-28"
       }
     }
        
3.6. Specifics Intentionally Not Specified
3.6. 故意不指定的细节

Proof of possession is typically demonstrated by having the presenter sign a value determined by the recipient using the key possessed by the presenter. This value is sometimes called a "nonce" or a "challenge".

占有证明通常通过让演示者使用演示者拥有的密钥签署接收者确定的值来证明。该值有时称为“暂时”或“挑战”。

The means of communicating the nonce and the nature of its contents are intentionally not described in this specification, as different protocols will communicate this information in different ways. Likewise, the means of communicating the signed nonce is also not specified, as this is also protocol specific.

由于不同的协议将以不同的方式传输此信息,因此本规范中有意不描述当前状态的通信方式及其内容的性质。类似地,也没有指定传递已签名nonce的方式,因为这也是特定于协议的。

Note that another means of proving possession of the key when it is a symmetric key is to encrypt the key to the recipient. The means of obtaining a key for the recipient is likewise protocol specific.

注意,当密钥是对称密钥时,证明其拥有权的另一种方法是向接收方加密密钥。为接收者获取密钥的方法同样是特定于协议的。

For examples using the mechanisms defined in this specification, see [OAUTH-POP-ARCH].

有关使用本规范中定义的机制的示例,请参见[OAUTH-POP-ARCH]。

4. Security Considerations
4. 安全考虑

All of the security considerations that are discussed in [JWT] also apply here. In addition, proof of possession introduces its own unique security issues. Possessing a key is only valuable if it is kept secret. Appropriate means must be used to ensure that unintended parties do not learn private key or symmetric key values.

[JWT]中讨论的所有安全注意事项也适用于此处。此外,占有证明本身也带来了独特的安全问题。拥有一把钥匙只有在保密的情况下才有价值。必须使用适当的方法,以确保意外方不会学习私钥或对称密钥值。

Applications utilizing proof of possession should also utilize audience restriction, as described in Section 4.1.3 of [JWT], as it provides different protections. Proof of possession can be used by recipients to reject messages from unauthorized senders. Audience restriction can be used by recipients to reject messages intended for different recipients.

如[JWT]第4.1.3节所述,使用占有证明的申请还应使用观众限制,因为它提供了不同的保护。收件人可以使用占有证明拒绝来自未经授权发件人的邮件。收件人可以使用访问群体限制来拒绝针对不同收件人的邮件。

A recipient might not understand the "cnf" claim. Applications that require the proof-of-possession keys communicated with it to be understood and processed must ensure that the parts of this specification that they use are implemented.

收件人可能不理解“cnf”索赔。要求理解和处理与之通信的持有证明密钥的应用程序必须确保其使用的本规范部分得到实施。

Proof of possession via encrypted symmetric secrets is subject to replay attacks. This attack can, for example, be avoided when a signed nonce or challenge is used since the recipient can use a distinct nonce or challenge for each interaction. Replay can also be avoided if a sub-key is derived from a shared secret that is specific to the instance of the PoP demonstration.

通过加密对称机密证明拥有权会受到重播攻击。例如,当使用签名的nonce或质询时,可以避免这种攻击,因为接收者可以对每次交互使用不同的nonce或质询。如果子密钥来自特定于PoP演示实例的共享密钥,则也可以避免重播。

As is the case with other information included in a JWT, it is necessary to apply data origin authentication and integrity protection (via a keyed message digest or a digital signature). Data origin authentication ensures that the recipient of the JWT learns about the entity that created the JWT since this will be important for any policy decisions. Integrity protection prevents an adversary from changing any elements conveyed within the JWT payload. Special care has to be applied when carrying symmetric keys inside the JWT since those not only require integrity protection but also confidentiality protection.

与JWT中包含的其他信息一样,有必要应用数据源身份验证和完整性保护(通过密钥消息摘要或数字签名)。数据源身份验证确保JWT的接收者了解创建JWT的实体,因为这对于任何策略决策都很重要。完整性保护可防止敌方改变JWT有效载荷内传送的任何元素。在JWT内携带对称密钥时必须特别小心,因为这些密钥不仅需要完整性保护,还需要保密性保护。

5. Privacy Considerations
5. 隐私考虑

A proof-of-possession key can be used as a correlation handle if the same key is used with multiple parties. Thus, for privacy reasons, it is recommended that different proof-of-possession keys be used when interacting with different parties.

如果多方使用同一密钥,则占有证明密钥可以用作相关句柄。因此,出于隐私原因,建议在与不同方交互时使用不同的占有证明密钥。

6. IANA Considerations
6. IANA考虑

The following registration procedure is used for all the registries established by this specification.

以下注册程序适用于本规范建立的所有注册中心。

Values are registered on a Specification Required [RFC5226] basis after a three-week review period on the jwt-reg-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 Experts may approve registration once they are satisfied that such a specification will be published.

在jwt reg上经过三周的审查后,根据规范要求[RFC5226]登记数值-review@ietf.org根据一名或多名指定专家的建议,提供邮件列表。但是,为了允许在发布之前分配值,指定专家在确信此类规范将发布后,可批准注册。

Registration requests sent to the mailing list for review should use an appropriate subject (e.g., "Request to Register JWT Confirmation Method: example"). Registration requests that are undetermined for a period longer than 21 days can be brought to the IESG's attention (using the iesg@ietf.org mailing list) for resolution.

发送至邮件列表供审查的注册请求应使用适当的主题(例如,“注册JWT确认方法请求:示例”)。超过21天未确定的注册请求可提请IESG注意(使用iesg@ietf.org邮件列表)以供解决。

Criteria that should be applied by the Designated Experts include determining whether the proposed registration duplicates existing functionality, determining whether it is likely to be of general applicability or whether it is useful only for a single application, and evaluating the security properties of the item being registered and whether the registration makes sense.

指定专家应适用的标准包括确定拟议的登记是否与现有功能重复,确定其是否可能具有普遍适用性,或是否仅对单一应用有用,以及评估被登记物品的安全属性以及登记是否有意义。

It is suggested that multiple Designated Experts be appointed who are able to represent the perspectives of different applications using this specification in order to enable broadly informed review of registration decisions. In cases where a registration decision could be perceived as creating a conflict of interest for a particular

建议任命多名指定专家,他们能够代表使用本规范的不同应用的观点,以便对注册决定进行广泛知情的审查。在注册决定可能被视为对某一特定实体产生利益冲突的情况下

Expert, that Expert should defer to the judgment of the other Experts.

专家,该专家应服从其他专家的判断。

6.1. JSON Web Token Claims Registration
6.1. JSON Web令牌声明注册

This specification registers the "cnf" claim in the IANA "JSON Web Token Claims" registry [IANA.JWT.Claims] established by [JWT].

本规范在[JWT]建立的IANA“JSON Web令牌声明”注册表[IANA.JWT.Claims]中注册“cnf”声明。

6.1.1. Registry Contents
6.1.1. 注册表内容

o Claim Name: "cnf" o Claim Description: Confirmation o Change Controller: IESG o Specification Document(s): Section 3.1 of [RFC7800]

o 索赔名称:“cnf”o索赔描述:变更控制者确认:IESG o规范文件:[RFC7800]第3.1节

6.2. JWT Confirmation Methods Registry
6.2. JWT确认方法注册表

This specification establishes the IANA "JWT Confirmation Methods" registry for JWT "cnf" member values. The registry records the confirmation method member and a reference to the specification that defines it.

本规范为JWT“cnf”成员值建立IANA“JWT确认方法”注册表。注册表记录确认方法成员和对定义该成员的规范的引用。

6.2.1. Registration Template
6.2.1. 注册模板

Confirmation Method Value: The name requested (e.g., "kid"). Because a core goal of this specification is for the resulting representations to be compact, it is RECOMMENDED that the name be short -- not to exceed eight characters without a compelling reason to do so. This name is case sensitive. Names may not match other registered names in a case-insensitive manner unless the Designated Experts state that there is a compelling reason to allow an exception.

确认方法值:请求的名称(例如,“kid”)。由于本规范的一个核心目标是使生成的表示形式紧凑,因此建议名称简短——如果没有令人信服的理由,名称不能超过八个字符。此名称区分大小写。名称不得以不区分大小写的方式与其他注册名称匹配,除非指定专家声明有令人信服的理由允许例外。

Confirmation Method Description: Brief description of the confirmation method (e.g., "Key Identifier").

确认方法说明:确认方法的简要说明(例如,“密钥标识符”)。

Change Controller: For Standards Track RFCs, list the "IESG". For others, give the name of the responsible party. Other details (e.g., postal address, email address, home page URI) may also be included.

更改控制器:对于标准跟踪RFC,请列出“IESG”。对于其他人,请提供责任方的名称。还可以包括其他详细信息(例如,邮政地址、电子邮件地址、主页URI)。

Specification Document(s): Reference to the document or documents that specify the parameter, preferably including URIs that can be used to retrieve copies of the documents. An indication of the relevant sections may also be included but is not required.

规范文档:指指定参数的一个或多个文档,最好包括可用于检索文档副本的URI。也可以包括相关章节的指示,但不需要。

6.2.2. Initial Registry Contents
6.2.2. 初始注册表内容

o Confirmation Method Value: "jwk" o Confirmation Method Description: JSON Web Key Representing Public Key o Change Controller: IESG o Specification Document(s): Section 3.2 of [RFC7800] o Confirmation Method Value: "jwe" o Confirmation Method Description: Encrypted JSON Web Key o Change Controller: IESG o Specification Document(s): Section 3.3 of [RFC7800]

o 确认方法值:“jwk”o确认方法说明:代表公钥的JSON Web密钥o变更控制器:IESG o规范文档:[RFC7800]的第3.2节o确认方法值:“jwe”o确认方法说明:加密的JSON Web密钥o变更控制器:IESG o规范文档:第3.3节[RFC7800]

o Confirmation Method Value: "kid" o Confirmation Method Description: Key Identifier o Change Controller: IESG o Specification Document(s): Section 3.4 of [RFC7800]

o 确认方法值:“kid”o确认方法说明:关键标识符o变更控制者:IESG o规范文件:[RFC7800]第3.4节

o Confirmation Method Value: "jku" o Confirmation Method Description: JWK Set URL o Change Controller: IESG o Specification Document(s): Section 3.5 of [RFC7800]

o 确认方法值:“jku”o确认方法说明:JWK设置URL o变更控制器:IESG o规范文件:[RFC7800]第3.5节

7. References
7. 工具书类
7.1. Normative References
7.1. 规范性引用文件

[IANA.JWT.Claims] IANA, "JSON Web Token Claims", <http://www.iana.org/assignments/jwt>.

[IANA.JWT.Claims]IANA,“JSON Web令牌声明”<http://www.iana.org/assignments/jwt>.

[JWE] Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", RFC 7516, DOI 10.17487/RFC7156, May 2015, <http://www.rfc-editor.org/info/rfc7516>.

[JWE]Jones,M.和J.Hildebrand,“JSON Web加密(JWE)”,RFC 7516,DOI 10.17487/RFC71562015年5月<http://www.rfc-editor.org/info/rfc7516>.

[JWK] Jones, M., "JSON Web Key (JWK)", RFC 7517, DOI 10.17487/RFC7157, May 2015, <http://www.rfc-editor.org/info/rfc7517>.

[JWK]Jones,M.“JSON Web密钥(JWK)”,RFC 7517,DOI 10.17487/RFC7157,2015年5月<http://www.rfc-editor.org/info/rfc7517>.

[JWT] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token (JWT)", RFC 7519, DOI 10.17487/RFC7159, May 2015, <http://www.rfc-editor.org/info/rfc7519>.

[JWT]Jones,M.,Bradley,J.,和N.Sakimura,“JSON网络令牌(JWT)”,RFC 7519,DOI 10.17487/RFC71592015年5月<http://www.rfc-editor.org/info/rfc7519>.

[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997, <http://www.rfc-editor.org/info/rfc2119>.

[RFC2119]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,DOI 10.17487/RFC2119,1997年3月<http://www.rfc-editor.org/info/rfc2119>.

[RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003, <http://www.rfc-editor.org/info/rfc3629>.

[RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,DOI 10.17487/RFC3629,2003年11月<http://www.rfc-editor.org/info/rfc3629>.

[RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform Resource Identifier (URI): Generic Syntax", STD 66, RFC 3986, DOI 10.17487/RFC3986, January 2005, <http://www.rfc-editor.org/info/rfc3986>.

[RFC3986]Berners Lee,T.,Fielding,R.,和L.Masinter,“统一资源标识符(URI):通用语法”,STD 66,RFC 3986,DOI 10.17487/RFC3986,2005年1月<http://www.rfc-editor.org/info/rfc3986>.

[RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 5226, DOI 10.17487/RFC5226, May 2008, <http://www.rfc-editor.org/info/rfc5226>.

[RFC5226]Narten,T.和H.Alvestrand,“在RFCs中编写IANA注意事项部分的指南”,BCP 26,RFC 5226,DOI 10.17487/RFC5226,2008年5月<http://www.rfc-editor.org/info/rfc5226>.

[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security (TLS) Protocol Version 1.2", RFC 5246, DOI 10.17487/RFC5246, August 2008, <http://www.rfc-editor.org/info/rfc5246>.

[RFC5246]Dierks,T.和E.Rescorla,“传输层安全(TLS)协议版本1.2”,RFC 5246,DOI 10.17487/RFC5246,2008年8月<http://www.rfc-editor.org/info/rfc5246>.

[RFC6125] Saint-Andre, P. and J. Hodges, "Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)", RFC 6125, DOI 10.17487/RFC6125, March 2011, <http://www.rfc-editor.org/info/rfc6125>.

[RFC6125]Saint Andre,P.和J.Hodges,“在传输层安全(TLS)环境下使用X.509(PKIX)证书在互联网公钥基础设施内表示和验证基于域的应用程序服务身份”,RFC 6125,DOI 10.17487/RFC6125,2011年3月<http://www.rfc-editor.org/info/rfc6125>.

7.2. Informative References
7.2. 资料性引用

[JWK.Thumbprint] Jones, M. and N. Sakimura, "JSON Web Key (JWK) Thumbprint", RFC 7638, DOI 10.17487/RFC7638, September 2015, <http://www.rfc-editor.org/info/rfc7638>.

[JWK.指纹]Jones,M.和N.Sakimura,“JSON网络密钥(JWK)指纹”,RFC 7638,DOI 10.17487/RFC7638,2015年9月<http://www.rfc-editor.org/info/rfc7638>.

[OASIS.saml-core-2.0-os] Cantor, S., Kemp, J., Philpott, R., and E. Maler, "Assertions and Protocol for the OASIS Security Assertion Markup Language (SAML) V2.0", OASIS Standard saml-core-2.0-os, March 2005, <http://docs.oasis-open.org/security/saml/v2.0/>.

[OASIS.saml-core-2.0-os]Cantor,S.,Kemp,J.,Philpott,R.,和E.Maler,“OASIS安全断言标记语言(saml)V2.0的断言和协议”,OASIS标准saml-core-2.0-os,2005年3月<http://docs.oasis-open.org/security/saml/v2.0/>.

[OAUTH-POP-ARCH] Hunt, P., Ed, Richer, J., Mills, W., Mishra, P., and H. Tschofenig, "OAuth 2.0 Proof-of-Possession (PoP) Security Architecture", Work in Progress, draft-ietf-oauth-pop-architecture-07, December 2015.

[OAUTH-POP-ARCH]Hunt,P.,Ed,Richer,J.,Mills,W.,Mishra,P.,和H.Tschofenig,“OAUTH 2.0占有证明(POP)安全体系结构”,正在进行的工作,草案-ietf-OAUTH-POP-Architecture-072015年12月。

[OpenID.Core] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and C. Mortimore, "OpenID Connect Core 1.0", November 2014, <http://openid.net/specs/openid-connect-core-1_0.html>.

[OpenID.Core]北樱村、J.布拉德利、M.琼斯、B.德梅德罗斯和C.莫蒂莫尔,“OpenID连接核心1.0”,2014年11月<http://openid.net/specs/openid-connect-core-1_0.html>.

Acknowledgements

致谢

The authors wish to thank Brian Campbell, Stephen Farrell, Barry Leiba, Kepeng Li, Chris Lonvick, James Manger, Kathleen Moriarty, Justin Richer, and Nat Sakimura for their reviews of the specification.

作者希望感谢Brian Campbell、Stephen Farrell、Barry Leiba、Kepeng Li、Chris Lonvick、James Manger、Kathleen Moriarty、Justin Richer和Nat Sakimura对规范的评审。

Authors' Addresses

作者地址

Michael B. Jones Microsoft

迈克尔·琼斯微软公司

   Email: mbj@microsoft.com
   URI:   http://self-issued.info/
        
   Email: mbj@microsoft.com
   URI:   http://self-issued.info/
        

John Bradley Ping Identity

约翰·布拉德利·平身份

   Email: ve7jtb@ve7jtb.com
   URI:   http://www.thread-safe.com/
        
   Email: ve7jtb@ve7jtb.com
   URI:   http://www.thread-safe.com/
        

Hannes Tschofenig ARM Limited Austria

Hannes Tschofenig ARM Limited奥地利

   Email: Hannes.Tschofenig@gmx.net
   URI:   http://www.tschofenig.priv.at
        
   Email: Hannes.Tschofenig@gmx.net
   URI:   http://www.tschofenig.priv.at