[要約] RFC 7519は、JSON Web Token (JWT) に関する仕様を定義しています。JWTは、JSONオブジェクトを用いて、二者間でクレーム(主張)を安全に表現するためのコンパクトでURLセーフな手段を提供します。主な目的は、認証や情報交換の際に、エンティティ間でセキュリティを確保しつつ、情報を軽量に伝達することです。利用場面としては、Webアプリケーションの認証、シングルサインオン(SSO)、情報の交換が挙げられます。関連するRFCには、RFC 7515 (JSON Web Signature (JWS))、RFC 7516 (JSON Web Encryption (JWE))、RFC 7517 (JSON Web Key (JWK)) があり、これらはJWTの署名や暗号化、鍵管理に関する仕様を提供しています。

Internet Engineering Task Force (IETF)                          M. Jones
Request for Comments: 7519                                     Microsoft
Category: Standards Track                                     J. Bradley
ISSN: 2070-1721                                            Ping Identity
                                                             N. Sakimura
                                                                     NRI
                                                                May 2015
        

JSON Web Token (JWT)

JSON Web Token(JWT)

Abstract

概要

JSON Web Token (JWT) is a compact, URL-safe means of representing claims to be transferred between two parties. The claims in a JWT are encoded as a JSON object that is used as the payload of a JSON Web Signature (JWS) structure or as the plaintext of a JSON Web Encryption (JWE) structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted.

JSON Web Token(JWT)は、2つのパーティ間で転送されるクレームを表す、コンパクトでURLセーフな手段です。 JWTのクレームは、JSON Web Signature(JWS)構造のペイロードとして、またはJSON Web Encryption(JWE)構造のプレーンテキストとして使用されるJSONオブジェクトとしてエンコードされ、クレームをデジタル署名または整合性保護することができます。メッセージ認証コード(MAC)で暗号化されています。

Status of This Memo

本文書の状態

This is an Internet Standards Track document.

これはInternet Standards Trackドキュメントです。

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(Internet Engineering Task Force)の製品です。これは、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/rfc7519.

このドキュメントの現在のステータス、エラータ、およびフィードバックの提供方法に関する情報は、http://www.rfc-editor.org/info/rfc7519で入手できます。

Copyright Notice

著作権表示

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

Copyright(c)2015 IETF Trustおよびドキュメントの作成者として識別された人物。全著作権所有。

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)の対象となります。これらのドキュメントは、このドキュメントに関するあなたの権利と制限を説明しているため、注意深く確認してください。このドキュメントから抽出されたコードコンポーネントには、Trust Legal Provisionsのセクション4.eに記載されているSimplified BSD Licenseのテキストが含まれている必要があり、Simplified BSD Licenseに記載されているように保証なしで提供されます。

Table of Contents

目次

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   4
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   4
   2.  Terminology . . . . . . . . . . . . . . . . . . . . . . . . .   4
   3.  JSON Web Token (JWT) Overview . . . . . . . . . . . . . . . .   6
     3.1.  Example JWT . . . . . . . . . . . . . . . . . . . . . . .   7
   4.  JWT Claims  . . . . . . . . . . . . . . . . . . . . . . . . .   8
     4.1.  Registered Claim Names  . . . . . . . . . . . . . . . . .   9
       4.1.1.  "iss" (Issuer) Claim  . . . . . . . . . . . . . . . .   9
       4.1.2.  "sub" (Subject) Claim . . . . . . . . . . . . . . . .   9
       4.1.3.  "aud" (Audience) Claim  . . . . . . . . . . . . . . .   9
       4.1.4.  "exp" (Expiration Time) Claim . . . . . . . . . . . .   9
       4.1.5.  "nbf" (Not Before) Claim  . . . . . . . . . . . . . .  10
       4.1.6.  "iat" (Issued At) Claim . . . . . . . . . . . . . . .  10
       4.1.7.  "jti" (JWT ID) Claim  . . . . . . . . . . . . . . . .  10
     4.2.  Public Claim Names  . . . . . . . . . . . . . . . . . . .  10
     4.3.  Private Claim Names . . . . . . . . . . . . . . . . . . .  10
   5.  JOSE Header . . . . . . . . . . . . . . . . . . . . . . . . .  11
     5.1.  "typ" (Type) Header Parameter . . . . . . . . . . . . . .  11
     5.2.  "cty" (Content Type) Header Parameter . . . . . . . . . .  11
     5.3.  Replicating Claims as Header Parameters . . . . . . . . .  12
   6.  Unsecured JWTs  . . . . . . . . . . . . . . . . . . . . . . .  12
     6.1.  Example Unsecured JWT . . . . . . . . . . . . . . . . . .  12
   7.  Creating and Validating JWTs  . . . . . . . . . . . . . . . .  13
     7.1.  Creating a JWT  . . . . . . . . . . . . . . . . . . . . .  13
     7.2.  Validating a JWT  . . . . . . . . . . . . . . . . . . . .  14
     7.3.  String Comparison Rules . . . . . . . . . . . . . . . . .  15
   8.  Implementation Requirements . . . . . . . . . . . . . . . . .  16
   9.  URI for Declaring that Content is a JWT . . . . . . . . . . .  17
   10. IANA Considerations . . . . . . . . . . . . . . . . . . . . .  17
     10.1.  JSON Web Token Claims Registry . . . . . . . . . . . . .  17
       10.1.1.  Registration Template  . . . . . . . . . . . . . . .  18
       10.1.2.  Initial Registry Contents  . . . . . . . . . . . . .  18
     10.2.  Sub-Namespace Registration of
            urn:ietf:params:oauth:token-type:jwt . . . . . . . . . .  19
       10.2.1.  Registry Contents  . . . . . . . . . . . . . . . . .  19
     10.3.  Media Type Registration  . . . . . . . . . . . . . . . .  20
       10.3.1.  Registry Contents  . . . . . . . . . . . . . . . . .  20
     10.4.  Header Parameter Names Registration  . . . . . . . . . .  20
       10.4.1.  Registry Contents  . . . . . . . . . . . . . . . . .  21
   11. Security Considerations . . . . . . . . . . . . . . . . . . .  21
     11.1.  Trust Decisions  . . . . . . . . . . . . . . . . . . . .  21
     11.2.  Signing and Encryption Order . . . . . . . . . . . . . .  21
   12. Privacy Considerations  . . . . . . . . . . . . . . . . . . .  22
   13. References  . . . . . . . . . . . . . . . . . . . . . . . . .  22
     13.1.  Normative References . . . . . . . . . . . . . . . . . .  22
     13.2.  Informative References . . . . . . . . . . . . . . . . .  23
        
   Appendix A.  JWT Examples . . . . . . . . . . . . . . . . . . . .  26
     A.1.  Example Encrypted JWT . . . . . . . . . . . . . . . . . .  26
     A.2.  Example Nested JWT  . . . . . . . . . . . . . . . . . . .  26
   Appendix B.  Relationship of JWTs to SAML Assertions  . . . . . .  28
   Appendix C.  Relationship of JWTs to Simple Web Tokens (SWTs) . .  28
   Acknowledgements  . . . . . . . . . . . . . . . . . . . . . . . .  28
   Authors' Addresses  . . . . . . . . . . . . . . . . . . . . . . .  29
        
1. Introduction
1. はじめに

JSON Web Token (JWT) is a compact claims representation format intended for space constrained environments such as HTTP Authorization headers and URI query parameters. JWTs encode claims to be transmitted as a JSON [RFC7159] object that is used as the payload of a JSON Web Signature (JWS) [JWS] structure or as the plaintext of a JSON Web Encryption (JWE) [JWE] structure, enabling the claims to be digitally signed or integrity protected with a Message Authentication Code (MAC) and/or encrypted. JWTs are always represented using the JWS Compact Serialization or the JWE Compact Serialization.

JSON Web Token(JWT)は、HTTP AuthorizationヘッダーやURIクエリパラメーターなど、スペースに制約のある環境向けのコンパクトなクレーム表現形式です。 JWTは、JSON Web Signature(JWS)[JWS]構造のペイロードとして、またはJSON Web Encryption(JWE)[JWE]構造のプレーンテキストとして使用されるJSON [RFC7159]オブジェクトとして送信されるクレームをエンコードし、デジタル署名または完全性がメッセージ認証コード(MAC)で保護されているか、暗号化されていると主張している。 JWTは常に、JWS Compact SerializationまたはJWE Compact Serializationを使用して表されます。

The suggested pronunciation of JWT is the same as the English word "jot".

JWTの推奨される発音は、英語の単語「jot」と同じです。

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 "Key words for use in RFCs to Indicate Requirement Levels" [RFC2119]. The interpretation should only be applied when the terms appear in all capital letters.

キーワード「MUST」、「MUST NOT」、「REQUIRED」、「SHALL」、「SHALL NOT」、「SHOULD」、「SHOULD NOT」、「RECOMMENDED」、「NOT RECOMMENDED」、「MAY」、「OPTIONALこのドキュメントの「は、「RFCで使用して要件レベルを示すためのキーワード」[RFC2119]で説明されているように解釈されます。解釈が適用されるのは、用語がすべて大文字である場合のみです。

2. Terminology
2. 用語

The terms "JSON Web Signature (JWS)", "Base64url Encoding", "Header Parameter", "JOSE Header", "JWS Compact Serialization", "JWS Payload", "JWS Signature", and "Unsecured JWS" are defined by the JWS specification [JWS].

「JSON Web Signature(JWS)」、「Base64url Encoding」、「Header Parameter」、「JOSE Header」、「JWS Compact Serialization」、「JWS Payload」、「JWS Signature」、および「Unsecured JWS」という用語は、 JWS仕様[JWS]。

The terms "JSON Web Encryption (JWE)", "Content Encryption Key (CEK)", "JWE Compact Serialization", "JWE Encrypted Key", and "JWE Initialization Vector" are defined by the JWE specification [JWE].

「JSON Web Encryption(JWE)」、「Content Encryption Key(CEK)」、「JWE Compact Serialization」、「JWE Encrypted Key」、および「JWE Initialization Vector」という用語は、JWE仕様[JWE]によって定義されています。

The terms "Ciphertext", "Digital Signature", "Message Authentication Code (MAC)", and "Plaintext" are defined by the "Internet Security Glossary, Version 2" [RFC4949].

「暗号文」、「デジタル署名」、「メッセージ認証コード(MAC)」、「プレーンテキスト」という用語は、「インターネットセキュリティ用語集、バージョン2」[RFC4949]で定義されています。

These terms are defined by this specification:

これらの用語は、この仕様で定義されています。

JSON Web Token (JWT) A string representing a set of claims as a JSON object that is encoded in a JWS or JWE, enabling the claims to be digitally signed or MACed and/or encrypted.

JSON Web Token(JWT)一連のクレームをJSONオブジェクトとして表す文字列。JWSまたはJWEでエンコードされ、クレームをデジタル署名またはMAC化および/または暗号化できるようにします。

JWT Claims Set A JSON object that contains the claims conveyed by the JWT.

JWTクレームセットJWTによって伝えられたクレームを含むJSONオブジェクト。

Claim A piece of information asserted about a subject. A claim is represented as a name/value pair consisting of a Claim Name and a Claim Value.

主張対象について主張された情報の一部。クレームは、クレーム名とクレーム値で構成される名前と値のペアとして表されます。

Claim Name The name portion of a claim representation. A Claim Name is always a string.

クレーム名クレーム表現の名前部分。クレーム名は常に文字列です。

Claim Value The value portion of a claim representation. A Claim Value can be any JSON value.

クレーム値クレーム表現の値の部分。クレーム値は任意のJSON値にすることができます。

Nested JWT A JWT in which nested signing and/or encryption are employed. In Nested JWTs, a JWT is used as the payload or plaintext value of an enclosing JWS or JWE structure, respectively.

ネストされたJWTネストされた署名や暗号化が使用されるJWT。ネストされたJWTでは、JWTはそれぞれ、囲んでいるJWSまたはJWE構造のペイロードまたはプレーンテキスト値として使用されます。

Unsecured JWT A JWT whose claims are not integrity protected or encrypted.

安全でないJWT主張が整合性保護または暗号化されていないJWT。

Collision-Resistant Name A name in a namespace that enables names to be allocated in a manner such that they are highly unlikely to collide with other names. Examples of collision-resistant namespaces include: Domain Names, Object Identifiers (OIDs) as defined in the ITU-T X.660 and X.670 Recommendation series, and Universally Unique IDentifiers (UUIDs) [RFC4122]. When using an administratively delegated namespace, the definer of a name needs to take reasonable precautions to ensure they are in control of the portion of the namespace they use to define the name.

衝突に強い名前他の名前と衝突する可能性が非常に低い方法で名前を割り当てることができる名前空間内の名前。衝突耐性のある名前空間の例には、ドメイン名、ITU-T X.660およびX.670推奨シリーズで定義されているオブジェクト識別子(OID)、およびユニバーサルユニーク識別子(UUID)[RFC4122]が含まれます。管理者に委任された名前空間を使用する場合、名前の定義者は、名前の定義に使用する名前空間の部分を制御できるように、適切な予防策を講じる必要があります。

StringOrURI A JSON string value, with the additional requirement that while arbitrary string values MAY be used, any value containing a ":" character MUST be a URI [RFC3986]. StringOrURI values are compared as case-sensitive strings with no transformations or canonicalizations applied.

StringOrURI JSON文字列値。任意の文字列値を使用できますが、「:」文字を含む値はすべてURI [RFC3986]である必要があります。 StringOrURI値は、変換または正規化が適用されていない、大文字と小文字を区別する文字列として比較されます。

NumericDate A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. This is equivalent to the IEEE Std 1003.1, 2013 Edition [POSIX.1] definition "Seconds Since the Epoch", in which each day is accounted for by exactly 86400 seconds, other than that non-integer values can be represented. See RFC 3339 [RFC3339] for details regarding date/times in general and UTC in particular.

NumericDate 1970-01-01T00:00:00Z UTCから指定されたUTC日付/時刻までの秒数を表すJSON数値。うるう秒は無視されます。これは、IEEE Std 1003.1、2013 Edition [POSIX.1]の定義「エポックからの秒数」に相当します。この場合、非整数値を表すことができることを除いて、1日は正確に86400秒で占められます。一般的な日付/時刻、特にUTCの詳細については、RFC 3339 [RFC3339]を参照してください。

3. JSON Web Token (JWT) Overview
3. JSON Web Token(JWT)の概要

JWTs represent a set of claims as a JSON object that is encoded in a JWS and/or JWE structure. This JSON object is the JWT Claims Set. As per Section 4 of RFC 7159 [RFC7159], the JSON object consists of zero or more name/value pairs (or members), where the names are strings and the values are arbitrary JSON values. These members are the claims represented by the JWT. This JSON object MAY contain whitespace and/or line breaks before or after any JSON values or structural characters, in accordance with Section 2 of RFC 7159 [RFC7159].

JWTは、JWSまたはJWE構造、あるいはその両方でエンコードされたJSONオブジェクトとして一連のクレームを表します。このJSONオブジェクトはJWTクレームセットです。 RFC 7159 [RFC7159]のセクション4に従って、JSONオブジェクトは0個以上の名前と値のペア(またはメンバー)で構成され、名前は文字列で、値は任意のJSON値です。これらのメンバーは、JWTによって表されるクレームです。このJSONオブジェクトには、RFC 7159 [RFC7159]のセクション2に従って、JSON値または構造文字の前後に空白や改行が含まれる場合があります。

The member names within the JWT Claims Set are referred to as Claim Names. The corresponding values are referred to as Claim Values.

JWTクレームセット内のメンバー名は、クレーム名と呼ばれます。対応する値は、クレーム値と呼ばれます。

The contents of the JOSE Header describe the cryptographic operations applied to the JWT Claims Set. If the JOSE Header is for a JWS, the JWT is represented as a JWS and the claims are digitally signed or MACed, with the JWT Claims Set being the JWS Payload. If the JOSE Header is for a JWE, the JWT is represented as a JWE and the claims are encrypted, with the JWT Claims Set being the plaintext encrypted by the JWE. A JWT may be enclosed in another JWE or JWS structure to create a Nested JWT, enabling nested signing and encryption to be performed.

JOSEヘッダーの内容は、JWTクレームセットに適用される暗号化操作を記述します。 JOSEヘッダーがJWS用である場合、JWTはJWSとして表され、クレームはデジタル署名またはMAC化され、JWTクレームセットはJWSペイロードになります。 JOSEヘッダーがJWE用である場合、JWTはJWEとして表され、クレームは暗号化されます。JWTクレームセットは、JWEによって暗号化されたプレーンテキストです。 JWTを別のJWEまたはJWS構造で囲んでネストJWTを作成すると、ネストされた署名と暗号化を実行できます。

A JWT is represented as a sequence of URL-safe parts separated by period ('.') characters. Each part contains a base64url-encoded value. The number of parts in the JWT is dependent upon the representation of the resulting JWS using the JWS Compact Serialization or JWE using the JWE Compact Serialization.

JWTは、ピリオド( '。')文字で区切られた一連のURLセーフパーツとして表されます。各部分には、base64urlでエンコードされた値が含まれています。 JWTのパーツ数は、JWS Compact Serializationを使用した結果のJWSまたはJWE Compact Serializationを使用したJWEの表現に依存します。

3.1. Example JWT
3.1. JWTの例

The following example JOSE Header declares that the encoded object is a JWT, and the JWT is a JWS that is MACed using the HMAC SHA-256 algorithm:

次のJOSEヘッダーの例では、エンコードされたオブジェクトがJWTであり、JWTがHMAC SHA-256アルゴリズムを使用してMAC化されるJWSであることを宣言しています。

     {"typ":"JWT",
      "alg":"HS256"}
        

To remove potential ambiguities in the representation of the JSON object above, the octet sequence for the actual UTF-8 representation used in this example for the JOSE Header above is also included below. (Note that ambiguities can arise due to differing platform representations of line breaks (CRLF versus LF), differing spacing at the beginning and ends of lines, whether the last line has a terminating line break or not, and other causes. In the representation used in this example, the first line has no leading or trailing spaces, a CRLF line break (13, 10) occurs between the first and second lines, the second line has one leading space (32) and no trailing spaces, and the last line does not have a terminating line break.) The octets representing the UTF-8 representation of the JOSE Header in this example (using JSON array notation) are:

上記のJSONオブジェクトの表現の潜在的な曖昧さを取り除くために、上記のJOSEヘッダーのこの例で使用されている実際のUTF-8表現のオクテットシーケンスも以下に含まれています。 (改行のプラットフォーム表現の違い(CRLFとLF)、行の最初と最後の間隔の違い、最後の行に終端の改行があるかどうか、およびその他の原因により、あいまいさが生じる可能性があることに注意してください。この例では、最初の行に先頭または末尾のスペースがなく、CRLF改行(13、10)が最初の行と2番目の行の間で発生し、2番目の行に先​​頭のスペースが1つ(32)あり、末尾のスペースがなく、最後の行この例では、JOSEヘッダーのUTF-8表現を表すオクテット(JSON配列表記を使用)は次のとおりです。

[123, 34, 116, 121, 112, 34, 58, 34, 74, 87, 84, 34, 44, 13, 10, 32, 34, 97, 108, 103, 34, 58, 34, 72, 83, 50, 53, 54, 34, 125]

「123、 34、 116、 121、 112、 34、 58、 34、 74、 87、 84、 34、 44、 13、 10、 32、 34、 97、 108、 103、 34、 58、 34、 72、 83、 50、 53、 54、 34、 125」

Base64url encoding the octets of the UTF-8 representation of the JOSE Header yields this encoded JOSE Header value:

JOSEヘッダーのUTF-8表現のオクテットをBase64urlエンコードすると、次のエンコードされたJOSEヘッダー値が生成されます。

     eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9
        

The following is an example of a JWT Claims Set:

以下は、JWTクレームセットの例です。

     {"iss":"joe",
      "exp":1300819380,
      "http://example.com/is_root":true}
        

The following octet sequence, which is the UTF-8 representation used in this example for the JWT Claims Set above, is the JWS Payload:

上記のJWTクレームセットのこの例で使用されているUTF-8表現である次のオクテットシーケンスは、JWSペイロードです。

[123, 34, 105, 115, 115, 34, 58, 34, 106, 111, 101, 34, 44, 13, 10, 32, 34, 101, 120, 112, 34, 58, 49, 51, 48, 48, 56, 49, 57, 51, 56, 48, 44, 13, 10, 32, 34, 104, 116, 116, 112, 58, 47, 47, 101, 120, 97, 109, 112, 108, 101, 46, 99, 111, 109, 47, 105, 115, 95, 114, 111, 111, 116, 34, 58, 116, 114, 117, 101, 125] Base64url encoding the JWS Payload yields this encoded JWS Payload (with line breaks for display purposes only):

[123、34、105、115、115、34、58、34、106、111、101、34、44、13、10、32、34、101、120、112、34、58、49、51、48 、48、56、49、57、51、56、48、44、13、10、32、34、104、116、116、112、58、47、47、101、120、97、109、112、108 、101、46、99、111、109、47、105、115、95、114、111、111、116、34、58、116、114、117、101、125] JWSペイロードをエンコードするBase64urlは、このエンコードされたJWSを生成しますペイロード(表示目的でのみ改行あり):

     eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly
     9leGFtcGxlLmNvbS9pc19yb290Ijp0cnVlfQ
        

Computing the MAC of the encoded JOSE Header and encoded JWS Payload with the HMAC SHA-256 algorithm and base64url encoding the HMAC value in the manner specified in [JWS] yields this encoded JWS Signature:

エンコードされたJOSEヘッダーとエンコードされたJWSペイロードのMACをHMAC SHA-256アルゴリズムと[JWS]で指定された方法でHMAC値をエンコードするbase64urlで計算すると、このエンコードされたJWS署名が生成されます。

dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

Concatenating these encoded parts in this order with period ('.') characters between the parts yields this complete JWT (with line breaks for display purposes only):

これらのエンコードされたパーツを、パーツ間にピリオド( '。')文字をこの順序で連結すると、次の完全なJWTが生成されます(表示目的でのみ改行されます)。

eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9 . eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt cGxlLmNvbS9pc19yb290Ijp0cnVlfQ . dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

eyJ0eXAiOiJKV1QiLA0KICJhbGciOiJIUzI1NiJ9。 eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt cGxlLmNvbS9pc19yb290Ijp0cnVlfQ。 dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

This computation is illustrated in more detail in Appendix A.1 of [JWS]. See Appendix A.1 for an example of an encrypted JWT.

この計算については、[JWS]の付録A.1で詳しく説明しています。暗号化されたJWTの例については、付録A.1を参照してください。

4. JWT Claims
4. JWTクレーム

The JWT Claims Set represents a JSON object whose members are the claims conveyed by the JWT. The Claim Names within a JWT Claims Set MUST be unique; JWT parsers MUST either reject JWTs with duplicate Claim Names or use a JSON parser that returns only the lexically last duplicate member name, as specified in Section 15.12 ("The JSON Object") of ECMAScript 5.1 [ECMAScript].

JWTクレームセットは、JWTによって伝えられるクレームをメンバーとするJSONオブジェクトを表します。 JWTクレームセット内のクレーム名は一意である必要があります。 JWTパーサーは、クレーム名が重複するJWTを拒否するか、ECMAScript 5.1 [ECMAScript]のセクション15.12(「JSONオブジェクト」)で指定されているように、字句的に最後の重複メンバー名のみを返すJSONパーサーを使用する必要があります。

The set of claims 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 claims in particular ways. However, in the absence of such requirements, all claims that are not understood by implementations MUST be ignored.

有効と見なされるためにJWTに含まれる必要がある一連のクレームは、コンテキストに依存し、この仕様の範囲外です。 JWTの特定のアプリケーションでは、いくつかのクレームを特定の方法で理解および処理するための実装が必要になります。ただし、そのような要件がない場合、実装で理解されないすべてのクレームは無視する必要があります。

There are three classes of JWT Claim Names: Registered Claim Names, Public Claim Names, and Private Claim Names.

JWTクレーム名には、登録済みクレーム名、パブリッククレーム名、プライベートクレーム名の3つのクラスがあります。

4.1. Registered Claim Names
4.1. 登録されているクレーム名

The following Claim Names are registered in the IANA "JSON Web Token Claims" registry established by Section 10.1. None of the claims defined below are intended to be mandatory to use or implement in all cases, but rather they provide a starting point for a set of useful, interoperable claims. Applications using JWTs should define which specific claims they use and when they are required or optional. All the names are short because a core goal of JWTs is for the representation to be compact.

次のクレーム名は、セクション10.1によって確立されたIANA「JSON Web Token Claims」レジストリに登録されています。以下に定義するクレームはすべての場合に使用または実装することを強制することを意図したものではなく、有用で相互運用可能なクレームのセットの開始点を提供します。 JWTを使用するアプリケーションは、使用する特定のクレームと、それらが必須またはオプションの場合を定義する必要があります。 JWTの主要な目的は表現をコンパクトにすることであるため、すべての名前は短くなっています。

4.1.1. "iss" (Issuer) Claim
4.1.1. 「iss」(発行者)の主張

The "iss" (issuer) claim identifies the principal that issued the JWT. The processing of this claim is generally application specific. The "iss" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL.

"iss"(発行者)クレームは、JWTを発行したプリンシパルを識別します。このクレームの処理は、一般にアプリケーション固有です。 「iss」値は、StringOrURI値を含む大文字と小文字が区別される文字列です。このクレームの使用はオプションです。

4.1.2. "sub" (Subject) Claim
4.1.2. 「sub」(件名)の申し立て

The "sub" (subject) claim identifies the principal that is the subject of the JWT. The claims in a JWT are normally statements about the subject. The subject value MUST either be scoped to be locally unique in the context of the issuer or be globally unique. The processing of this claim is generally application specific. The "sub" value is a case-sensitive string containing a StringOrURI value. Use of this claim is OPTIONAL.

"sub"(サブジェクト)クレームは、JWTのサブジェクトであるプリンシパルを識別します。 JWTのクレームは通常、主題に関する記述です。サブジェクトの値は、発行者のコンテキストでローカルに一意であるか、グローバルに一意である必要があります。このクレームの処理は、一般にアプリケーション固有です。 「sub」の値は、StringOrURI値を含む大文字と小文字が区別される文字列です。このクレームの使用はオプションです。

4.1.3. "aud" (Audience) Claim
4.1.3. 「aud」(オーディエンス)クレーム

The "aud" (audience) claim identifies the recipients that the JWT is intended for. Each principal intended to process the JWT MUST identify itself with a value in the audience claim. If the principal processing the claim does not identify itself with a value in the "aud" claim when this claim is present, then the JWT MUST be rejected. In the general case, the "aud" value is an array of case-sensitive strings, each containing a StringOrURI value. In the special case when the JWT has one audience, the "aud" value MAY be a single case-sensitive string containing a StringOrURI value. The interpretation of audience values is generally application specific. Use of this claim is OPTIONAL.

"aud"(audience)クレームは、JWTの対象となる受信者を識別します。 JWTを処理することを目的とした各プリンシパルは、オーディエンスクレームの値で自身を識別しなければなりません。このクレームが存在するときに、クレームを処理するプリンシパルが「aud」クレームの値で自分自身を識別しない場合、JWTは拒否される必要があります。一般的なケースでは、「aud」値は、それぞれがStringOrURI値を含む、大文字と小文字を区別する文字列の配列です。 JWTが1つのオーディエンスを持つ特殊なケースでは、「aud」値は、StringOrURI値を含む単一の大文字と小文字を区別する文字列である場合があります。オーディエンス値の解釈は、一般にアプリケーション固有です。このクレームの使用はオプションです。

4.1.4. "exp" (Expiration Time) Claim
4.1.4. "exp"(有効期限)クレーム

The "exp" (expiration time) claim identifies the expiration time on or after which the JWT MUST NOT be accepted for processing. The processing of the "exp" claim requires that the current date/time MUST be before the expiration date/time listed in the "exp" claim.

「exp」(有効期限)クレームは、JWTが処理のために受け入れられてはならない有効期限を識別します。 「exp」クレームの処理では、現在の日付/時刻が「exp」クレームにリストされている有効期限の日付/時刻より前でなければならない(MUST)。

Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. Its value MUST be a number containing a NumericDate value. Use of this claim is OPTIONAL.

実装者は、クロックスキューを考慮するために、通常は数分以内の多少の余裕を提供できます(MAY)。その値は、NumericDate値を含む数値でなければなりません。このクレームの使用はオプションです。

4.1.5. "nbf" (Not Before) Claim
4.1.5. "nbf"(以前ではない)クレーム

The "nbf" (not before) claim identifies the time before which the JWT MUST NOT be accepted for processing. The processing of the "nbf" claim requires that the current date/time MUST be after or equal to the not-before date/time listed in the "nbf" claim. Implementers MAY provide for some small leeway, usually no more than a few minutes, to account for clock skew. Its value MUST be a number containing a NumericDate value. Use of this claim is OPTIONAL.

「前」ではなく「nbf」クレームは、JWTが処理のために受け入れられてはならない時間を識別します。 「nbf」クレームの処理では、現在の日付/時刻が、「nbf」クレームにリストされている前の日付/時刻以降である必要があります。実装者は、クロックスキューを考慮するために、通常は数分以内の多少の余裕を提供できます(MAY)。その値は、NumericDate値を含む数値でなければなりません。このクレームの使用はオプションです。

4.1.6. "iat" (Issued At) Claim
4.1.6. 「iat」(発行場所)クレーム

The "iat" (issued at) claim identifies the time at which the JWT was issued. This claim can be used to determine the age of the JWT. Its value MUST be a number containing a NumericDate value. Use of this claim is OPTIONAL.

「発行」された「iat」クレームは、JWTが発行された時間を識別します。このクレームは、JWTの古さを判別するために使用できます。その値は、NumericDate値を含む数値でなければなりません。このクレームの使用はオプションです。

4.1.7. "jti" (JWT ID) Claim
4.1.7. "jti"(JWT ID)クレーム

The "jti" (JWT ID) claim provides a unique identifier for the JWT. The identifier value MUST be assigned in a manner that ensures that there is a negligible probability that the same value will be accidentally assigned to a different data object; if the application uses multiple issuers, collisions MUST be prevented among values produced by different issuers as well. The "jti" claim can be used to prevent the JWT from being replayed. The "jti" value is a case-sensitive string. Use of this claim is OPTIONAL.

「jti」(JWT ID)クレームは、JWTの一意の識別子を提供します。識別子の値は、同じ値が別のデータオブジェクトに誤って割り当てられる可能性が無視できる程度であることを保証する方法で割り当てる必要があります。アプリケーションが複数の発行者を使用する場合、異なる発行者によって生成された値間の衝突も防止する必要があります。 「jti」クレームは、JWTが再生されないようにするために使用できます。 「jti」値は、大文字と小文字が区別される文字列です。このクレームの使用はオプションです。

4.2. Public Claim Names
4.2. パブリッククレーム名

Claim Names can be defined at will by those using JWTs. However, in order to prevent collisions, any new Claim Name should either be registered in the IANA "JSON Web Token Claims" registry established by Section 10.1 or be a Public Name: a value that contains a Collision-Resistant Name. In each case, the definer of the name or value needs to take reasonable precautions to make sure they are in control of the part of the namespace they use to define the Claim Name.

クレーム名は、JWTを使用するユーザーが自由に定義できます。ただし、衝突を防ぐために、新しいクレーム名は、セクション10.1によって確立されたIANA "JSON Web Token Claims"レジストリーに登録するか、パブリック名(衝突防止名を含む値)にする必要があります。いずれの場合も、名前または値の定義者は、妥当な予防策を講じて、クレーム名の定義に使用する名前空間の一部を制御できるようにする必要があります。

4.3. Private Claim Names
4.3. プライベートクレーム名

A producer and consumer of a JWT MAY agree to use Claim Names that are Private Names: names that are not Registered Claim Names (Section 4.1) or Public Claim Names (Section 4.2). Unlike Public

JWTのプロデューサーとコンシューマーは、プライベートネームであるクレーム名を使用することに同意する場合があります。登録されたクレーム名(セクション4.1)またはパブリッククレーム名(セクション4.2)ではない名前です。パブリックとは異なり

Claim Names, Private Claim Names are subject to collision and should be used with caution.

クレーム名、プライベートクレーム名は衝突する可能性があり、注意して使用する必要があります。

5. JOSE Header
5. JOSEヘッダー

For a JWT object, the members of the JSON object represented by the JOSE Header describe the cryptographic operations applied to the JWT and optionally, additional properties of the JWT. Depending upon whether the JWT is a JWS or JWE, the corresponding rules for the JOSE Header values apply.

JWTオブジェクトの場合、JOSEヘッダーで表されるJSONオブジェクトのメンバーは、JWTに適用される暗号操作と、オプションでJWTの追加プロパティを記述します。 JWTがJWSであるかJWEであるかに応じて、JOSEヘッダー値に対応するルールが適用されます。

This specification further specifies the use of the following Header Parameters in both the cases where the JWT is a JWS and where it is a JWE.

この仕様は、JWTがJWSである場合とJWEである場合の両方で、次のヘッダーパラメータの使用をさらに指定します。

5.1. "typ" (Type) Header Parameter
5.1. "typ"(タイプ)ヘッダーパラメータ

The "typ" (type) Header Parameter defined by [JWS] and [JWE] is used by JWT applications to declare the media type [IANA.MediaTypes] of this complete JWT. This is intended for use by the JWT application when values that are not JWTs could also be present in an application data structure that can contain a JWT object; the application can use this value to disambiguate among the different kinds of objects that might be present. It will typically not be used by applications when it is already known that the object is a JWT. This parameter is ignored by JWT implementations; any processing of this parameter is performed by the JWT application. If present, it is RECOMMENDED that its value be "JWT" to indicate that this object is a JWT. While media type names are not case sensitive, it is RECOMMENDED that "JWT" always be spelled using uppercase characters for compatibility with legacy implementations. Use of this Header Parameter is OPTIONAL.

[JWS]および[JWE]によって定義された「typ」(タイプ)ヘッダーパラメータは、この完全なJWTのメディアタイプ[IANA.MediaTypes]を宣言するためにJWTアプリケーションによって使用されます。これは、JWTではない値が、JWTオブジェクトを含むことができるアプリケーションデータ構造にも存在する可能性がある場合に、JWTアプリケーションで使用することを目的としています。アプリケーションはこの値を使用して、存在する可能性のあるさまざまな種類のオブジェクトを明確化できます。オブジェクトがJWTであることがすでにわかっている場合は、通常、アプリケーションで使用されません。このパラメーターは、JWT実装では無視されます。このパラメーターの処理はすべて、JWTアプリケーションによって実行されます。存在する場合、その値が「JWT」であり、このオブジェクトがJWTであることを示すことが推奨されます。メディアタイプ名は大文字と小文字が区別されませんが、レガシー実装との互換性のために、「JWT」は常に大文字を使用して綴ることをお勧めします。このヘッダーパラメータの使用はオプションです。

5.2. "cty" (Content Type) Header Parameter
5.2. "cty"(コンテンツタイプ)ヘッダーパラメーター

The "cty" (content type) Header Parameter defined by [JWS] and [JWE] is used by this specification to convey structural information about the JWT.

[JWS]および[JWE]によって定義された「cty」(コンテンツタイプ)ヘッダーパラメータは、JWTに関する構造情報を伝えるためにこの仕様で使用されます。

In the normal case in which nested signing or encryption operations are not employed, the use of this Header Parameter is NOT RECOMMENDED. In the case that nested signing or encryption is employed, this Header Parameter MUST be present; in this case, the value MUST be "JWT", to indicate that a Nested JWT is carried in this JWT. While media type names are not case sensitive, it is RECOMMENDED that "JWT" always be spelled using uppercase characters for compatibility with legacy implementations. See Appendix A.2 for an example of a Nested JWT.

ネストされた署名または暗号化操作が採用されていない通常の場合、このヘッダーパラメータの使用は推奨されません。ネストされた署名または暗号化が採用されている場合、このヘッダーパラメータが存在する必要があります。この場合、値は「JWT」でなければならず、ネストされたJWTがこのJWTで運ばれることを示します。メディアタイプ名は大文字と小文字が区別されませんが、レガシー実装との互換性のために、「JWT」は常に大文字を使用して綴ることをお勧めします。ネストされたJWTの例については、付録A.2を参照してください。

5.3. Replicating Claims as Header Parameters
5.3. ヘッダーパラメーターとしてのクレームの複製

In some applications using encrypted JWTs, it is useful to have an unencrypted representation of some claims. This might be used, for instance, in application processing rules to determine whether and how to process the JWT before it is decrypted.

暗号化されたJWTを使用する一部のアプリケーションでは、一部のクレームの暗号化されていない表現があると便利です。これは、たとえば、アプリケーション処理ルールで使用され、JWTが復号化される前に、JWTを処理するかどうか、およびどのように処理するかを決定します。

This specification allows claims present in the JWT Claims Set to be replicated as Header Parameters in a JWT that is a JWE, as needed by the application. If such replicated claims are present, the application receiving them SHOULD verify that their values are identical, unless the application defines other specific processing rules for these claims. It is the responsibility of the application to ensure that only claims that are safe to be transmitted in an unencrypted manner are replicated as Header Parameter values in the JWT.

この仕様により、JWTクレームセットに存在するクレームを、アプリケーションの必要に応じて、JWEであるJWTのヘッダーパラメーターとして複製できます。そのような複製されたクレームが存在する場合、それらを受け取るアプリケーションは、アプリケーションがこれらのクレームに対して他の特定の処理規則を定義しない限り、それらの値が同一であることを確認する必要があります。暗号化されていない方法で安全に送信できるクレームのみがJWTのヘッダーパラメーター値として複製されるようにするのは、アプリケーションの責任です。

Section 10.4.1 of this specification registers the "iss" (issuer), "sub" (subject), and "aud" (audience) Header Parameter names for the purpose of providing unencrypted replicas of these claims in encrypted JWTs for applications that need them. Other specifications MAY similarly register other names that are registered Claim Names as Header Parameter names, as needed.

この仕様のセクション10.4.1は、必要なアプリケーションの暗号化されたJWTでこれらのクレームの非暗号化レプリカを提供する目的で、「iss」(発行者)、「sub」(件名)、および「aud」(オーディエンス)ヘッダーパラメーター名を登録します。それら。他の仕様は、必要に応じて、ヘッダーパラメーター名として登録されたクレーム名である他の名前を同様に登録できます。

6. Unsecured JWTs
6. 保護されていないJWT

To support use cases in which the JWT content is secured by a means other than a signature and/or encryption contained within the JWT (such as a signature on a data structure containing the JWT), JWTs MAY also be created without a signature or encryption. An Unsecured JWT is a JWS using the "alg" Header Parameter value "none" and with the empty string for its JWS Signature value, as defined in the JWA specification [JWA]; it is an Unsecured JWS with the JWT Claims Set as its JWS Payload.

JWT内に含まれる署名や暗号化以外の手段(JWTを含むデータ構造の署名など​​)によってJWTコンテンツが保護される使用例をサポートするために、署名や暗号化なしでJWTを作成することもできます(MAY) 。非セキュアJWTは、JAL仕様[JWA]で定義されているように、「alg」ヘッダーパラメーター値「none」を使用し、JWS署名値に空の文字列を使用するJWSです。これは、JWSクレームがJWSペイロードとして設定された、セキュリティで保護されていないJWSです。

6.1. Example Unsecured JWT
6.1. 安全でないJWTの例

The following example JOSE Header declares that the encoded object is an Unsecured JWT:

次の例のJOSEヘッダーは、エンコードされたオブジェクトが非セキュアJWTであることを宣言しています。

     {"alg":"none"}
        

Base64url encoding the octets of the UTF-8 representation of the JOSE Header yields this encoded JOSE Header value:

JOSEヘッダーのUTF-8表現のオクテットをBase64urlエンコードすると、次のエンコードされたJOSEヘッダー値が生成されます。

eyJhbGciOiJub25lIn0

eyJhbGciOiJub25lIn0

The following is an example of a JWT Claims Set:

以下は、JWTクレームセットの例です。

     {"iss":"joe",
      "exp":1300819380,
      "http://example.com/is_root":true}
        

Base64url encoding the octets of the UTF-8 representation of the JWT Claims Set yields this encoded JWS Payload (with line breaks for display purposes only):

JWTクレームセットのUTF-8表現のオクテットをBase64urlエンコードすると、このエンコードされたJWSペイロードが生成されます(表示目的でのみ改行されます)。

eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt cGxlLmNvbS9pc19yb290Ijp0cnVlfQ

eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt cGxlLmNvbS9pc19yb290Ijp0cnVlfQ

The encoded JWS Signature is the empty string.

エンコードされたJWS署名は空の文字列です。

Concatenating these encoded parts in this order with period ('.') characters between the parts yields this complete JWT (with line breaks for display purposes only):

これらのエンコードされたパーツを、パーツ間にピリオド( '。')文字をこの順序で連結すると、次の完全なJWTが生成されます(表示目的でのみ改行されます)。

eyJhbGciOiJub25lIn0 . eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt cGxlLmNvbS9pc19yb290Ijp0cnVlfQ .

eyJhbGciOiJub25lIn0。 eyJpc3MiOiJqb2UiLA0KICJleHAiOjEzMDA4MTkzODAsDQogImh0dHA6Ly9leGFt cGxlLmNvbS9pc19yb290Ijp0cnVlfQ。

7. Creating and Validating JWTs
7. JWTの作成と検証
7.1. Creating a JWT
7.1. JWTの作成

To create a JWT, the following steps are performed. The order of the steps is not significant in cases where there are no dependencies between the inputs and outputs of the steps.

JWTを作成するには、次の手順を実行します。ステップの入力と出力の間に依存関係がない場合、ステップの順序は重要ではありません。

1. Create a JWT Claims Set containing the desired claims. Note that whitespace is explicitly allowed in the representation and no canonicalization need be performed before encoding.

1. 目的のクレームを含むJWTクレームセットを作成します。表現では空白が明示的に許可されており、エンコードの前に正規化を実行する必要がないことに注意してください。

2. Let the Message be the octets of the UTF-8 representation of the JWT Claims Set.

2. メッセージを、JWTクレームセットのUTF-8表現のオクテットとします。

3. Create a JOSE Header containing the desired set of Header Parameters. The JWT MUST conform to either the [JWS] or [JWE] specification. Note that whitespace is explicitly allowed in the representation and no canonicalization need be performed before encoding.

3. 必要なヘッダーパラメータのセットを含むJOSEヘッダーを作成します。 JWTは、[JWS]または[JWE]仕様のいずれかに準拠する必要があります。表現では空白が明示的に許可されており、エンコードの前に正規化を実行する必要がないことに注意してください。

4. Depending upon whether the JWT is a JWS or JWE, there are two cases:

4. JWTがJWSかJWEかによって、2つのケースがあります。

* If the JWT is a JWS, create a JWS using the Message as the JWS Payload; all steps specified in [JWS] for creating a JWS MUST be followed.

* JWTがJWSの場合、メッセージをJWSペイロードとして使用してJWSを作成します。 [JWS]でJWSを作成するために指定されたすべての手順に従う必要があります。

* Else, if the JWT is a JWE, create a JWE using the Message as the plaintext for the JWE; all steps specified in [JWE] for creating a JWE MUST be followed.

* それ以外の場合、JWTがJWEの場合は、メッセージをJWEのプレーンテキストとして使用してJWEを作成します。 [JWE]でJWEを作成するために指定されたすべての手順に従う必要があります。

5. If a nested signing or encryption operation will be performed, let the Message be the JWS or JWE, and return to Step 3, using a "cty" (content type) value of "JWT" in the new JOSE Header created in that step.

5. ネストされた署名または暗号化操作が実行される場合は、メッセージをJWSまたはJWEにして、そのステップで作成された新しいJOSEヘッダーの「cty」(コンテンツタイプ)値「JWT」を使用してステップ3に戻ります。

6. Otherwise, let the resulting JWT be the JWS or JWE.

6. それ以外の場合は、結果のJWTをJWSまたはJWEにします。

7.2. Validating a JWT
7.2. JWTの検証

When validating a JWT, the following steps are performed. The order of the steps is not significant in cases where there are no dependencies between the inputs and outputs of the steps. If any of the listed steps fail, then the JWT MUST be rejected -- that is, treated by the application as an invalid input.

JWTを検証する場合、次の手順が実行されます。ステップの入力と出力の間に依存関係がない場合、ステップの順序は重要ではありません。リストされたステップのいずれかが失敗した場合、JWTは拒否されなければなりません(つまり、アプリケーションでは無効な入力として扱われます)。

1. Verify that the JWT contains at least one period ('.') character.

1. JWTに少なくとも1つのピリオド( '。')文字が含まれていることを確認してください。

2. Let the Encoded JOSE Header be the portion of the JWT before the first period ('.') character.

2. エンコードされたJOSEヘッダーを、最初のピリオド( '。')文字の前のJWTの部分とします。

3. Base64url decode the Encoded JOSE Header following the restriction that no line breaks, whitespace, or other additional characters have been used.

3. Base64urlは、改行、空白、その他の追加文字が使用されていないという制限に従って、エンコードされたJOSEヘッダーをデコードします。

4. Verify that the resulting octet sequence is a UTF-8-encoded representation of a completely valid JSON object conforming to RFC 7159 [RFC7159]; let the JOSE Header be this JSON object.

4. 結果のオクテットシーケンスが、RFC 7159 [RFC7159]に準拠した完全に有効なJSONオブジェクトのUTF-8エンコード表現であることを確認します。 JOSEヘッダーをこのJSONオブジェクトにします。

5. Verify that the resulting JOSE Header includes only parameters and values whose syntax and semantics are both understood and supported or that are specified as being ignored when not understood.

5. 結果のJOSEヘッダーに、構文とセマンティクスの両方が理解およびサポートされているか、理解されていない場合に無視するように指定されているパラメーターと値のみが含まれていることを確認します。

6. Determine whether the JWT is a JWS or a JWE using any of the methods described in Section 9 of [JWE].

6. [JWE]のセクション9で説明されている方法のいずれかを使用して、JWTがJWSであるかJWEであるかを判断します。

7. Depending upon whether the JWT is a JWS or JWE, there are two cases:

7. JWTがJWSかJWEかによって、2つのケースがあります。

* If the JWT is a JWS, follow the steps specified in [JWS] for validating a JWS. Let the Message be the result of base64url decoding the JWS Payload.

* JWTがJWSの場合は、[JWS]で指定された手順に従ってJWSを検証します。 MessageをJWSペイロードをデコードしたbase64urlの結果とします。

* Else, if the JWT is a JWE, follow the steps specified in [JWE] for validating a JWE. Let the Message be the resulting plaintext.

* それ以外の場合、JWTがJWEの場合、[JWE]で指定された手順に従ってJWEを検証します。メッセージを結果の平文にします。

8. If the JOSE Header contains a "cty" (content type) value of "JWT", then the Message is a JWT that was the subject of nested signing or encryption operations. In this case, return to Step 1, using the Message as the JWT.

8. JOSEヘッダーに「cty」(コンテンツタイプ)値「JWT」が含まれている場合、メッセージはネストされた署名または暗号化操作の対象となったJWTです。この場合、メッセージをJWTとして使用してステップ1に戻ります。

9. Otherwise, base64url decode the Message following the restriction that no line breaks, whitespace, or other additional characters have been used.

9. それ以外の場合、base64urlは、改行、空白、またはその他の追加文字が使用されていないという制限に従ってメッセージをデコードします。

10. Verify that the resulting octet sequence is a UTF-8-encoded representation of a completely valid JSON object conforming to RFC 7159 [RFC7159]; let the JWT Claims Set be this JSON object.

10. 結果のオクテットシーケンスが、RFC 7159 [RFC7159]に準拠した完全に有効なJSONオブジェクトのUTF-8エンコード表現であることを確認します。 JWTクレームセットをこのJSONオブジェクトにします。

Finally, note that it is an application decision which algorithms may be used in a given context. Even if a JWT can be successfully validated, unless the algorithms used in the JWT are acceptable to the application, it SHOULD reject the JWT.

最後に、特定のコンテキストで使用できるアルゴリズムはアプリケーションの決定であることに注意してください。 JWTを正常に検証できたとしても、JWTで使用されているアルゴリズムがアプリケーションに受け入れられない限り、JWTを拒否する必要があります。

7.3. String Comparison Rules
7.3. 文字列比較ルール

Processing a JWT inevitably requires comparing known strings to members and values in JSON objects. For example, in checking what the algorithm is, the Unicode [UNICODE] string encoding "alg" will be checked against the member names in the JOSE Header to see if there is a matching Header Parameter name.

JWTの処理では、必然的に、既知の文字列をJSONオブジェクトのメンバーおよび値と比較する必要があります。たとえば、アルゴリズムのチェックでは、Unicode [UNICODE]文字列エンコーディング「alg」がJOSEヘッダーのメンバー名と照合され、一致するヘッダーパラメーター名があるかどうかが確認されます。

The JSON rules for doing member name comparison are described in Section 8.3 of RFC 7159 [RFC7159]. Since the only string comparison operations that are performed are equality and inequality, the same rules can be used for comparing both member names and member values against known strings.

メンバー名の比較を行うためのJSONルールについては、RFC 7159 [RFC7159]のセクション8.3で説明されています。実行される文字列比較演算は等値と不等式だけなので、同じ規則を使用して、メンバー名とメンバー値の両方を既知の文字列と比較できます。

These comparison rules MUST be used for all JSON string comparisons except in cases where the definition of the member explicitly calls out that a different comparison rule is to be used for that member value. In this specification, only the "typ" and "cty" member values do not use these comparison rules.

これらの比較規則は、メンバーの定義がそのメンバー値に異なる比較規則を使用することを明示的に要求する場合を除いて、すべてのJSON文字列比較に使用する必要があります。この仕様では、「typ」および「cty」メンバー値のみがこれらの比較規則を使用しません。

Some applications may include case-insensitive information in a case-sensitive value, such as including a DNS name as part of the "iss" (issuer) claim value. In those cases, the application may need to define a convention for the canonical case to use for representing the case-insensitive portions, such as lowercasing them, if more than one party might need to produce the same value so that they can be compared. (However, if all other parties consume whatever value the producing party emitted verbatim without attempting to compare it to an independently produced value, then the case used by the producer will not matter.)

一部のアプリケーションでは、DNS名を "iss"(発行者)クレーム値の一部として含めるなど、大文字と小文字を区別する値に大文字と小文字を区別しない情報を含める場合があります。これらのケースでは、複数のパーティが同じ値を生成して比較できるようにする必要がある場合、アプリケーションは、大文字と小文字を区別しない部分を表すために使用する正規のケースの規則を定義する必要がある場合があります。 (ただし、他のすべての当事者が独自に生成した値と比較しようとせずに、生産者が逐語的に放出した値を消費する場合、プロデューサーが使用するケースは問題になりません。)

8. Implementation Requirements
8. 実装要件

This section defines which algorithms and features of this specification are mandatory to implement. Applications using this specification can impose additional requirements upon implementations that they use. For instance, one application might require support for encrypted JWTs and Nested JWTs, while another might require support for signing JWTs with the Elliptic Curve Digital Signature Algorithm (ECDSA) using the P-256 curve and the SHA-256 hash algorithm ("ES256").

このセクションでは、この仕様の実装に必須のアルゴリズムと機能を定義します。この仕様を使用するアプリケーションは、使用する実装に追加の要件を課すことができます。たとえば、1つのアプリケーションが暗号化されたJWTとネストされたJWTのサポートを必要とする一方で、別のアプリケーションはP-256曲線とSHA-256ハッシュアルゴリズム( "ES256"を使用した楕円曲線デジタル署名アルゴリズム(ECDSA)を使用したJWTへの署名のサポートを必要とする場合があります。 )。

Of the signature and MAC algorithms specified in JSON Web Algorithms [JWA], only HMAC SHA-256 ("HS256") and "none" MUST be implemented by conforming JWT implementations. It is RECOMMENDED that implementations also support RSASSA-PKCS1-v1_5 with the SHA-256 hash algorithm ("RS256") and ECDSA using the P-256 curve and the SHA-256 hash algorithm ("ES256"). Support for other algorithms and key sizes is OPTIONAL.

JSON Web Algorithms [JWA]で指定されている署名とMACアルゴリズムのうち、HMAC SHA-256( "HS256")と "none"のみを、準拠するJWT実装で実装する必要があります。実装は、SHA-256ハッシュアルゴリズム( "RS256")を使用したRSASSA-PKCS1-v1_5と、P-256曲線とSHA-256ハッシュアルゴリズム( "ES256")を使用したECDSAもサポートすることをお勧めします。他のアルゴリズムとキーサイズのサポートはオプションです。

Support for encrypted JWTs is OPTIONAL. If an implementation provides encryption capabilities, of the encryption algorithms specified in [JWA], only RSAES-PKCS1-v1_5 with 2048-bit keys ("RSA1_5"), AES Key Wrap with 128- and 256-bit keys ("A128KW" and "A256KW"), and the composite authenticated encryption algorithm using AES-CBC and HMAC SHA-2 ("A128CBC-HS256" and "A256CBC-HS512") MUST be implemented by conforming implementations. It is RECOMMENDED that implementations also support using Elliptic Curve Diffie-Hellman Ephemeral Static (ECDH-ES) to agree upon a key used to wrap the Content Encryption Key ("ECDH-ES+A128KW" and "ECDH-ES+A256KW") and AES in Galois/Counter Mode (GCM) with 128- and 256-bit keys ("A128GCM" and "A256GCM"). Support for other algorithms and key sizes is OPTIONAL.

暗号化されたJWTのサポートはオプションです。実装が暗号化機能を提供する場合、[JWA]で指定された暗号化アルゴリズムのうち、2048ビットキー( "RSA1_5")のRSAES-PKCS1-v1_5、128ビットおよび256ビットキーの "AESキーラップ(" A128KW "および"A256KW")、およびAES-CBCとHMAC SHA-2( "A128CBC-HS256"および "A256CBC-HS512")を使用する複合認証暗号化アルゴリズムは、準拠する実装によって実装する必要があります。実装では、楕円曲線Diffie-Hellman Ephemeral Static(ECDH-ES)を使用して、コンテンツ暗号化キー( "ECDH-ES + A128KW"および "ECDH-ES + A256KW")をラップするために使用されるキーに同意することもサポートすることをお勧めします。ガロア/カウンターモード(GCM)のAES、128ビットおよび256ビットキー(「A128GCM」および「A256GCM」)。他のアルゴリズムとキーサイズのサポートはオプションです。

Support for Nested JWTs is OPTIONAL.

ネストされたJWTのサポートはオプションです。

9. URI for Declaring that Content is a JWT
9. コンテンツがJWTであることを宣言するためのURI

This specification registers the URN "urn:ietf:params:oauth:token-type:jwt" for use by applications that declare content types using URIs (rather than, for instance, media types) to indicate that the content referred to is a JWT.

この仕様は、URN "urn:ietf:params:oauth:token-type:jwt"を登録して、(たとえば、メディアタイプではなく)URIを使用してコンテンツタイプを宣言し、参照されるコンテンツがJWTであることを示すアプリケーションが使用できるようにします。 。

10. IANA Considerations
10. IANAに関する考慮事項
10.1. JSON Web Token Claims Registry
10.1. JSON Web Token Claims Registry

This section establishes the IANA "JSON Web Token Claims" registry for JWT Claim Names. The registry records the Claim Name and a reference to the specification that defines it. This section registers the Claim Names defined in Section 4.1.

このセクションでは、JWTクレーム名のIANA "JSON Web Token Claims"レジストリーを確立します。レジストリは、クレーム名とそれを定義する仕様への参照を記録します。このセクションは、セクション4.1で定義されたクレーム名を登録します。

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.

値は、1名以上のDesignated Expertsの助言により、jwt-reg-review @ ietf.orgメーリングリストで3週間のレビュー期間の後に、Specification Required [RFC5226]ベースで登録されます。ただし、公開前に値を割り当てることを可能にするために、指定された専門家は、そのような仕様が公開されることを納得したら、登録を承認することができます。

Registration requests sent to the mailing list for review should use an appropriate subject (e.g., "Request to register claim: example").

確認のためにメーリングリストに送信される登録リクエストでは、適切な件名を使用する必要があります(「リクエストの登録リクエスト:例」など)。

Within the review period, the Designated Experts 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. 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.

レビュー期間内に、Designated Expertsは登録リクエストを承認または拒否し、この決定をレビューリストとIANAに通知します。拒否には、要求を成功させる方法についての説明と、該当する場合は提案を含める必要があります。 21日よりも長い期間未確定の登録要求は、解決のために(iesg@ietf.orgメーリングリストを使用して)IESGに通知することができます。

Criteria that should be applied by the Designated Experts includes determining whether the proposed registration duplicates existing functionality, whether it is likely to be of general applicability or whether it is useful only for a single application, and whether the registration description is clear.

Designated Expertsが適用する必要がある基準には、提案された登録が既存の機能を複製するかどうか、一般的に適用できるかどうか、単一のアプリケーションにのみ役立つかどうか、および登録の説明が明確かどうかの決定が含まれます。

IANA must only accept registry updates from the Designated Experts and should direct all requests for registration to the review mailing list.

IANAは、Designated Expertsからのレジストリの更新のみを受け入れ、登録のすべてのリクエストをレビューメーリングリストに転送する必要があります。

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.

広範囲にわたる情報に基づいた登録決定のレビューを可能にするために、この仕様を使用してさまざまなアプリケーションの見通しを表すことができる複数の指定専門家を任命することをお勧めします。登録の決定が特定のエキスパートの利益相反を生み出すものとして認識される可能性がある場合、そのエキスパートは他のエキスパートの判断を延期する必要があります。

10.1.1. Registration Template
10.1.1. 登録テンプレート

Claim Name: The name requested (e.g., "iss"). Because a core goal of this specification is for the resulting representations to be compact, it is RECOMMENDED that the name be short -- that is, not to exceed 8 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.

クレーム名:要求された名前(「iss」など)。この仕様の中心的な目標は、結果の表現をコンパクトにすることなので、名前は短くすること、つまり、やむを得ない理由がない限り8文字を超えないようにすることをお勧めします。この名前は大文字と小文字が区別されます。指定された専門家が例外を許可するやむを得ない理由があると述べない限り、名前は大文字と小文字を区別しない方法で他の登録名と一致しない場合があります。

Claim Description: Brief description of the claim (e.g., "Issuer").

クレームの説明:クレームの簡単な説明(「発行者」など)。

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.

変更管理者:Standards Track RFCsについては、「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.

仕様ドキュメント:パラメータを指定する1つまたは複数のドキュメントへの参照。できれば、ドキュメントのコピーを取得するために使用できるURIを含む。関連セクションの表示も含まれる場合がありますが、必須ではありません。

10.1.2. Initial Registry Contents
10.1.2. レジストリの初期内容

o Claim Name: "iss" o Claim Description: Issuer o Change Controller: IESG o Specification Document(s): Section 4.1.1 of RFC 7519

o クレーム名:「iss」oクレームの説明:発行者o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.1

o Claim Name: "sub" o Claim Description: Subject o Change Controller: IESG o Specification Document(s): Section 4.1.2 of RFC 7519

o クレーム名:「sub」oクレームの説明:件名o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.2

o Claim Name: "aud" o Claim Description: Audience o Change Controller: IESG o Specification Document(s): Section 4.1.3 of RFC 7519

o クレーム名:「aud」oクレームの説明:対象者o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.3

o Claim Name: "exp" o Claim Description: Expiration Time o Change Controller: IESG o Specification Document(s): Section 4.1.4 of RFC 7519

o クレーム名:「exp」oクレームの説明:有効期限o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.4

o Claim Name: "nbf" o Claim Description: Not Before o Change Controller: IESG o Specification Document(s): Section 4.1.5 of RFC 7519

o クレーム名:「nbf」oクレームの説明:以前ではないo変更管理者:IESG o仕様書:RFC 7519のセクション4.1.5

o Claim Name: "iat" o Claim Description: Issued At o Change Controller: IESG o Specification Document(s): Section 4.1.6 of RFC 7519

o クレーム名:「iat」oクレームの説明:発行日時o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.6

o Claim Name: "jti" o Claim Description: JWT ID o Change Controller: IESG o Specification Document(s): Section 4.1.7 of RFC 7519

o クレーム名:「jti」oクレームの説明:JWT ID o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.7

10.2.  Sub-Namespace Registration of
       urn:ietf:params:oauth:token-type:jwt
        
10.2.1. Registry Contents
10.2.1. レジストリの内容

This section registers the value "token-type:jwt" in the IANA "OAuth URI" registry established by "An IETF URN Sub-Namespace for OAuth" [RFC6755], which can be used to indicate that the content is a JWT.

このセクションは、「token-type:jwt」という値を、「An IETF URN Sub-Namespace for OAuth」[RFC6755]によって確立されたIANA「OAuth URI」レジストリに登録します。これは、コンテンツがJWTであることを示すために使用できます。

o URN: urn:ietf:params:oauth:token-type:jwt o Common Name: JSON Web Token (JWT) Token Type o Change Controller: IESG o Specification Document(s): RFC 7519

o URN:urn:ietf:params:oauth:token-type:jwt o Common Name:JSON Web Token(JWT)Token Type o Change Controller:IESG o Specification Document(s):RFC 7519

10.3. Media Type Registration
10.3. メディアタイプ登録
10.3.1. Registry Contents
10.3.1. レジストリの内容

This section registers the "application/jwt" media type [RFC2046] in the "Media Types" registry [IANA.MediaTypes] in the manner described in RFC 6838 [RFC6838], which can be used to indicate that the content is a JWT.

このセクションは、コンテンツがJWTであることを示すために使用できるRFC 6838 [RFC6838]で説明されている方法で、「メディアタイプ」レジストリ[IANA.MediaTypes]に「application / jwt」メディアタイプ[RFC2046]を登録します。

o Type name: application o Subtype name: jwt o Required parameters: n/a o Optional parameters: n/a o Encoding considerations: 8bit; JWT values are encoded as a series of base64url-encoded values (some of which may be the empty string) separated by period ('.') characters. o Security considerations: See the Security Considerations section of RFC 7519 o Interoperability considerations: n/a o Published specification: RFC 7519 o Applications that use this media type: OpenID Connect, Mozilla Persona, Salesforce, Google, Android, Windows Azure, Amazon Web Services, and numerous others o Fragment identifier considerations: n/a o Additional information:

o タイプ名:アプリケーションoサブタイプ名:jwt o必須パラメーター:n / a oオプションパラメーター:n / a oエンコーディングに関する考慮事項:8ビット。 JWT値は、ピリオド( '。')文字で区切られた、base64urlでエンコードされた一連の値(空の文字列の場合もあります)としてエンコードされます。 oセキュリティに関する考慮事項:RFC 7519のセキュリティに関する考慮事項のセクションを参照してくださいo相互運用性に関する考慮事項:n / ao公開された仕様:RFC 7519 oこのメディアタイプを使用するアプリケーション:OpenID Connect、Mozilla Persona、Salesforce、Google、Android、Windows Azure、Amazon Webサービス、および他の多数のoフラグメント識別子の考慮事項:n / ao追加情報:

         Magic number(s): n/a
         File extension(s): n/a
         Macintosh file type code(s): n/a
        

o Person & email address to contact for further information: Michael B. Jones, mbj@microsoft.com o Intended usage: COMMON o Restrictions on usage: none o Author: Michael B. Jones, mbj@microsoft.com o Change controller: IESG o Provisional registration? No

o 詳細について連絡する人とメールアドレス:Michael B. Jones、mbj @ microsoft.com o使用目的:COMMON o使用制限:なしo作者:Michael B. Jones、mbj @ microsoft.com oコントローラーの変更:IESG o仮登録?番号

10.4. Header Parameter Names Registration
10.4. ヘッダーパラメータ名の登録

This section registers specific Claim Names defined in Section 4.1 in the IANA "JSON Web Signature and Encryption Header Parameters" registry established by [JWS] for use by claims replicated as Header Parameters in JWEs, per Section 5.3.

このセクションは、セクション5.3に従って、JWEでヘッダーパラメーターとして複製されたクレームで使用するために[JWS]によって確立されたIANA "JSON Web Signature and Encryption Header Parameters"レジストリのセクション4.1で定義された特定のクレーム名を登録します。

10.4.1. Registry Contents
10.4.1. レジストリの内容

o Header Parameter Name: "iss" o Header Parameter Description: Issuer o Header Parameter Usage Location(s): JWE o Change Controller: IESG o Specification Document(s): Section 4.1.1 of RFC 7519

o ヘッダーパラメータ名:「iss」oヘッダーパラメータの説明:発行者oヘッダーパラメータの使用場所:JWE o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.1

o Header Parameter Name: "sub" o Header Parameter Description: Subject o Header Parameter Usage Location(s): JWE o Change Controller: IESG o Specification Document(s): Section 4.1.2 of RFC 7519

o ヘッダーパラメーター名:「sub」oヘッダーパラメーターの説明:サブジェクトoヘッダーパラメーターの使用場所:JWE o変更コントローラー:IESG o仕様書:RFC 7519のセクション4.1.2

o Header Parameter Name: "aud" o Header Parameter Description: Audience o Header Parameter Usage Location(s): JWE o Change Controller: IESG o Specification Document(s): Section 4.1.3 of RFC 7519

o ヘッダーパラメータ名:「aud」oヘッダーパラメータの説明:オーディエンスoヘッダーパラメータの使用場所:JWE o変更管理者:IESG o仕様書:RFC 7519のセクション4.1.3

11. Security Considerations
11. セキュリティに関する考慮事項

All of the security issues that are pertinent to any cryptographic application must be addressed by JWT/JWS/JWE/JWK agents. Among these issues are protecting the user's asymmetric private and symmetric secret keys and employing countermeasures to various attacks.

暗号化アプリケーションに関連するすべてのセキュリティ問題は、JWT / JWS / JWE / JWKエージェントによって対処する必要があります。これらの問題の中には、ユーザーの非対称秘密鍵と対称秘密鍵の保護と、さまざまな攻撃への対策の採用があります。

All the security considerations in the JWS specification also apply to JWT, as do the JWE security considerations when encryption is employed. In particular, Sections 10.12 ("JSON Security Considerations") and 10.13 ("Unicode Comparison Security Considerations") of [JWS] apply equally to the JWT Claims Set in the same manner that they do to the JOSE Header.

暗号化が採用されている場合のJWEセキュリティの考慮事項と同様に、JWS仕様のすべてのセキュリティの考慮事項はJWTにも適用されます。特に、[JWS]のセクション10.12(「JSONセキュリティの考慮事項」)および10.13(「Unicode比較のセキュリティ考慮事項」)は、JOSEヘッダーに対して行うのと同じ方法でJWTクレームセットに等しく適用されます。

11.1. Trust Decisions
11.1. 信頼の決定

The contents of a JWT cannot be relied upon in a trust decision unless its contents have been cryptographically secured and bound to the context necessary for the trust decision. In particular, the key(s) used to sign and/or encrypt the JWT will typically need to verifiably be under the control of the party identified as the issuer of the JWT.

JWTの内容は、その内容が暗号で保護され、信頼の決定に必要なコンテキストにバインドされていない限り、信頼の決定に依存できません。特に、JWTの署名または暗号化、あるいはその両方に使用される鍵は、通常、JWTの発行者として識別された当事者の制御下にあることを検証可能にする必要があります。

11.2. Signing and Encryption Order
11.2. 署名と暗号化の順序

While syntactically the signing and encryption operations for Nested JWTs may be applied in any order, if both signing and encryption are necessary, normally producers should sign the message and then encrypt the result (thus encrypting the signature). This prevents attacks in which the signature is stripped, leaving just an encrypted message, as well as providing privacy for the signer. Furthermore, signatures over encrypted text are not considered valid in many jurisdictions.

構文的には、ネストされたJWTの署名および暗号化操作は任意の順序で適用できますが、署名と暗号化の両方が必要な場合、通常、プロデューサーはメッセージに署名してから結果を暗号化する必要があります(したがって、署名を暗号化します)。これにより、署名が取り除かれ、暗号化されたメッセージのみが残る攻撃を防ぎ、署名者にプライバシーを提供します。さらに、暗号化されたテキストの署名は、多くの法域では有効とは見なされていません。

Note that potential concerns about security issues related to the order of signing and encryption operations are already addressed by the underlying JWS and JWE specifications; in particular, because JWE only supports the use of authenticated encryption algorithms, cryptographic concerns about the potential need to sign after encryption that apply in many contexts do not apply to this specification.

署名および暗号化操作の順序に関連するセキュリティの問題に関する潜在的な懸念は、基礎となるJWSおよびJWE仕様によってすでに対処されていることに注意してください。特に、JWEは認証された暗号化アルゴリズムの使用のみをサポートしているため、多くのコンテキストで適用される暗号化後に署名する必要がある可能性に関する暗号化の懸念は、この仕様には適用されません。

12. Privacy Considerations
12. プライバシーに関する考慮事項

A JWT may contain privacy-sensitive information. When this is the case, measures MUST be taken to prevent disclosure of this information to unintended parties. One way to achieve this is to use an encrypted JWT and authenticate the recipient. Another way is to ensure that JWTs containing unencrypted privacy-sensitive information are only transmitted using protocols utilizing encryption that support endpoint authentication, such as Transport Layer Security (TLS). Omitting privacy-sensitive information from a JWT is the simplest way of minimizing privacy issues.

JWTにはプライバシーに敏感な情報が含まれている場合があります。この場合、意図しない関係者へのこの情報の開示を防ぐための対策を講じる必要があります。これを実現する1つの方法は、暗号化されたJWTを使用して受信者を認証することです。もう1つの方法は、暗号化されていないプライバシー機密情報を含むJWTが、トランスポート層セキュリティ(TLS)などのエンドポイント認証をサポートする暗号化を利用するプロトコルのみを使用して送信されるようにすることです。 JWTからプライバシーの機密情報を除外することは、プライバシーの問題を最小限に抑える最も簡単な方法です。

13. References
13. 参考文献
13.1. Normative References
13.1. 引用文献

[ECMAScript] Ecma International, "ECMAScript Language Specification, 5.1 Edition", ECMA Standard 262, June 2011, <http://www.ecma-international.org/ecma-262/5.1/ ECMA-262.pdf>.

[ECMAScript] Ecma International、「ECMAScript言語仕様、5.1版」、ECMA標準262、2011年6月、<http://www.ecma-international.org/ecma-262/5.1/ ECMA-262.pdf>。

[IANA.MediaTypes] IANA, "Media Types", <http://www.iana.org/assignments/media-types>.

[IANA.MediaTypes] IANA、「メディアタイプ」、<http://www.iana.org/assignments/media-types>。

[JWA] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, May 2015, <http://www.rfc-editor.org/info/rfc7518>.

[JWA]ジョーンズ、M。、「JSON Web Algorithms(JWA)」、RFC 7518、DOI 10.17487 / RFC7518、2015年5月、<http://www.rfc-editor.org/info/rfc7518>。

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

[JWE]ジョーンズ、M。およびJ.ヒルデブランド、「JSON Web Encryption(JWE)」、RFC 7516、DOI 10.17487 / RFC7516、2015年5月、<http://www.rfc-editor.org/info/rfc7516>。

[JWS] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC, May 2015, <http://www.rfc-editor.org/info/rfc7515>.

[JWS]ジョーンズ、M。、ブラッドリー、J.、N。崎村、「JSON Web Signature(JWS)」、RFC 7515、DOI 10.17487 / RFC、2015年5月、<http://www.rfc-editor.org / info / rfc7515>。

[RFC20] Cerf, V., "ASCII format for Network Interchange", STD 80, RFC 20, DOI 10.17487/RFC0020, October 1969, <http://www.rfc-editor.org/info/rfc20>.

[RFC20] Cerf、V。、「ネットワークインターチェンジのASCII形式」、STD 80、RFC 20、DOI 10.17487 / RFC0020、1969年10月、<http://www.rfc-editor.org/info/rfc20>。

[RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, DOI 10.17487/RFC2046, November 1996, <http://www.rfc-editor.org/info/rfc2046>.

[RFC2046] Freed、N。およびN. Borenstein、「Multipurpose Internet Mail Extensions(MIME)Part Two:Media Types」、RFC 2046、DOI 10.17487 / RFC2046、1996年11月、<http://www.rfc-editor.org / info / rfc2046>。

[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>。

[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、「Uniform Resource Identifier(URI):Generic Syntax」、STD 66、RFC 3986、DOI 10.17487 / RFC3986、2005年1月、<http:/ /www.rfc-editor.org/info/rfc3986>。

[RFC4949] Shirey, R., "Internet Security Glossary, Version 2", FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, <http://www.rfc-editor.org/info/rfc4949>.

[RFC4949] Shirey、R。、「インターネットセキュリティ用語集、バージョン2」、FYI 36、RFC 4949、DOI 10.17487 / RFC4949、2007年8月、<http://www.rfc-editor.org/info/rfc4949>。

[RFC7159] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2014, <http://www.rfc-editor.org/info/rfc7159>.

[RFC7159]ブレイ、T。、編、「JavaScriptオブジェクト表記(JSON)データ交換フォーマット」、RFC 7159、DOI 10.17487 / RFC7159、2014年3月、<http://www.rfc-editor.org/info/ rfc7159>。

[UNICODE] The Unicode Consortium, "The Unicode Standard", <http://www.unicode.org/versions/latest/>.

[UNICODE] Unicodeコンソーシアム、「The Unicode Standard」、<http://www.unicode.org/versions/latest/>。

13.2. Informative References
13.2. 参考引用

[CanvasApp] Facebook, "Canvas Applications", 2010, <http://developers.facebook.com/docs/authentication/ canvas>.

[CanvasApp] Facebook、「Canvas Applications」、2010、<http://developers.facebook.com/docs/authentication/ canvas>。

[JSS] Bradley, J. and N. Sakimura (editor), "JSON Simple Sign", September 2010, <http://jsonenc.info/jss/1.0/>.

[JSS] Bradley、J。およびN.崎村(編集者)、「JSON Simple Sign」、2010年9月、<http://jsonenc.info/jss/1.0/>。

[MagicSignatures] Panzer, J., Ed., Laurie, B., and D. Balfanz, "Magic Signatures", January 2011, <http://salmon-protocol.googlecode.com/svn/ trunk/draft-panzer-magicsig-01.html>.

[MagicSignatures] Panzer、J.、Ed。、Laurie、B。、およびD. Balfanz、「Magic Signatures」、2011年1月、<http://salmon-protocol.googlecode.com/svn/ trunk / draft-panzer- magicsig-01.html>。

[OASIS.saml-core-2.0-os] Cantor, S., Kemp, J., Philpott, R., and E. Maler, "Assertions and Protocols 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/ saml-core-2.0-os.pdf>.

[OASIS.saml-core-2.0-os] Cantor、S.、Kemp、J.、Philpott、R.、and E. Maler、 "Assertions and Protocols for the OASIS Security Assertion Markup Language(SAML)V2.0"、 OASIS標準saml-core-2.0-os、2005年3月、<http://docs.oasis-open.org/security/saml/v2.0/ saml-core-2.0-os.pdf>。

[POSIX.1] IEEE, "The Open Group Base Specifications Issue 7", IEEE Std 1003.1, 2013 Edition, 2013, <http://pubs.opengroup.org/onlinepubs/9699919799/ basedefs/V1_chap04.html#tag_04_15>.

[POSIX.1] IEEE、「The Open Group Base Specifications Issue 7」、IEEE Std 1003.1、2013 Edition、2013、<http://pubs.opengroup.org/onlinepubs/9699919799/ basedefs / V1_chap04.html#tag_04_15>。

[RFC3275] Eastlake 3rd, D., Reagle, J., and D. Solo, "(Extensible Markup Language) XML-Signature Syntax and Processing", RFC 3275, DOI 10.17487/RFC3275, March 2002, <http://www.rfc-editor.org/info/rfc3275>.

[RFC3275] Eastlake 3rd、D.、Reagle、J。、およびD. Solo、「(Extensible Markup Language)XML-Signature Syntax and Processing」、RFC 3275、DOI 10.17487 / RFC3275、2002年3月、<http:// www .rfc-editor.org / info / rfc3275>。

[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet: Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002, <http://www.rfc-editor.org/info/rfc3339>.

[RFC3339]クライン、G、およびC.ニューマン、「インターネット上の日付と時刻:タイムスタンプ」、RFC 3339、DOI 10.17487 / RFC3339、2002年7月、<http://www.rfc-editor.org/info/rfc3339 >。

[RFC4122] Leach, P., Mealling, M., and R. Salz, "A Universally Unique IDentifier (UUID) URN Namespace", RFC 4122, DOI 10.17487/RFC4122, July 2005, <http://www.rfc-editor.org/info/rfc4122>.

[RFC4122] Leach、P.、Mealling、M。、およびR. Salz、「A Universally Unique Identifier(UUID)URN Namespace」、RFC 4122、DOI 10.17487 / RFC4122、2005年7月、<http://www.rfc- editor.org/info/rfc4122>。

[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、「RFCでIANAの考慮事項セクションを作成するためのガイドライン」、BCP 26、RFC 5226、DOI 10.17487 / RFC5226、2008年5月、<http://www.rfc-editor.org / info / rfc5226>。

[RFC6755] Campbell, B. and H. Tschofenig, "An IETF URN Sub-Namespace for OAuth", RFC 6755, DOI 10.17487/RFC6755, October 2012, <http://www.rfc-editor.org/info/rfc6755>.

[RFC6755] Campbell、B.およびH. Tschofenig、「An OTF URN Sub-Namespace for OAuth」、RFC 6755、DOI 10.17487 / RFC6755、2012年10月、<http://www.rfc-editor.org/info/rfc6755 >。

[RFC6838] Freed, N., Klensin, J., and T. Hansen, "Media Type Specifications and Registration Procedures", BCP 13, RFC 6838, DOI 10.17487/RFC6838, January 2013, <http://www.rfc-editor.org/info/rfc6838>.

[RFC6838] Freed、N.、Klensin、J。、およびT. Hansen、「Media Type Specifications and Registration Procedures」、BCP 13、RFC 6838、DOI 10.17487 / RFC6838、2013年1月、<http://www.rfc- editor.org/info/rfc6838>。

[SWT] Hardt, D. and Y. Goland, "Simple Web Token (SWT)", Version 0.9.5.1, November 2009, <http://msdn.microsoft.com/en-us/ library/windowsazure/hh781551.aspx>.

[SWT] Hardt、D。およびY. Goland、「Simple Web Token(SWT)」、バージョン0.9.5.1、2009年11月、<http://msdn.microsoft.com/en-us/library/windowsazure/hh781551。 aspx>。

[W3C.CR-xml11-20060816] Cowan, J., "Extensible Markup Language (XML) 1.1 (Second Edition)", World Wide Web Consortium Recommendation REC-xml11-20060816, August 2006, <http://www.w3.org/TR/2006/REC-xml11-20060816>.

[W3C.CR-xml11-20060816] Cowan、J。、「Extensible Markup Language(XML)1.1(Second Edition)」、World Wide Web Consortium Recommendation REC-xml11-20060816、2006年8月、<http://www.w3 .org / TR / 2006 / REC-xml11-20060816>。

[W3C.REC-xml-c14n-20010315] Boyer, J., "Canonical XML Version 1.0", World Wide Web Consortium Recommendation REC-xml-c14n-20010315, March 2001, <http://www.w3.org/TR/2001/REC-xml-c14n-20010315>.

[W3C.REC-xml-c14n-20010315] Boyer、J。、「Canonical XML Version 1.0」、World Wide Web Consortium Recommendation REC-xml-c14n-20010315、2001年3月、<http://www.w3.org/ TR / 2001 / REC-xml-c14n-20010315>。

Appendix A. JWT Examples
付録A. JWTの例

This section contains examples of JWTs. For other example JWTs, see Section 6.1 of this document and Appendices A.1 - A.3 of [JWS].

このセクションには、JWTの例が含まれています。その他のJWTの例については、このドキュメントのセクション6.1および[JWS]の付録A.1-A.3を参照してください。

A.1. Example Encrypted JWT
A.1. 暗号化されたJWTの例

This example encrypts the same claims as used in Section 3.1 to the recipient using RSAES-PKCS1-v1_5 and AES_128_CBC_HMAC_SHA_256.

この例では、RSAES-PKCS1-v1_5およびAES_128_CBC_HMAC_SHA_256を使用して、セクション3.1で使用したものと同じクレームを受信者に暗号化します。

The following example JOSE Header declares that:

次のJOSEヘッダーの例では、それを宣言しています。

o The Content Encryption Key is encrypted to the recipient using the RSAES-PKCS1-v1_5 algorithm to produce the JWE Encrypted Key. o Authenticated encryption is performed on the plaintext using the AES_128_CBC_HMAC_SHA_256 algorithm to produce the JWE Ciphertext and the JWE Authentication Tag.

o コンテンツ暗号化キーは、RSAES-PKCS1-v1_5アルゴリズムを使用して受信者に対して暗号化され、JWE暗号化キーが生成されます。 o認証された暗号化は、AES_128_CBC_HMAC_SHA_256アルゴリズムを使用して平文で実行され、JWE暗号文とJWE認証タグを生成します。

     {"alg":"RSA1_5","enc":"A128CBC-HS256"}
        

Other than using the octets of the UTF-8 representation of the JWT Claims Set from Section 3.1 as the plaintext value, the computation of this JWT is identical to the computation of the JWE in Appendix A.2 of [JWE], including the keys used.

セクション3.1のJWTクレームセットのUTF-8表現のオクテットをプレーンテキスト値として使用する以外は、このJWTの計算は、[JWE]の付録A.2のJWEの計算と同じです。中古。

The final result in this example (with line breaks for display purposes only) is:

この例の最終的な結果(表示目的のみの改行あり)は次のとおりです。

eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0. QR1Owv2ug2WyPBnbQrRARTeEk9kDO2w8qDcjiHnSJflSdv1iNqhWXaKH4MqAkQtM oNfABIPJaZm0HaA415sv3aeuBWnD8J-Ui7Ah6cWafs3ZwwFKDFUUsWHSK-IPKxLG TkND09XyjORj_CHAgOPJ-Sd8ONQRnJvWn_hXV1BNMHzUjPyYwEsRhDhzjAD26ima sOTsgruobpYGoQcXUwFDn7moXPRfDE8-NoQX7N7ZYMmpUDkR-Cx9obNGwJQ3nM52 YCitxoQVPzjbl7WBuB7AohdBoZOdZ24WlN1lVIeh8v1K4krB8xgKvRU8kgFrEn_a 1rZgN5TiysnmzTROF869lQ. AxY8DCtDaGlsbGljb3RoZQ. MKOle7UQrG6nSxTLX6Mqwt0orbHvAKeWnDYvpIAeZ72deHxz3roJDXQyhxx0wKaM HDjUEOKIwrtkHthpqEanSBNYHZgmNOV7sln1Eu9g3J8. fiK51VwhsxJ-siBMR-YFiA

eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0。 QR1Owv2ug2WyPBnbQrRARTeEk9kDO2w8qDcjiHnSJflSdv1iNqhWXaKH4MqAkQtM oNfABIPJaZm0HaA415sv3aeuBWnD8J-Ui7Ah6cWafs3ZwwFKDFUUsWHSK-IPKxLG TkND09XyjORj_CHAgOPJ-Sd8ONQRnJvWn_hXV1BNMHzUjPyYwEsRhDhzjAD26ima sOTsgruobpYGoQcXUwFDn7moXPRfDE8-NoQX7N7ZYMmpUDkR-Cx9obNGwJQ3nM52 YCitxoQVPzjbl7WBuB7AohdBoZOdZ24WlN1lVIeh8v1K4krB8xgKvRU8kgFrEn_a 1rZgN5TiysnmzTROF869lQ。 AxY8DCtDaGlsbGljb3RoZQ。 MKOle7UQrG6nSxTLX6Mqwt0orbHvAKeWnDYvpIAeZ72deHxz3roJDXQyhxx0wKaM HDjUEOKIwrtkHthpqEanSBNYHZgmNOV7sln1Eu9g3J8。 fiK51VwhsxJ-siBMR-YFiA

A.2. Example Nested JWT
A.2. ネストされたJWTの例

This example shows how a JWT can be used as the payload of a JWE or JWS to create a Nested JWT. In this case, the JWT Claims Set is first signed, and then encrypted.

この例は、JWTをJWEまたはJWSのペイロードとして使用して、ネストされたJWTを作成する方法を示しています。この場合、JWTクレームセットは最初に署名され、次に暗号化されます。

The inner signed JWT is identical to the example in Appendix A.2 of [JWS]. Therefore, its computation is not repeated here. This example then encrypts this inner JWT to the recipient using RSAES-PKCS1-v1_5 and AES_128_CBC_HMAC_SHA_256.

内部の署名されたJWTは、[JWS]の付録A.2の例と同じです。したがって、その計算はここでは繰り返されません。この例では、RSAES-PKCS1-v1_5とAES_128_CBC_HMAC_SHA_256を使用して、この内部JWTを受信者に暗号化します。

The following example JOSE Header declares that:

次のJOSEヘッダーの例では、それを宣言しています。

o The Content Encryption Key is encrypted to the recipient using the RSAES-PKCS1-v1_5 algorithm to produce the JWE Encrypted Key. o Authenticated encryption is performed on the plaintext using the AES_128_CBC_HMAC_SHA_256 algorithm to produce the JWE Ciphertext and the JWE Authentication Tag. o The plaintext is itself a JWT.

o コンテンツ暗号化キーは、RSAES-PKCS1-v1_5アルゴリズムを使用して受信者に対して暗号化され、JWE暗号化キーが生成されます。 o認証された暗号化は、AES_128_CBC_HMAC_SHA_256アルゴリズムを使用して平文で実行され、JWE暗号文とJWE認証タグを生成します。 o平文はそれ自体がJWTです。

     {"alg":"RSA1_5","enc":"A128CBC-HS256","cty":"JWT"}
        

Base64url encoding the octets of the UTF-8 representation of the JOSE Header yields this encoded JOSE Header value:

JOSEヘッダーのUTF-8表現のオクテットをBase64urlエンコードすると、次のエンコードされたJOSEヘッダー値が生成されます。

     eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldUIn0
        

The computation of this JWT is identical to the computation of the JWE in Appendix A.2 of [JWE], other than that different JOSE Header, plaintext, JWE Initialization Vector, and Content Encryption Key values are used. (The RSA key used is the same.)

このJWTの計算は、[JWE]の付録A.2のJWEの計算と同じですが、異なるJOSEヘッダー、プレーンテキスト、JWE初期化ベクトル、およびコンテンツ暗号化キーの値が使用されます。 (使用されるRSA鍵は同じです。)

The plaintext used is the octets of the ASCII [RFC20] representation of the JWT at the end of Appendix A.2.1 of [JWS] (with all whitespace and line breaks removed), which is a sequence of 458 octets.

使用される平文は、[JWS]の付録A.2.1の最後にある、JWTのASCII [RFC20]表現のオクテット(すべての空白と改行を削除したもの)であり、458オクテットのシーケンスです。

The JWE Initialization Vector value used (using JSON array notation) is:

使用されるJWE初期化ベクトル値(JSON配列表記を使用)は次のとおりです。

[82, 101, 100, 109, 111, 110, 100, 32, 87, 65, 32, 57, 56, 48, 53, 50]

「82、 101、 100、 109、 111、 110、 100、 32、 87、 65、 32、 57、 56、 48、 53、 50」

This example uses the Content Encryption Key represented by the base64url-encoded value below:

この例では、以下のbase64urlエンコード値で表されるコンテンツ暗号化キーを使用しています。

GawgguFyGrWKav7AX4VKUg

GawgguFyGrWKav7AX4VKUg

The final result for this Nested JWT (with line breaks for display purposes only) is:

このネストされたJWTの最終的な結果(表示目的のみの改行あり)は次のとおりです。

eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldU In0. g_hEwksO1Ax8Qn7HoN-BVeBoa8FXe0kpyk_XdcSmxvcM5_P296JXXtoHISr_DD_M qewaQSH4dZOQHoUgKLeFly-9RI11TG-_Ge1bZFazBPwKC5lJ6OLANLMd0QSL4fYE b9ERe-epKYE3xb2jfY1AltHqBO-PM6j23Guj2yDKnFv6WO72tteVzm_2n17SBFvh DuR9a2nHTE67pe0XGBUS_TK7ecA-iVq5COeVdJR4U4VZGGlxRGPLRHvolVLEHx6D YyLpw30Ay9R6d68YCLi9FYTq3hIXPK_-dmPlOUlKvPr1GgJzRoeC9G5qCvdcHWsq JGTO_z3Wfo5zsqwkxruxwA. UmVkbW9uZCBXQSA5ODA1Mg. VwHERHPvCNcHHpTjkoigx3_ExK0Qc71RMEParpatm0X_qpg-w8kozSjfNIPPXiTB BLXR65CIPkFqz4l1Ae9w_uowKiwyi9acgVztAi-pSL8GQSXnaamh9kX1mdh3M_TT -FZGQFQsFhu0Z72gJKGdfGE-OE7hS1zuBD5oEUfk0Dmb0VzWEzpxxiSSBbBAzP10 l56pPfAtrjEYw-7ygeMkwBl6Z_mLS6w6xUgKlvW6ULmkV-uLC4FUiyKECK4e3WZY Kw1bpgIqGYsw2v_grHjszJZ-_I5uM-9RA8ycX9KqPRp9gc6pXmoU_-27ATs9XCvr ZXUtK2902AUzqpeEUJYjWWxSNsS-r1TJ1I-FMJ4XyAiGrfmo9hQPcNBYxPz3GQb2 8Y5CLSQfNgKSGt0A4isp1hBUXBHAndgtcslt7ZoQJaKe_nNJgNliWtWpJ_ebuOpE l8jdhehdccnRMIwAmU1n7SPkmhIl1HlSOpvcvDfhUN5wuqU955vOBvfkBOh5A11U zBuo2WlgZ6hYi9-e3w29bR0C2-pp3jbqxEDw3iWaf2dc5b-LnR0FEYXvI_tYk5rd _J9N0mg0tQ6RbpxNEMNoA9QWk5lgdPvbh9BaO195abQ. AVO9iT5AV4CzvDJCdhSFlQ

eyJhbGciOiJSU0ExXzUiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2IiwiY3R5IjoiSldU In0。 g_hEwksO1Ax8Qn7HoN-BVeBoa8FXe0kpyk_XdcSmxvcM5_P296JXXtoHISr_DD_M qewaQSH4dZOQHoUgKLeFly-9RI11TG-_Ge1bZFazBPwKC5lJ6OLANLMd0QSL4fYE b9ERe-epKYE3xb2jfY1AltHqBO-PM6j23Guj2yDKnFv6WO72tteVzm_2n17SBFvh DuR9a2nHTE67pe0XGBUS_TK7ecA-iVq5COeVdJR4U4VZGGlxRGPLRHvolVLEHx6D YyLpw30Ay9R6d68YCLi9FYTq3hIXPK_-dmPlOUlKvPr1GgJzRoeC9G5qCvdcHWsq JGTO_z3Wfo5zsqwkxruxwA。 UmVkbW9uZCBXQSA5ODA1Mg。 VwHERHPvCNcHHpTjkoigx3_ExK0Qc71RMEParpatm0X_qpg-w8kozSjfNIPPXiTB BLXR65CIPkFqz4l1Ae9w_uowKiwyi9acgVztAi-pSL8GQSXnaamh9kX1mdh3M_TT -FZGQFQsFhu0Z72gJKGdfGE-OE7hS1zuBD5oEUfk0Dmb0VzWEzpxxiSSBbBAzP10 l56pPfAtrjEYw-7ygeMkwBl6Z_mLS6w6xUgKlvW6ULmkV-uLC4FUiyKECK4e3WZY Kw1bpgIqGYsw2v_grHjszJZ-_I5uM-9RA8ycX9KqPRp9gc6pXmoU_-27ATs9XCvr ZXUtK2902AUzqpeEUJYjWWxSNsS-r1TJ1I-FMJ4XyAiGrfmo9hQPcNBYxPz3GQb2 8Y5CLSQfNgKSGt0A4isp1hBUXBHAndgtcslt7ZoQJaKe_nNJgNliWtWpJ_ebuOpE l8jdhehdccnRMIwAmU1n7SPkmhIl1HlSOpvcvDfhUN5wuqU955vOBvfkBOh5A11U zBuo2WlgZ6hYi9-e3w29bR0C2-pp3jbqxEDw3iWaf2dc5b-LnR0FEYXvI_tYk5rd _J9N0mg0tQ6RbpxNEMNoA9QWk5lgdPvbh9BaO195abQ。 AVO9iT5AV4CzvDJCdhSFlQ

Appendix B. Relationship of JWTs to SAML Assertions
付録B. JWTとSAMLアサーションの関係

Security Assertion Markup Language (SAML) 2.0 [OASIS.saml-core-2.0-os] provides a standard for creating security tokens with greater expressivity and more security options than supported by JWTs. However, the cost of this flexibility and expressiveness is both size and complexity. SAML's use of XML [W3C.CR-xml11-20060816] and XML Digital Signature (DSIG) [RFC3275] contributes to the size of SAML Assertions; its use of XML and especially XML Canonicalization [W3C.REC-xml-c14n-20010315] contributes to their complexity.

セキュリティアサーションマークアップ言語(SAML)2.0 [OASIS.saml-core-2.0-os]は、JWTでサポートされているものよりも優れた表現力とセキュリティオプションを備えたセキュリティトークンを作成するための標準を提供します。ただし、この柔軟性と表現力のコストは、サイズと複雑さの両方です。 SAMLによるXML [W3C.CR-xml11-20060816]およびXMLデジタル署名(DSIG)[RFC3275]の使用は、SAMLアサーションのサイズに影響します。 XMLの使用、特にXML正規化[W3C.REC-xml-c14n-20010315]は、それらの複雑さに寄与します。

JWTs are intended to provide a simple security token format that is small enough to fit into HTTP headers and query arguments in URIs. It does this by supporting a much simpler token model than SAML and using the JSON [RFC7159] object encoding syntax. It also supports securing tokens using Message Authentication Codes (MACs) and digital signatures using a smaller (and less flexible) format than XML DSIG.

JWTは、HTTPヘッダーとURIのクエリ引数に適合するのに十分な大きさの単純なセキュリティトークン形式を提供することを目的としています。これは、SAMLよりもはるかに単純なトークンモデルをサポートし、JSON [RFC7159]オブジェクトエンコーディング構文を使用することによって行われます。また、メッセージ認証コード(MAC)を使用したトークンのセキュリティ保護と、XML DSIGよりも小さい(柔軟性が低い)形式を使用したデジタル署名もサポートしています。

Therefore, while JWTs can do some of the things SAML Assertions do, JWTs are not intended as a full replacement for SAML Assertions, but rather as a token format to be used when ease of implementation or compactness are considerations.

したがって、JWTはSAMLアサーションが行うことの一部を実行できますが、JWTはSAMLアサーションの完全な代替物としてではなく、実装の容易さまたはコンパクトさを考慮するときに使用されるトークン形式として意図されています。

SAML Assertions are always statements made by an entity about a subject. JWTs are often used in the same manner, with the entity making the statements being represented by the "iss" (issuer) claim, and the subject being represented by the "sub" (subject) claim. However, with these claims being optional, other uses of the JWT format are also permitted.

SAMLアサーションは常に、サブジェクトに関してエンティティによって作成されるステートメントです。 JWTは多くの場合同じ方法で使用され、エンティティは「iss」(発行者)クレームによって表現され、サブジェクトは「sub」(サブジェクト)クレームによって表現されます。ただし、これらのクレームはオプションであるため、JWT形式の他の使用も許可されます。

Appendix C. Relationship of JWTs to Simple Web Tokens (SWTs)

付録C. JWTとシンプルWebトークン(SET)の関係

Both JWTs and SWTs [SWT], at their core, enable sets of claims to be communicated between applications. For SWTs, both the claim names and claim values are strings. For JWTs, while claim names are strings, claim values can be any JSON type. Both token types offer cryptographic protection of their content: SWTs with HMAC SHA-256 and JWTs with a choice of algorithms, including signature, MAC, and encryption algorithms.

JWTとSWT [SWT]の両方は、コアで、アプリケーション間でクレームのセットを通信できるようにします。 SWTの場合、クレーム名とクレーム値はどちらも文字列です。 JWTの場合、クレーム名は文字列ですが、クレーム値は任意のJSONタイプにすることができます。どちらのトークンタイプもコンテンツの暗号化保護を提供します。HMACSHA-256を備えたSWTと、署名、MAC、暗号化アルゴリズムなどのアルゴリズムを選択できるJWTです。

Acknowledgements

謝辞

The authors acknowledge that the design of JWTs was intentionally influenced by the design and simplicity of SWTs [SWT] and ideas for JSON tokens that Dick Hardt discussed within the OpenID community.

著者は、JWTの設計がSWT [SWT]の設計と単純さ、およびDick HardtがOpenIDコミュニティ内で議論したJSONトークンのアイデアに意図的に影響を受けたことを認めています。

Solutions for signing JSON content were previously explored by Magic Signatures [MagicSignatures], JSON Simple Sign [JSS], and Canvas Applications [CanvasApp], all of which influenced this document.

JSONコンテンツに署名するためのソリューションは、以前はMagic Signatures [MagicSignatures]、JSON Simple Sign [JSS]、およびCanvas Applications [CanvasApp]によって調査され、これらすべてがこのドキュメントに影響を与えました。

This specification is the work of the OAuth working group, which includes dozens of active and dedicated participants. In particular, the following individuals contributed ideas, feedback, and wording that influenced this specification:

この仕様はOAuthワーキンググループの作業であり、何十人ものアクティブで熱心な参加者が含まれています。特に、以下の個人がこの仕様に影響を与えるアイデア、フィードバック、および表現を提供しました。

Dirk Balfanz, Richard Barnes, Brian Campbell, Alissa Cooper, Breno de Medeiros, Stephen Farrell, Yaron Y. Goland, Dick Hardt, Joe Hildebrand, Jeff Hodges, Edmund Jay, Warren Kumari, Ben Laurie, Barry Leiba, Ted Lemon, James Manger, Prateek Mishra, Kathleen Moriarty, Tony Nadalin, Axel Nennker, John Panzer, Emmanuel Raviart, David Recordon, Eric Rescorla, Jim Schaad, Paul Tarjan, Hannes Tschofenig, Sean Turner, and Tom Yu.

ダークバルファンズ、リチャードバーンズ、ブライアンキャンベル、アリッサクーパー、ブレノデメデイロス、スティーブンファレル、ヤロンY.ゴランド、ディックハード、ジョーヒルデブランド、ジェフホッジス、エドマンドジェイ、ウォーレンクマリ、ベンローリー、バリーレイバ、テッドレモン、ジェームズマンガー、Prateek Mishra、Kathleen Moriarty、Tony Nadalin、Axel Nennker、John Panzer、Emmanuel Raviart、David Recordon、Eric Rescorla、Jim Schaad、Paul Tarjan、Hannes Tschofenig、Sean Turner、Tom Yu。

Hannes Tschofenig and Derek Atkins chaired the OAuth working group and Sean Turner, Stephen Farrell, and Kathleen Moriarty served as Security Area Directors during the creation of this specification.

Hannes TschofenigとDerek AtkinsがOAuthワーキンググループの議長を務め、Sean Turner、Stephen Farrell、およびKathleen Moriartyがこの仕様の作成中にセキュリティエリアディレクターを務めました。

Authors' Addresses

著者のアドレス

Michael B. Jones Microsoft

マイケルB.ジョーンズマイクロソフト

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

John Bradley Ping Identity

ジョンブラッドリーピンアイデンティティ

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

Nat Sakimura Nomura Research Institute

崎村ナット野村総合研究所

   EMail: n-sakimura@nri.co.jp
   URI:   http://nat.sakimura.org/