RFC 9396 · 英日対訳
OAuth 2.0 Rich Authorization Requests
英語本文は RFC Editor が公開した RFC そのもので、著作権は IETF Trust と文書の著者にあり、IETF Trust Legal Provisions に基づいて転載している。日本語は非公式の機械翻訳で、正文は英語のみ。例・図・参考文献は英語のまま表示する。
99% の段落を翻訳済み · 機械翻訳: Claude Fable 5.1 · 2026-11-13
目次
- 概要
- 1 はじめに
- 1.1 表記規約と用語
- 2 リクエストパラメーター "authorization_details"
- 2.1 認可詳細の種類
- 2.2 共通データフィールド
- 3 認可リクエスト
- 3.1 "scope" パラメーターとの関係
- 3.2 "resource" パラメーターとの関係
- 4 認可レスポンス
- 5 認可エラーレスポンス
- 6 トークンリクエスト
- 6.1 認可詳細の比較
- 7 トークンレスポンス
- 7.1 トークンレスポンスにおける拡充された認可詳細
- 8 トークンエラーレスポンス
- 9 リソースサーバー
- 9.1 JWT ベースのアクセストークン
- 9.2 トークンイントロスペクション
- 10 メタデータ
- 11 実装に関する考慮事項
- 11.1 特定の展開における認可詳細の利用
- 11.2 最小限の実装サポート
- 11.3 機械可読な型スキーマの利用
- 11.4 大きなリクエスト
- 12 セキュリティに関する考慮事項
- 13 プライバシーに関する考慮事項
- 14 IANA に関する考慮事項
- 14.1 OAuth パラメーターの登録
- 14.2 JSON Web Token クレームの登録
- 14.3 OAuth トークンイントロスペクションレスポンスの登録
- 14.4 OAuth 認可サーバーメタデータの登録
- 14.5 OAuth 動的クライアント登録メタデータの登録
- 14.6 OAuth 拡張エラーの登録
- 15 参考資料
- 15.1 引用規格
- 15.2 参考文献
- A 追加の例
- A.1 OpenID Connect
- A.2 リモート電子署名
- A.3 税務データへのアクセス
- A.4 eHealth
- 謝辞
Abstract
概要
This document specifies a new parameter authorization_details that is used to carry fine-grained authorization data in OAuth messages.
本文書は、OAuth メッセージにおいてきめ細かな認可データを運ぶために使われる新しいパラメーター authorization_details を定義する。
1.Introduction
1.はじめに
"The OAuth 2.0 Authorization Framework" [RFC6749] defines the scope parameter that allows OAuth clients to specify the requested scope, i.e., the limited capability, of an access token. This mechanism is sufficient to implement static scenarios and coarse-grained authorization requests, such as "give me read access to the resource owner's profile." However, it is not sufficient to specify fine- grained authorization requirements, such as "please let me transfer an amount of 45 Euros to Merchant A" or "please give me read access to directory A and write access to file X."
「The OAuth 2.0 Authorization Framework」[RFC6749] は、OAuth クライアントがアクセストークンの要求するスコープ、すなわち限定された能力を指定できる scope パラメーターを定義している。この仕組みは、「リソースオーナーのプロフィールへの読み取りアクセスをくれ」のような静的なシナリオや粗い粒度の認可リクエストを実装するには十分である。しかし、「45 ユーロを加盟店 A に送金させてほしい」や「ディレクトリ A への読み取りアクセスとファイル X への書き込みアクセスをくれ」のようなきめ細かな認可要件を指定するには十分ではない。
This specification introduces a new parameter authorization_details that allows clients to specify their fine-grained authorization requirements using the expressiveness of JSON [RFC8259] data structures.
本仕様は、クライアントが JSON [RFC8259] データ構造の表現力を使ってきめ細かな認可要件を指定できるようにする、新しいパラメーター authorization_details を導入する。
For example, an authorization request for a credit transfer (designated as "payment initiation" in several open banking initiatives) can be represented using a JSON object like this:
例えば、送金 (いくつかのオープンバンキングの取り組みでは「payment initiation (支払い開始)」と呼ばれる) の認可リクエストは、次のような JSON オブジェクトで表現できる:
{
"type": "payment_initiation",
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"bic":"ABCIDEFFXXX",
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}Figure 1: Example of an Authorization Request for a Credit Transfer
This object contains detailed information about the intended payment, such as amount, currency, and creditor, that is required to inform the user and obtain their consent. The authorization server (AS) and the respective resource server (RS) (providing the payment initiation API) will together enforce this consent.
このオブジェクトには、金額、通貨、受取人など、ユーザーに通知して同意を得るために必要な、意図された支払いに関する詳細情報が含まれる。認可サーバー (AS) と対応するリソースサーバー (RS) (payment initiation API を提供する) が、協力してこの同意を強制する。
For a comprehensive discussion of the challenges arising from new use cases in the open banking and electronic signing spaces, see [Transaction-Auth].
オープンバンキングや電子署名の分野における新しいユースケースから生じる課題の包括的な議論については、[Transaction-Auth] を参照のこと。
In addition to facilitating custom authorization requests, this specification also introduces a set of common data type fields for use across different APIs.
カスタムの認可リクエストを容易にすることに加え、本仕様は異なる API 間で利用するための共通データ型フィールドの集合も導入する。
1.1.Conventions and Terminology
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 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here.
本文書におけるキーワード "MUST"、"MUST NOT"、"REQUIRED"、"SHALL"、"SHALL NOT"、"SHOULD"、"SHOULD NOT"、"RECOMMENDED"、"NOT RECOMMENDED"、"MAY"、"OPTIONAL" は、ここに示すようにすべて大文字で現れる場合に限り、BCP 14 [RFC2119] [RFC8174] に記述されたとおりに解釈される。
This specification uses the terms "access token", "refresh token", "authorization server" (AS), "resource server" (RS), "authorization endpoint", "authorization request", "authorization response", "token endpoint", "grant type", "access token request", "access token response", and "client" defined by "The OAuth 2.0 Authorization Framework" [RFC6749].
本仕様は、「The OAuth 2.0 Authorization Framework」[RFC6749] で定義される用語「アクセストークン」、「リフレッシュトークン」、「認可サーバー」(AS)、「リソースサーバー」(RS)、「認可エンドポイント」、「認可リクエスト」、「認可レスポンス」、「トークンエンドポイント」、「グラントタイプ」、「アクセストークンリクエスト」、「アクセストークンレスポンス」、「クライアント」を使用する。
2.Request Parameter "authorization_details"
2.リクエストパラメーター "authorization_details"
The request parameter authorization_details contains, in JSON notation, an array of objects. Each JSON object contains the data to specify the authorization requirements for a certain type of resource. The type of resource or access requirement is determined by the type field, which is defined as follows:
リクエストパラメーター authorization_details は、JSON 表記でオブジェクトの配列を含む。各 JSON オブジェクトは、特定の種類のリソースに対する認可要件を指定するためのデータを含む。リソースまたはアクセス要件の種類は type フィールドによって決まり、これは次のように定義される:
type: An identifier for the authorization details type as a string. The value of the type field determines the allowable contents of the object that contains it. The value is unique for the described API in the context of the AS. This field is REQUIRED.
type: 認可詳細 (authorization details) の種類を示す文字列の識別子。type フィールドの値は、それを含むオブジェクトに許容される内容を決定する。この値は、AS のコンテキストにおいて、記述される API に対して一意である。このフィールドは必須である (REQUIRED)。
An authorization_details array MAY contain multiple entries of the same type.
authorization_details 配列は、同じ type のエントリを複数含んでもよい (MAY)。
Figure 2 shows an authorization_details of type payment_initiation using the example data shown above:
図 2 は、上に示した例のデータを用いた、type が payment_initiation の authorization_details を示す:
[
{
"type": "payment_initiation",
"actions": [
"initiate",
"status",
"cancel"
],
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
]Figure 2: Example of "authorization_details" for a Credit Transfer
Figure 3 shows a combined request asking for access to account information and permission to initiate a payment:
図 3 は、口座情報へのアクセスと支払い開始の許可を求める複合リクエストを示す:
[
{
"type": "account_information",
"actions": [
"list_accounts",
"read_balances",
"read_transactions"
],
"locations": [
"https://example.com/accounts"
]
},
{
"type": "payment_initiation",
"actions": [
"initiate",
"status",
"cancel"
],
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
]Figure 3: Example of "authorization_details" for a Combined Request
The JSON objects with type fields of account_information and payment_initiation represent the different authorization_details to be used by the AS to ask for consent.
type フィールドが account_information と payment_initiation である JSON オブジェクトは、AS が同意を求めるために使う異なる authorization_details を表す。
| Note: The AS will make this data subsequently available to the
| respective RSs (see Section 9).2.1.Authorization Details Types
2.1.認可詳細の種類
The AS controls the interpretation of the value of the type parameter as well as the object fields that the type parameter allows. However, the value of the type parameter is also generally documented and intended to be used by developers. It is RECOMMENDED that API designers choose type values that are easily copied without ambiguity. For example, some glyphs have multiple Unicode code points for the same visual character, and a developer could potentially type a different character than what the AS has defined. Possible means of reducing potential confusion are limiting the value to ASCII [RFC0020] characters, providing a machine-readable listing of data type values, or instructing developers to copy and paste directly from the documentation.
AS は、type パラメーターの値の解釈と、その type パラメーターが許容するオブジェクトのフィールドを管理する。しかし、type パラメーターの値は一般に文書化され、開発者によって使われることも意図されている。API 設計者は、曖昧さなく容易にコピーできる type 値を選ぶことが推奨される (RECOMMENDED)。例えば、ある字体 (グリフ) には同じ見た目の文字に対して複数の Unicode コードポイントが存在するものがあり、開発者が AS の定義したものとは異なる文字を入力してしまう可能性がある。混乱の可能性を減らす手段として、値を ASCII [RFC0020] 文字に限定する、データ型の値の機械可読な一覧を提供する、または文書から直接コピー・ペーストするよう開発者に指示する、といったものが考えられる。
If an application or API is expected to be deployed across different servers, such as the case in an open standard, the API designer is RECOMMENDED to use a collision-resistant namespace under their control, such as a URI that the API designer controls.
オープンな標準の場合のように、アプリケーションまたは API が異なるサーバー間で展開されることが想定される場合、API 設計者は、自らが管理する URI など、自らの管理下にある衝突耐性のある名前空間を使うことが推奨される (RECOMMENDED)。
The following example shows how an implementation could utilize the namespace https://scheme.example.org/ to ensure collision-resistant type values.
次の例は、衝突耐性のある type 値を確保するために、実装が名前空間 https://scheme.example.org/ をどのように利用できるかを示す。
{
"type": "https://scheme.example.org/files",
"locations": [
"https://example.com/files"
],
"permissions": [
{
"path": "/myfiles/A",
"access": [
"read"
]
},
{
"path": "/myfiles/A/X",
"access": [
"read",
"write"
]
}
]
} Figure 4: Example of "authorization_details" with a URL as Type
Identifier2.2.Common Data Fields
2.2.共通データフィールド
This specification defines a set of common data fields that are designed to be usable across different types of APIs. This specification does not require the use of these common fields by an API definition but, instead, provides them as reusable generic components for API designers to make use of. The allowable values of all fields are determined by the API being protected, as defined by a particular "type" value.
本仕様は、異なる種類の API 間で利用できるように設計された共通データフィールドの集合を定義する。本仕様は API 定義にこれらの共通フィールドの使用を要求するものではなく、API 設計者が利用できる再利用可能な汎用部品として提供する。すべてのフィールドの許容値は、特定の "type" 値によって定義される、保護対象の API によって決まる。
locations: An array of strings representing the location of the resource or RS. These strings are typically URIs identifying the location of the RS. This field can allow a client to specify a particular RS, as discussed in Section 12.
locations: リソースまたは RS の場所を表す文字列の配列。これらの文字列は通常、RS の場所を識別する URI である。このフィールドにより、12 節で論じるように、クライアントは特定の RS を指定できる。
actions: An array of strings representing the kinds of actions to be taken at the resource.
actions: リソースに対して行われるアクションの種類を表す文字列の配列。
datatypes: An array of strings representing the kinds of data being requested from the resource.
datatypes: リソースから要求されるデータの種類を表す文字列の配列。
identifier: A string identifier indicating a specific resource available at the API.
identifier: API で利用可能な特定のリソースを示す文字列の識別子。
privileges: An array of strings representing the types or levels of privilege being requested at the resource.
privileges: リソースに対して要求される権限の種類またはレベルを表す文字列の配列。
When different common data fields are used in combination, the permissions the client requests are the product of all the values. The object represents a request for all actions values listed within the object to be used at all locations values listed within the object for all datatypes values listed within the object. In the following example, the client is requesting read and write access to both the contacts and photos belonging to customers in a customer_information API. If this request is granted, the client would assume it would be able to use any combination of rights defined by the API, such as read access to the photos and write access to the contacts.
異なる共通データフィールドが組み合わせて使われる場合、クライアントが要求する許可はすべての値の積である。そのオブジェクトは、オブジェクト内に列挙されたすべての actions 値を、オブジェクト内に列挙されたすべての locations 値において、オブジェクト内に列挙されたすべての datatypes 値に対して使用するリクエストを表す。次の例では、クライアントは customer_information API において、顧客に属する連絡先と写真の両方への読み取りおよび書き込みアクセスを要求している。このリクエストが許可された場合、クライアントは、写真への読み取りアクセスと連絡先への書き込みアクセスのように、API で定義された権利の任意の組み合わせを使用できると想定する。
[
{
"type": "customer_information",
"locations": [
"https://example.com/customers"
],
"actions": [
"read",
"write"
],
"datatypes": [
"contacts",
"photos"
]
}
]Figure 5: Example of "authorization_details" with Common Data Fields
If the client wishes to have finer control over its access, it can send multiple objects. In this example, the client is asking for read access to the contacts and write access to the photos in the same API endpoint. If this request is granted, the client would not be able to write to the contacts.
クライアントが自身のアクセスをより細かく制御したい場合、複数のオブジェクトを送ることができる。この例では、クライアントは同じ API エンドポイントにおいて、連絡先への読み取りアクセスと写真への書き込みアクセスを求めている。このリクエストが許可された場合、クライアントは連絡先に書き込むことはできない。
[
{
"type": "customer_information",
"locations": [
"https://example.com/customers"
],
"actions": [
"read"
],
"datatypes": [
"contacts"
]
},
{
"type": "customer_information",
"locations": [
"https://example.com/customers"
],
"actions": [
"write"
],
"datatypes": [
"photos"
]
}
] Figure 6: Example of "authorization_details" with Common Data
Fields in Multiple ObjectsAn API MAY define its own extensions, subject to the type of the respective authorization object. It is anticipated that API designers will use a combination of common data fields defined in this specification as well as fields specific to the API itself. The following non-normative example shows the use of both common and API- specific fields as part of two different fictitious API type values. The first access request includes the actions, locations, and datatypes fields specified here as well as the API-specific geolocation field, indicating access to photos taken at the given coordinates. The second access request includes the actions and identifier fields specified here as well as the API-specific currency fields.
API は、対応する認可オブジェクトの type に応じて、独自の拡張を定義してもよい (MAY)。API 設計者は、本仕様で定義された共通データフィールドと API 固有のフィールドを組み合わせて使うことが想定される。次の非規範的な例は、2 つの異なる架空の API type 値の一部として、共通フィールドと API 固有フィールドの両方を使う様子を示す。1 つ目のアクセスリクエストには、ここで定義された actions、locations、datatypes フィールドに加えて、指定された座標で撮影された写真へのアクセスを示す API 固有の geolocation フィールドが含まれる。2 つ目のアクセスリクエストには、ここで定義された actions および identifier フィールドに加えて、API 固有の通貨 (currency) フィールドが含まれる。
[
{
"type":"photo-api",
"actions":[
"read",
"write"
],
"locations":[
"https://server.example.net/",
"https://resource.local/other"
],
"datatypes":[
"metadata",
"images"
],
"geolocation":[
{
"lat":-32.364,
"lng":153.207
},
{
"lat":-35.364,
"lng":158.207
}
]
},
{
"type":"financial-transaction",
"actions":[
"withdraw"
],
"identifier":"account-14-32-32-3",
"currency":"USD"
}
] Figure 7: Example of "authorization_details" Using Common and
Extension Data FieldsIf this request is approved, the resulting access token's access rights will be the union of the requested types of access for each of the two APIs, just as above.
このリクエストが承認された場合、結果として得られるアクセストークンのアクセス権は、上記と同様に、2 つの API それぞれに対して要求されたアクセスの種類の和となる。
3.Authorization Request
3.認可リクエスト
The authorization_details authorization request parameter can be used to specify authorization requirements in all places where the scope parameter is used for the same purpose, examples include:
認可リクエストパラメーター authorization_details は、scope パラメーターが同じ目的で使われるすべての場所で認可要件を指定するために使用できる。例としては次が挙げられる:
* authorization requests as specified in [RFC6749]
* [RFC6749] で規定される認可リクエスト
* device authorization requests as specified in [RFC8628]
* [RFC8628] で規定されるデバイス認可リクエスト
* backchannel authentication requests as defined in [OID-CIBA]
* [OID-CIBA] で定義されるバックチャネル認証リクエスト
In case of authorization requests as defined in [RFC6749], implementers MAY consider using pushed authorization requests [RFC9126] to improve the security, privacy, and reliability of the flow. See Sections 12, 13, and 11.4 for details.
[RFC6749] で定義される認可リクエストの場合、実装者はフローのセキュリティ、プライバシー、信頼性を向上させるために、プッシュ型認可リクエスト [RFC9126] の使用を検討してもよい (MAY)。詳細は 12 節、13 節、11.4 節を参照のこと。
Parameter encoding is determined by the respective context. In the context of an authorization request according to [RFC6749], the parameter is encoded using the application/x-www-form-urlencoded format of the serialized JSON as shown in Figure 8, using the example from Section 2 (line breaks for display purposes only):
パラメーターのエンコーディングは、それぞれのコンテキストによって決まる。[RFC6749] に従う認可リクエストのコンテキストでは、パラメーターは、2 節の例を用いた図 8 に示すように、シリアライズされた JSON の application/x-www-form-urlencoded 形式でエンコードされる (改行は表示の都合によるもの):
GET /authorize?response_type=code
&client_id=s6BhdRkqt3
&state=af0ifjsldkj
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&code_challenge_method=S256
&code_challenge=K2-ltc83acc4h0c9w6ESC_rEMTJ3bwc-uCHaoeK1t8U
&authorization_details=%5B%7B%22type%22%3A%22account%5Finfo
rmation%22%2C%22actions%22%3A%5B%22list%5Faccounts%22%2C%22
read%5Fbalances%22%2C%22read%5Ftransactions%22%5D%2C%22loca
tions%22%3A%5B%22https%3A%2F%2Fexample%2Ecom%2Faccounts%22%
5D%7D%2C%7B%22type%22%3A%22payment%5Finitiation%22%2C%22act
ions%22%3A%5B%22initiate%22%2C%22status%22%2C%22cancel%22%5
D%2C%22locations%22%3A%5B%22https%3A%2F%2Fexample%2Ecom%2Fp
ayments%22%5D%2C%22instructedAmount%22%3A%7B%22currency%22%
3A%22EUR%22%2C%22amount%22%3A%22123%2E50%22%7D%2C%22credito
rName%22%3A%22Merchant%20A%22%2C%22creditorAccount%22%3A%7B
%22iban%22%3A%22DE02100100109307118603%22%7D%2C%22remittanc
eInformationUnstructured%22%3A%22Ref%20Number%20Merchant%22
%7D%5D HTTP/1.1
Host: server.example.com Figure 8: Example of Authorization Request with
"authorization_details"Based on the data provided in the authorization_details parameter, the AS will ask the user for consent to the requested access permissions.
authorization_details パラメーターで提供されたデータに基づき、AS は要求されたアクセス許可についてユーザーに同意を求める。
| Note: The user may also grant a subset of the requested
| authorization details.In Figure 9, the client wants to get access to account information and initiate a payment:
図 9 では、クライアントは口座情報へのアクセスの取得と支払いの開始を望んでいる:
[
{
"type": "account_information",
"actions": [
"list_accounts",
"read_balances",
"read_transactions"
],
"locations": [
"https://example.com/accounts"
]
},
{
"type": "payment_initiation",
"actions": [
"initiate",
"status",
"cancel"
],
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
]Figure 9: URL Decoded "authorization_details"
3.1.Relationship to the "scope" Parameter
3.1."scope" パラメーターとの関係
authorization_details and scope can be used in the same authorization request for carrying independent authorization requirements.
authorization_details と scope は、独立した認可要件を運ぶために同じ認可リクエスト内で使用できる。
Combined use of authorization_details and scope is supported by this specification in part to allow existing OAuth-based applications to incrementally migrate towards using authorization_details exclusively. It is RECOMMENDED that a given API use only one form of requirement specification.
authorization_details と scope の併用は、既存の OAuth ベースのアプリケーションが authorization_details のみを使う形へ段階的に移行できるようにすることを目的の一つとして、本仕様でサポートされる。ある API では要件指定の形式を一つだけ使うことが推奨される (RECOMMENDED)。
The AS MUST process both sets of requirements in combination with each other for the given authorization request. The details of how the AS combines these parameters are specific to the APIs being protected and outside the scope of this specification.
AS は、当該認可リクエストに対して、両方の要件の集合を互いに組み合わせて処理しなければならない (MUST)。AS がこれらのパラメーターをどのように組み合わせるかの詳細は、保護対象の API に固有であり、本仕様の範囲外である。
When gathering user consent, the AS MUST present the merged set of requirements represented by the authorization request.
ユーザーの同意を得る際、AS は認可リクエストが表す要件の統合された集合を提示しなければならない (MUST)。
If the resource owner grants the client the requested access, the AS will issue tokens to the client that are associated with the respective authorization_details (and scope values, if applicable).
リソースオーナーがクライアントに要求されたアクセスを許可した場合、AS は対応する authorization_details (および該当する場合は scope 値) に関連付けられたトークンをクライアントに発行する。
3.2.Relationship to the "resource" Parameter
3.2."resource" パラメーターとの関係
The resource authorization request parameter, as defined in [RFC8707], can be used to further determine the resources where the requested scope can be applied. The resource parameter does not have any impact on the way the AS processes the authorization_details authorization request parameter.
[RFC8707] で定義される認可リクエストパラメーター resource は、要求された scope を適用できるリソースをさらに特定するために使用できる。resource パラメーターは、AS が認可リクエストパラメーター authorization_details を処理する方法に何ら影響を与えない。
4.Authorization Response
4.認可レスポンス
This specification does not define extensions to the authorization response.
本仕様は、認可レスポンスへの拡張を定義しない。
5.Authorization Error Response
5.認可エラーレスポンス
The AS MUST refuse to process any unknown authorization details type or authorization details not conforming to the respective type definition. The AS MUST abort processing and respond with an error invalid_authorization_details to the client if any of the following are true of the objects in the authorization_details structure:
AS は、未知の認可詳細の種類、または対応する type の定義に適合しない認可詳細の処理を拒否しなければならない (MUST)。authorization_details 構造内のオブジェクトについて次のいずれかに該当する場合、AS は処理を中止し、エラー invalid_authorization_details をクライアントに応答しなければならない (MUST):
* contains an unknown authorization details type value,
* 未知の認可詳細の type 値を含む
* is an object of known type but containing unknown fields,
* 既知の type のオブジェクトだが未知のフィールドを含む
* contains fields of the wrong type for the authorization details type,
* その認可詳細の種類に対して誤った型のフィールドを含む
* contains fields with invalid values for the authorization details type, or
* その認可詳細の種類に対して無効な値を持つフィールドを含む
* is missing required fields for the authorization details type.
* その認可詳細の種類に必須のフィールドが欠けている
6.Token Request
6.トークンリクエスト
The authorization_details token request parameter can be used to specify the authorization details that a client wants the AS to assign to an access token. The AS checks whether the underlying grant (in case of grant types authorization_code, refresh_token, etc.) or the client's policy (in case of grant type client_credentials) allows the issuance of an access token with the requested authorization details. Otherwise, the AS refuses the request with the error code invalid_authorization_details (similar to invalid_scope).
トークンリクエストパラメーター authorization_details は、クライアントが AS にアクセストークンへ割り当ててほしい認可詳細を指定するために使用できる。AS は、基礎となるグラント (グラントタイプが authorization_code、refresh_token などの場合) またはクライアントのポリシー (グラントタイプが client_credentials の場合) が、要求された認可詳細を持つアクセストークンの発行を許可しているかどうかを確認する。そうでない場合、AS はエラーコード invalid_authorization_details (invalid_scope に類似) でリクエストを拒否する。
6.1.Comparing Authorization Details
6.1.認可詳細の比較
Many actions in the OAuth protocol allow the AS and RS to make security decisions based on whether the request is asking for "more" or "less" than a previous, existing request. For example, upon refreshing a token, the client can ask for a new access token with "fewer permissions" than had been previously authorized by the resource owner. The requested access token will convey the reduced permissions, but the resource owner's previous authorization is unchanged by such requests. Since the semantics of the fields in the authorization_details will be implementation specific to a given API or set of APIs, there is no standardized mechanism to compare two arbitrary authorization detail requests. An AS should not rely on simple object comparison in most cases, as the intersection of some fields within a request could have side effects on the access rights granted, depending on how the API has been designed and deployed. This is a similar effect to the scope values used with some APIs.
OAuth プロトコルにおける多くの処理では、AS と RS は、リクエストが以前の既存のリクエストより「多く」を求めているか「少なく」を求めているかに基づいてセキュリティ上の判断を行える。例えば、トークンをリフレッシュする際、クライアントはリソースオーナーが以前に認可したものより「少ない許可」を持つ新しいアクセストークンを求めることができる。要求されたアクセストークンは縮小された許可を伝えるが、リソースオーナーの以前の認可はそのようなリクエストによって変更されない。authorization_details 内のフィールドの意味論は特定の API または API 群に対する実装固有のものとなるため、任意の 2 つの認可詳細リクエストを比較する標準化された仕組みは存在しない。リクエスト内のいくつかのフィールドの交差は、API の設計と展開のされ方によっては付与されるアクセス権に副作用を及ぼしうるため、AS はほとんどの場合、単純なオブジェクト比較に頼るべきではない。これは、いくつかの API で使われる scope 値と同様の効果である。
When comparing a new request to an existing request, an AS can use the same processing techniques as used in granting the request in the first place to determine if a resource owner needs to authorize the request. The details of this comparison are dependent on the definition of the type of authorization request and outside the scope of this specification, but common patterns can be applied.
新しいリクエストを既存のリクエストと比較する際、AS は、リソースオーナーがそのリクエストを認可する必要があるかどうかを判断するために、最初にリクエストを許可したときに用いたのと同じ処理手法を使うことができる。この比較の詳細は、認可リクエストの種類の定義に依存し、本仕様の範囲外であるが、共通のパターンは適用できる。
This shall be illustrated using our running example. The example authorization request in Section 3, if approved by the user, resulted in the issuance of an authorization code associated with the privileges to:
これを、本文書を通じて用いている例で説明する。3 節の認可リクエストの例は、ユーザーに承認された場合、次の権限に関連付けられた認可コードの発行をもたらした:
* list accounts,
* 口座の一覧取得
* access the balance of one or more accounts,
* 1 つ以上の口座の残高へのアクセス
* access the transactions of one or more accounts, and
* 1 つ以上の口座の取引へのアクセス
* initiate, check the status of, and cancel a payment.
* 支払いの開始、状態確認、取り消し
The client could now request the AS to issue an access token assigned with the privilege to just access a list of accounts as follows:
クライアントはここで、次のように、口座一覧へのアクセスのみの権限を割り当てたアクセストークンの発行を AS に要求できる:
[
{
"type": "account_information",
"actions": [
"list_accounts"
],
"locations": [
"https://example.com/accounts"
]
}
]Figure 10: Example of "authorization_details" Reduced Privileges
The example API is designed such that each field used by the account_information type contains additive rights, with each value within the actions and locations arrays specifying a different element of access. To make a comparison in this instance, the AS would perform the following steps:
この例の API は、account_information type で使われる各フィールドが加算的な権利を含み、actions 配列および locations 配列内の各値がそれぞれ異なるアクセス要素を指定するように設計されている。この場合に比較を行うには、AS は次の手順を実行する:
* verify that the authorization code issued in the previous step contains an authorization details object of type account_information,
* 前の手順で発行された認可コードが type が account_information の認可詳細オブジェクトを含むことを検証する
* verify whether the approved list of actions contains list_accounts, and
* 承認された actions のリストに list_accounts が含まれるかどうかを検証する
* verify whether the locations value includes only previously approved locations.
* locations 値が以前に承認された場所のみを含むかどうかを検証する
If all checks succeed, the AS would issue the requested access token with the reduced set of access.
すべての確認が成功した場合、AS は縮小されたアクセスの集合を持つ要求されたアクセストークンを発行する。
Note that this comparison is relevant to this specific API type definition. A different API type definition could have different processing rules. For example, an actions value could subsume the rights associated with another actions value. For example, if a client initially asks for a token with write access, this implies both read and write access to this API:
この比較は、この特定の API type 定義に関するものである点に注意すること。別の API type 定義では異なる処理規則を持ちうる。例えば、ある actions 値が別の actions 値に関連付けられた権利を包含することがある。例えば、クライアントが最初に書き込みアクセスを持つトークンを求めた場合、これはこの API に対する読み取りと書き込み両方のアクセスを意味する:
[
{
"type": "example_api",
"actions": [
"write"
]
}
] Figure 11: Example of "authorization_details" Requesting "write"
Access to an APILater, that same client makes a refresh request for read access:
その後、同じクライアントが読み取りアクセスのリフレッシュリクエストを行う:
[
{
"type": "example_api",
"actions": [
"read"
]
}
] Figure 12: Example of "authorization_details" Requesting "read"
Access to an APIThe AS would compare the type value and the actions value to determine that the read access is already covered by the write access previously granted to the client.
AS は type 値と actions 値を比較し、読み取りアクセスが以前にクライアントへ付与された書き込みアクセスにすでに含まれていると判断する。
This same API could be designed with a possible value for privileges of admin, used in this example to denote that the resulting token is allowed to perform any of the functions on the resources. If that client is then granted such admin privileges to the API, the authorization_details would be as follows:
この同じ API は、privileges の取りうる値として admin を持つように設計することもできる。この例では、admin は結果のトークンがリソースに対する任意の機能を実行できることを示すために使われる。そのクライアントがこの API に対してそのような admin 権限を付与された場合、authorization_details は次のようになる:
[
{
"type": "example_api",
"privileges": [
"admin"
]
}
] Figure 13: Example of "authorization_details" with "admin" Access
to an APIThe AS would compare the type value and find that the privileges value subsumes any aspects of read or write access that had been granted to the client previously. Note that other API definitions can use privileges such that values do not subsume one another.
AS は type 値を比較し、privileges 値が以前にクライアントへ付与された読み取りまたは書き込みアクセスのあらゆる側面を包含していることを見出す。他の API 定義では、値が互いを包含しないような privileges の使い方をすることもできる点に注意すること。
The next example shows how the client can use the common data element locations (see Section 2.2) to request the issuance of an access token restricted to a certain RS. In our running example, the client may ask for all permissions of the approved grant of type payment_initiation applicable to the RS residing at https://example.com/payments as follows:
次の例は、クライアントが共通データ要素 locations (2.2 節参照) を使って、特定の RS に制限されたアクセストークンの発行を要求する方法を示す。本文書を通じて用いている例では、クライアントは次のように、https://example.com/payments にある RS に適用可能な、type が payment_initiation の承認済みグラントのすべての許可を求めることができる:
[
{
"type": "payment_initiation",
"locations": [
"https://example.com/payments"
]
}
] Figure 14: Example of "authorization_details" Requesting an
Audience-Restricted Access Token7.Token Response
7.トークンレスポンス
In addition to the token response parameters as defined in [RFC6749], the AS MUST also return the authorization_details as granted by the resource owner and assigned to the respective access token.
[RFC6749] で定義されるトークンレスポンスパラメーターに加えて、AS はリソースオーナーによって許可され対応するアクセストークンに割り当てられた authorization_details も返さなければならない (MUST)。
The authorization details assigned to the access token issued in a token response are determined by the authorization_details parameter of the corresponding token request. If the client does not specify the authorization_details token request parameters, the AS determines the resulting authorization_details at its discretion.
トークンレスポンスで発行されるアクセストークンに割り当てられる認可詳細は、対応するトークンリクエストの authorization_details パラメーターによって決まる。クライアントがトークンリクエストパラメーター authorization_details を指定しない場合、AS は結果の authorization_details を自らの裁量で決定する。
The AS MAY omit values in the authorization_details to the client.
AS は、クライアントに返す authorization_details の値を省略してもよい (MAY)。
For our running example, it would look like this:
本文書を通じて用いている例では、次のようになる:
HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store
{
"access_token": "2YotnFZFEjr1zCsicMWpAA",
"token_type": "example",
"expires_in": 3600,
"refresh_token": "tGzv3JOkF0XG5Qx2TlKWIA",
"authorization_details": [
{
"type": "payment_initiation",
"actions": [
"initiate",
"status",
"cancel"
],
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
]
}Figure 15: Example Token Response
7.1.Enriched Authorization Details in Token Response
7.1.トークンレスポンスにおける拡充された認可詳細
The authorization details attached to the access token MAY differ from what the client requests. In addition to the user authorizing less than what the client requested, there are some use cases where the AS enriches the data in an authorization details object. Whether enrichment is allowed and specifics of how it works are necessarily part of the definition of the respective authorization details type.
アクセストークンに付随する認可詳細は、クライアントが要求したものと異なってもよい (MAY)。ユーザーがクライアントの要求より少ない範囲を認可する場合に加えて、AS が認可詳細オブジェクト内のデータを拡充 (enrich) するユースケースもある。拡充が許されるかどうか、およびその具体的な動作は、必然的に対応する認可詳細の種類の定義の一部となる。
As one example, a client may ask for access to account information but leave the decision about the specific accounts it will be able to access to the user. During the course of the authorization process, the user would select the subset of their accounts that they want to allow the client to access. As one design option to convey the selected accounts, the AS could add this information to the respective authorization details object.
一例として、クライアントは口座情報へのアクセスを求めつつ、アクセスできる具体的な口座の決定をユーザーに委ねることがある。認可プロセスの過程で、ユーザーはクライアントにアクセスを許可したい口座の部分集合を選択する。選択された口座を伝える設計上の選択肢の一つとして、AS はこの情報を対応する認可詳細オブジェクトに追加できる。
In that example, the requested authorization_details parameter might look like the following. In this example, the empty arrays serve as placeholders for where data will be added during enrichment by the AS. This example is illustrative only and is not intended to suggest a preference for designing the specifics of any authorization details type this way.
この例では、要求される authorization_details パラメーターは次のようになりうる。この例では、空の配列が、AS による拡充の際にデータが追加される場所のプレースホルダーとして機能する。この例は説明のためだけのものであり、いかなる認可詳細の種類についてもその詳細をこのように設計することを推奨する意図はない。
"authorization_details": [
{
"type": "account_information",
"access": {
"accounts": [],
"balances": [],
"transactions": []
},
"recurringIndicator":true
}
]Figure 16: Example of Requested "authorization_details"
The AS then would expand the authorization details object and add the respective account identifiers.
その後、AS は認可詳細オブジェクトを拡張し、対応する口座識別子を追加する。
HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"example",
"expires_in":3600,
"refresh_token":"tGzv3JokF0XG5Qx2TlKWIA",
"authorization_details":[
{
"type":"account_information",
"access":{
"accounts":[
{
"iban":"DE2310010010123456789"
},
{
"maskedPan":"123456xxxxxx1234"
}
],
"balances":[
{
"iban":"DE2310010010123456789"
}
],
"transactions":[
{
"iban":"DE2310010010123456789"
},
{
"maskedPan":"123456xxxxxx1234"
}
]
},
"recurringIndicator":true
}
]
}Figure 17: Example of Enriched "authorization_details"
For another example, the client is asking for access to a medical record but does not know the record number at request time. In this example, the client specifies the type of access it wants but doesn't specify the location or identifier of that access.
別の例として、クライアントが医療記録へのアクセスを求めているが、リクエスト時点では記録番号を知らない場合がある。この例では、クライアントは望むアクセスの種類を指定するが、そのアクセスの場所や識別子は指定しない。
{
"authorization_details": [
{
"type": "medical_record",
"sens": [ "HIV", "ETH", "MART" ],
"actions": [ "read" ],
"datatypes": [ "Patient", "Observation", "Appointment" ]
}
]}Figure 18: Example of Requested "authorization_details"
When the user interacts with the AS, they select which of the medical records they are responsible for giving to the client. This information gets returned with the access token.
ユーザーが AS と対話する際、ユーザーは自らが責任を持つ医療記録のうちどれをクライアントに渡すかを選択する。この情報はアクセストークンとともに返される。
{
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"token_type":"example",
"expires_in":3600,
"refresh_token":"tGzv3JokF0XG5Qx2TlKWIA",
"authorization_details":[
{
"type": "medical_record",
"sens": [ "HIV", "ETH", "MART" ],
"actions": [ "read" ],
"datatypes": [ "Patient", "Observation", "Appointment" ],
"identifier": "patient-541235",
"locations": [ "https://records.example.com/" ]
}
]
}Figure 19: Example of Enriched "authorization_details"
| Note: The client needs to be aware upfront of the possibility
| that a certain authorization details object can be enriched.
| It is assumed that this property is part of the definition of
| the respective authorization details type.8.Token Error Response
8.トークンエラーレスポンス
The Token Error Response MUST conform to the rules given in Section 5.
トークンエラーレスポンスは、5 節で示した規則に従わなければならない (MUST)。
9.Resource Servers
9.リソースサーバー
In order to enable the RS to enforce the authorization details as approved in the authorization process, the AS MUST make this data available to the RS. The AS MAY add the authorization_details field to access tokens in JSON Web Token (JWT) format or to token introspection responses.
認可プロセスで承認された認可詳細を RS が強制できるようにするために、AS はこのデータを RS が利用できるようにしなければならない (MUST)。AS は、JSON Web Token (JWT) 形式のアクセストークンまたはトークンイントロスペクションレスポンスに authorization_details フィールドを追加してもよい (MAY)。
9.1.JWT-Based Access Tokens
9.1.JWT ベースのアクセストークン
If the access token is a JWT [RFC7519], the AS is RECOMMENDED to add the authorization details object, filtered to the specific audience, as a top-level claim.
アクセストークンが JWT [RFC7519] である場合、AS は特定のオーディエンス向けにフィルタリングした認可詳細オブジェクトをトップレベルのクレームとして追加することが推奨される (RECOMMENDED)。
The AS will typically also add further claims to the JWT that the RS requires request processing, e.g., user ID, roles, and transaction- specific data. What claims the particular RS requires is defined by the RS-specific policy with the AS.
AS は通常、RS がリクエスト処理に必要とするさらなるクレーム、例えばユーザー ID、ロール、取引固有のデータなども JWT に追加する。特定の RS がどのクレームを必要とするかは、AS との間の RS 固有のポリシーによって定義される。
The following shows the contents of an example JWT for the payment initiation example above:
次に、上記の支払い開始の例に対する JWT の例の内容を示す:
{
"iss": "https://as.example.com",
"sub": "24400320",
"aud": "a7AfcPcsl2",
"exp": 1311281970,
"acr": "psd2_sca",
"txn": "8b4729cc-32e4-4370-8cf0-5796154d1296",
"authorization_details": [
{
"type": "https://scheme.example.com/payment_initiation",
"actions": [
"initiate",
"status",
"cancel"
],
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant A",
"creditorAccount": {
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
],
"debtorAccount": {
"iban": "DE40100100103307118608",
"user_role": "owner"
}
} Figure 20: Example of "authorization_details" in JWT-Based Access
TokenIn this case, the AS added the following example claims to the JWT- based access token:
この場合、AS は JWT ベースのアクセストークンに次の例示クレームを追加した:
sub: indicates the user for which the client is asking for payment initiation.
sub: クライアントが支払い開始を求めている対象のユーザーを示す。
txn: transaction id used to trace the transaction across the services of provider example.com
txn: プロバイダー example.com のサービス間で取引を追跡するために使われる取引 ID
debtorAccount: API-specific field containing the debtor account. In the example, this account was not passed in the authorization_details but was selected by the user during the authorization process. The field user_role conveys the role the user has with respect to this particular account. In this case, they are the owner. This data is used for access control at the payment API (the RS).
debtorAccount: 支払元口座を含む API 固有のフィールド。この例では、この口座は authorization_details で渡されたものではなく、認可プロセス中にユーザーによって選択された。フィールド user_role は、この特定の口座に関してユーザーが持つロールを伝える。この場合、ユーザーは所有者 (owner) である。このデータは支払い API (RS) におけるアクセス制御に使われる。
9.2.Token Introspection
9.2.トークンイントロスペクション
Token introspection [RFC7662] provides a means for an RS to query the AS to determine information about an access token. If the AS includes authorization detail information for the token in its response, the information MUST be conveyed with authorization_details as a top-level member of the introspection response JSON object. The authorization_details member MUST contain the same structure defined in Section 2, potentially filtered and extended for the RS making the introspection request.
トークンイントロスペクション [RFC7662] は、RS が AS に問い合わせてアクセストークンに関する情報を取得する手段を提供する。AS がレスポンスにそのトークンの認可詳細情報を含める場合、その情報はイントロスペクションレスポンスの JSON オブジェクトのトップレベルメンバー authorization_details として伝えなければならない (MUST)。authorization_details メンバーは、2 節で定義された構造と同じものを含まなければならず (MUST)、イントロスペクションリクエストを行う RS 向けにフィルタリングおよび拡張されることがある。
Here is an example introspection response for the payment initiation example:
支払い開始の例に対するイントロスペクションレスポンスの例を次に示す:
{
"active": true,
"sub": "24400320",
"aud": "s6BhdRkqt3",
"exp": 1311281970,
"acr": "psd2_sca",
"txn": "8b4729cc-32e4-4370-8cf0-5796154d1296",
"authorization_details": [
{
"type": "https://scheme.example.com/payment_initiation",
"actions": [
"initiate",
"status",
"cancel"
],
"locations": [
"https://example.com/payments"
],
"instructedAmount": {
"currency": "EUR",
"amount": "123.50"
},
"creditorName": "Merchant123",
"creditorAccount": {
"iban": "DE02100100109307118603"
},
"remittanceInformationUnstructured": "Ref Number Merchant"
}
],
"debtorAccount": {
"iban": "DE40100100103307118608",
"user_role": "owner"
}
} Figure 21: Example of "authorization_details" in Introspection
Response10.Metadata
10.メタデータ
To advertise its support for this feature, the supported list of authorization details types is included in the AS metadata response [RFC8414] using the metadata parameter authorization_details_types_supported, which is a JSON array.
この機能のサポートを公示するために、サポートする認可詳細の種類の一覧を、JSON 配列であるメタデータパラメーター authorization_details_types_supported を用いて AS メタデータレスポンス [RFC8414] に含める。
This is illustrated by the following example:
This is illustrated by the following example:
{
...
"authorization_details_types_supported":[
"payment_initiation",
"account_information"
]
} Figure 22: Example of Server Metadata about the Supported
Authorization DetailsClients MAY indicate the authorization details types they will use when requesting authorization with the client registration metadata parameter authorization_details_types, which is a JSON array.
クライアントは、JSON 配列であるクライアント登録メタデータパラメーター authorization_details_types を用いて、認可を要求する際に使用する認可詳細の種類を示してもよい (MAY)。
This is illustrated by the following example:
これを次の例で示す:
{
...
"authorization_details_types":[
"payment_initiation"
]
}Figure 23: Example of Server Metadata about Authorization Details
The registration of authorization details types with the AS is outside the scope of this specification.
AS への認可詳細の種類の登録は、本仕様の範囲外である。
11.Implementation Considerations
11.実装に関する考慮事項
11.1.Using Authorization Details in a Certain Deployment
11.1.特定の展開における認可詳細の利用
Using authorization details in a certain deployment will require the following steps:
特定の展開で認可詳細を利用するには、次の手順が必要となる:
* Define authorization details types.
* 認可詳細の種類を定義する。
* Publish authorization details types in the OAuth server metadata.
* 認可詳細の種類を OAuth サーバーメタデータで公開する。
* Determine how authorization details are shown to the user in the user consent prompt.
* ユーザー同意画面で認可詳細をユーザーにどのように表示するかを決める。
* If needed, enrich authorization details in the user consent process (e.g., add selected accounts or set expirations).
* 必要に応じて、ユーザー同意プロセスで認可詳細を拡充する (例: 選択された口座を追加する、有効期限を設定する)。
* If needed, determine how authorization details are reflected in access token content or introspection responses.
* 必要に応じて、認可詳細をアクセストークンの内容やイントロスペクションレスポンスにどのように反映するかを決める。
* Determine how the RSs process the authorization details or token data derived from authorization details.
* RS が認可詳細、または認可詳細から導出されたトークンデータをどのように処理するかを決める。
* If needed, entitle clients to use certain authorization details types.
* 必要に応じて、クライアントに特定の認可詳細の種類の利用を許可する。
11.2.Minimal Implementation Support
11.2.最小限の実装サポート
General AS implementations supporting this specification should provide the following basic functions:
本仕様をサポートする汎用の AS 実装は、次の基本機能を提供すべきである:
* Support advertisement of supported authorization details types in OAuth server metadata
* OAuth サーバーメタデータにおけるサポート対象の認可詳細の種類の公示をサポートする
* Accept the authorization_details parameter in authorization requests in conformance with this specification
* 本仕様に従って認可リクエスト内の authorization_details パラメーターを受け付ける
* Support storage of consented authorization details as part of a grant
* グラントの一部として同意済みの認可詳細を保存することをサポートする
* Implement default behavior for adding authorization details to access tokens and token introspection responses in order to make them available to RSs (similar to scope values). This should work with any grant type, especially authorization_code and refresh_token.
* 認可詳細を RS が利用できるようにするために、アクセストークンおよびトークンイントロスペクションレスポンスへ認可詳細を追加する既定の動作を実装する (scope 値と同様)。これは任意のグラントタイプ、特に authorization_code と refresh_token で機能すべきである。
Processing and presentation of authorization details will vary significantly among different authorization details types. Implementations should therefore support customization of the respective behavior. In particular, implementations should allow deployments to:
認可詳細の処理と提示は、認可詳細の種類ごとに大きく異なる。したがって、実装は対応する動作のカスタマイズをサポートすべきである。特に、実装は展開側が次を行えるようにすべきである:
* determine presentation of the authorization details;
* 認可詳細の提示方法を決める
* modify requested authorization details in the user consent process, e.g., adding fields; and
* ユーザー同意プロセスで要求された認可詳細を変更する (例: フィールドの追加)
* merge requested and preexisting authorization details.
* 要求された認可詳細と既存の認可詳細を統合する
One approach to supporting such customization would be to have a mechanism allowing the registration of extension modules, each of them responsible for rendering the respective user consent and any transformation needed to provide the data needed to the RS by way of structured access tokens or token introspection responses.
そのようなカスタマイズをサポートする一つのアプローチは、拡張モジュールの登録を可能にする仕組みを持つことである。各モジュールは、対応するユーザー同意の描画と、構造化アクセストークンまたはトークンイントロスペクションレスポンスを通じて RS に必要なデータを提供するために必要な変換を担当する。
11.3.Use of Machine-Readable Type Schemas
11.3.機械可読な型スキーマの利用
Implementations might allow deployments to use machine-readable schema languages for defining authorization details types to facilitate creating and validating authorization details objects against such schemas. For example, if an authorization details type were defined using JSON Schemas [JSON.Schema], the JSON Schema identifier could be used as type value in the respective authorization details objects.
実装は、認可詳細オブジェクトの作成やスキーマに対する検証を容易にするために、認可詳細の種類の定義に機械可読なスキーマ言語を使うことを展開側に許してもよい。例えば、認可詳細の種類が JSON Schema [JSON.Schema] を使って定義されている場合、対応する認可詳細オブジェクトの type 値として JSON Schema の識別子を使うことができる。
Note, however, that type values are identifiers understood by the AS and, to the extent necessary, the client and RS. This specification makes no assumption that a type value would point to a machine- readable schema format or that any party in the system (such as the client, AS, or RS) would dereference or process the contents of the type field in any specific way.
ただし、type 値は AS、および必要な範囲でクライアントと RS が理解する識別子である点に注意すること。本仕様は、type 値が機械可読なスキーマ形式を指すことや、システム内のいずれかの当事者 (クライアント、AS、RS など) が type フィールドの内容を何らかの特定の方法で参照解決または処理することを前提としない。
11.4.Large Requests
11.4.大きなリクエスト
Authorization request URIs containing authorization_details in a request parameter or a request object can become very long. Therefore, implementers should consider using the request_uri parameter as defined in [RFC9101] in combination with the pushed request object mechanism as defined in [RFC9126] to pass authorization_details in a reliable and secure manner. Here is an example of such a pushed authorization request that sends the authorization request data directly to the AS via an HTTPS-protected connection:
request パラメーターまたはリクエストオブジェクト内に authorization_details を含む認可リクエスト URI は非常に長くなりうる。そのため、実装者は authorization_details を信頼性が高く安全な方法で渡すために、[RFC9101] で定義される request_uri パラメーターを [RFC9126] で定義されるプッシュ型リクエストオブジェクトの仕組みと組み合わせて使うことを検討すべきである。次に、HTTPS で保護された接続を介して認可リクエストデータを AS に直接送信する、そのようなプッシュ型認可リクエストの例を示す:
POST /as/par HTTP/1.1
Host: as.example.com
Content-Type: application/x-www-form-urlencoded
Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 response_type=code&
client_id=s6BhdRkqt3
&state=af0ifjsldkj
&redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
&code_challenge_method=S256
&code_challenge=K2-ltc83acc4h0c9w6ESC_rEMTJ3bwc-uCHaoeK1t8U
&authorization_details=%5B%7B%22type%22%3A%22account_information%22
%2C%22actions%22%3A%5B%22list_accounts%22%2C%22read_balances%22%2C%
22read_transactions%22%5D%2C%22locations%22%3A%5B%22https%3A%2F%2Fe
xample.com%2Faccounts%22%5D%7D%2C%7B%22type%22%3A%22payment_initiat
ion%22%2C%22actions%22%3A%5B%22initiate%22%2C%22status%22%2C%22canc
el%22%5D%2C%22locations%22%3A%5B%22https%3A%2F%2Fexample.com%2Fpaym
ents%22%5D%2C%22instructedAmount%22%3A%7B%22currency%22%3A%22EUR%22
%2C%22amount%22%3A%22123.50%22%7D%2C%22creditorName%22%3A%22Merchan
t123%22%2C%22creditorAccount%22%3A%7B%22iban%22%3A%22DE021001001093
07118603%22%7D%2C%22remittanceInformationUnstructured%22%3A%22Ref%2
0Number%20Merchant%22%7D%5DFigure 24: Example of Large Request including "authorization_details"
12.Security Considerations
12.セキュリティに関する考慮事項
The authorization_details parameter is sent through the user agent in case of an OAuth authorization request, which makes them vulnerable to modifications by the user. If the integrity of the authorization_details is a concern, clients MUST protect authorization_details against tampering and swapping. This can be achieved by signing the request using signed request objects as defined in [RFC9101] or using the request_uri authorization request parameter as defined in [RFC9101] in conjunction with [RFC9126] to pass the URI of the request object to the AS.
OAuth 認可リクエストの場合、authorization_details パラメーターはユーザーエージェントを経由して送られるため、ユーザーによる改変に対して脆弱である。authorization_details の完全性が懸念される場合、クライアントは authorization_details を改ざんおよびすり替えから保護しなければならない (MUST)。これは、[RFC9101] で定義される署名付きリクエストオブジェクトを使ってリクエストに署名するか、[RFC9101] で定義される認可リクエストパラメーター request_uri を [RFC9126] と組み合わせて使い、リクエストオブジェクトの URI を AS に渡すことで実現できる。
All string comparisons in an authorization_details parameter are to be done as defined by [RFC8259]. No additional transformation or normalization is to be done in evaluating equivalence of string values.
authorization_details パラメーター内のすべての文字列比較は、[RFC8259] で定義されるとおりに行う。文字列値の等価性を評価する際に、追加の変換や正規化は行わない。
The common data field locations allows a client to specify where it intends to use a certain authorization, i.e., it is possible to unambiguously assign permissions to RSs. In situations with multiple RSs, this prevents unintended client authorizations (e.g., a read scope value potentially applicable for an email as well as a cloud service) through audience restriction.
共通データフィールド locations により、クライアントは特定の認可をどこで使うつもりかを指定できる。すなわち、許可を RS に曖昧さなく割り当てることが可能である。複数の RS が存在する状況では、これはオーディエンス制限によって、意図しないクライアント認可 (例えば、メールサービスとクラウドサービスの両方に適用されうる read という scope 値) を防ぐ。
The AS MUST properly sanitize and handle the data passed in the authorization_details in order to prevent injection attacks.
AS は、インジェクション攻撃を防ぐために、authorization_details で渡されたデータを適切にサニタイズし処理しなければならない (MUST)。
The Security Considerations of [RFC6749], [RFC7662], and [RFC8414] also apply.
[RFC6749]、[RFC7662]、[RFC8414] のセキュリティに関する考慮事項も適用される。
13.Privacy Considerations
13.プライバシーに関する考慮事項
It is especially important for implementers to design and use authorization details in a privacy-preserving manner.
実装者にとって、プライバシーを保護する形で認可詳細を設計し使用することは特に重要である。
Any sensitive personal data included in authorization_details must be prevented from leaking, e.g., through referrer headers. Implementation options include encrypted request objects as defined in [RFC9101] or transmission of authorization_details via end-to-end encrypted connections between client and AS by utilizing [RFC9126] and the request_uri authorization request parameter as defined in [RFC9101]. The latter does not require application-level encryption, but it requires another message exchange between the client and the AS.
authorization_details に含まれる機微な個人データは、例えばリファラーヘッダーなどを通じて漏えいしないようにしなければならない。実装の選択肢としては、[RFC9101] で定義される暗号化されたリクエストオブジェクト、または [RFC9126] と [RFC9101] で定義される認可リクエストパラメーター request_uri を利用した、クライアントと AS の間のエンドツーエンドで暗号化された接続を介した authorization_details の送信がある。後者はアプリケーションレベルの暗号化を必要としないが、クライアントと AS の間でもう一往復のメッセージ交換を必要とする。
Even if the request data is encrypted, an attacker could use the AS to learn the user's data by injecting the encrypted request data into an authorization request on a device under their control and use the AS's user consent screens to show the (decrypted) user data in the clear. Implementations need to consider this attack vector and implement appropriate countermeasures, e.g., by only showing portions of the data or, if possible, determining whether the assumed user context is still the same (after user authentication).
リクエストデータが暗号化されていても、攻撃者は、暗号化されたリクエストデータを自らの管理下にあるデバイス上の認可リクエストに注入し、AS のユーザー同意画面を使って (復号された) ユーザーデータを平文で表示させることで、AS を利用してユーザーのデータを知ることができる。実装はこの攻撃ベクトルを考慮し、例えばデータの一部のみを表示する、または可能であれば (ユーザー認証後に) 想定されるユーザーコンテキストが依然として同じかどうかを判定するなど、適切な対策を実装する必要がある。
The AS needs to take into consideration the privacy implications when sharing authorization_details with the client or RSs. The AS should share this data with those parties on a "need to know" basis as determined by local policy.
AS は、authorization_details をクライアントや RS と共有する際のプライバシーへの影響を考慮する必要がある。AS は、ローカルポリシーによって定められる「知る必要がある」範囲に基づいて、これらの当事者とこのデータを共有すべきである。
14.IANA Considerations
14.IANA に関する考慮事項
14.1.OAuth Parameters Registration
14.1.OAuth パラメーターの登録
The following parameter has been registered in the "OAuth Parameters" registry [IANA.OAuth.Parameters] established by [RFC6749].
次のパラメーターが、[RFC6749] によって設立された「OAuth Parameters」レジストリ [IANA.OAuth.Parameters] に登録された。
Name: authorization_details
Name: authorization_details
Parameter Usage Location: authorization request, token request, token response
Parameter Usage Location: 認可リクエスト、トークンリクエスト、トークンレスポンス
Change Controller: IETF
Change Controller: IETF
Reference: RFC 9396
Reference: RFC 9396
14.2.JSON Web Token Claims Registration
14.2.JSON Web Token クレームの登録
The following value has been registered in the IANA "JSON Web Token Claims" registry established by [RFC7519].
次の値が、[RFC7519] によって設立された IANA「JSON Web Token Claims」レジストリに登録された。
Claim Name: authorization_details
Claim Name: authorization_details
Claim Description: The claim authorization_details contains a JSON array of JSON objects representing the rights of the access token. Each JSON object contains the data to specify the authorization requirements for a certain type of resource.
Claim Description: クレーム authorization_details は、アクセストークンの権利を表す JSON オブジェクトの JSON 配列を含む。各 JSON オブジェクトは、特定の種類のリソースに対する認可要件を指定するためのデータを含む。
Change Controller: IETF
Change Controller: IETF
Reference: Section 9.1 of RFC 9396
Reference: RFC 9396 の 9.1 節
14.3.OAuth Token Introspection Response Registration
14.3.OAuth トークンイントロスペクションレスポンスの登録
The following value has been registered in the IANA "OAuth Token Introspection Response" registry established by [RFC7662].
次の値が、[RFC7662] によって設立された IANA「OAuth Token Introspection Response」レジストリに登録された。
Name: authorization_details
Name: authorization_details
Description: The member authorization_details contains a JSON array of JSON objects representing the rights of the access token. Each JSON object contains the data to specify the authorization requirements for a certain type of resource.
Description: メンバー authorization_details は、アクセストークンの権利を表す JSON オブジェクトの JSON 配列を含む。各 JSON オブジェクトは、特定の種類のリソースに対する認可要件を指定するためのデータを含む。
Change Controller: IETF
Change Controller: IETF
Reference: Section 9.2 of RFC 9396
Reference: RFC 9396 の 9.2 節
14.4.OAuth Authorization Server Metadata Registration
14.4.OAuth 認可サーバーメタデータの登録
The following values have been registered in the IANA "OAuth Authorization Server Metadata" registry of [IANA.OAuth.Parameters] established by [RFC8414].
次の値が、[RFC8414] によって設立された [IANA.OAuth.Parameters] の IANA「OAuth Authorization Server Metadata」レジストリに登録された。
Metadata Name: authorization_details_types_supported
Metadata Name: authorization_details_types_supported
Metadata Description: JSON array containing the authorization details types the AS supports
Metadata Description: AS がサポートする認可詳細の種類を含む JSON 配列
Change Controller: IETF
Change Controller: IETF
Reference: Section 10 of RFC 9396
Reference: RFC 9396 の 10 節
14.5.OAuth Dynamic Client Registration Metadata Registration
14.5.OAuth 動的クライアント登録メタデータの登録
The following value has been registered in the IANA "OAuth Dynamic Client Registration Metadata" registry of [IANA.OAuth.Parameters] established by [RFC7591].
次の値が、[RFC7591] によって設立された [IANA.OAuth.Parameters] の IANA「OAuth Dynamic Client Registration Metadata」レジストリに登録された。
Client Metadata Name: authorization_details_types
Client Metadata Name: authorization_details_types
Client Metadata Description: Indicates what authorization details types the client uses.
Client Metadata Description: クライアントが使用する認可詳細の種類を示す。
Change Controller: IETF
Change Controller: IETF
Reference: Section 10 of RFC 9396
Reference: RFC 9396 の 10 節
14.6.OAuth Extensions Error Registration
14.6.OAuth 拡張エラーの登録
The following value has been registered in the IANA "OAuth Extensions Error Registry" of [IANA.OAuth.Parameters] established by [RFC6749].
次の値が、[RFC6749] によって設立された [IANA.OAuth.Parameters] の IANA「OAuth Extensions Error Registry」に登録された。
Name: invalid_authorization_details
Name: invalid_authorization_details
Usage Location: token endpoint, authorization endpoint
Usage Location: トークンエンドポイント、認可エンドポイント
Protocol Extension: OAuth 2.0 Rich Authorization Requests
Protocol Extension: OAuth 2.0 Rich Authorization Requests
Change Controller: IETF
Change Controller: IETF
Reference: Section 5 of RFC 9396
Reference: RFC 9396 の 5 節
15.References
15.参考資料
15.1.Normative References
15.1.引用規格
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. [RFC7519] Jones, M., Bradley, J., and N. Sakimura, "JSON Web Token
(JWT)", RFC 7519, DOI 10.17487/RFC7519, May 2015,
<https://www.rfc-editor.org/info/rfc7519>. [RFC7662] Richer, J., Ed., "OAuth 2.0 Token Introspection",
RFC 7662, DOI 10.17487/RFC7662, October 2015,
<https://www.rfc-editor.org/info/rfc7662>. [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC
2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174,
May 2017, <https://www.rfc-editor.org/info/rfc8174>. [RFC8414] Jones, M., Sakimura, N., and J. Bradley, "OAuth 2.0
Authorization Server Metadata", RFC 8414,
DOI 10.17487/RFC8414, June 2018,
<https://www.rfc-editor.org/info/rfc8414>. [RFC8628] Denniss, W., Bradley, J., Jones, M., and H. Tschofenig,
"OAuth 2.0 Device Authorization Grant", RFC 8628,
DOI 10.17487/RFC8628, August 2019,
<https://www.rfc-editor.org/info/rfc8628>. [RFC8707] Campbell, B., Bradley, J., and H. Tschofenig, "Resource
Indicators for OAuth 2.0", RFC 8707, DOI 10.17487/RFC8707,
February 2020, <https://www.rfc-editor.org/info/rfc8707>.15.2.Informative References
15.2.参考文献
[CSC] Cloud Signature Consortium, "Architectures and protocols
for remote signature applications", Version 1.0.4.0, June
2019, <https://cloudsignatureconsortium.org/wp-
content/uploads/2020/01/CSC_API_V1_1.0.4.0.pdf>. [ETSI] ETSI, "Electronic Signatures and Infrastructures (ESI);
Protocols for remote digital signature creation", V1.1.1,
ETSI TS 119 432, March 2019,
<https://www.etsi.org/deliver/
etsi_ts/119400_119499/119432/01.01.01_60/
ts_119432v010101p.pdf>. [IANA.OAuth.Parameters]
IANA, "OAuth Parameters",
<https://www.iana.org/assignments/oauth-parameters>. [JSON.Schema]
OpenJS Foundation, "JSON Schema",
<https://json-schema.org/>. [OID-CIBA] Fernandez, G., Walter, F., Nennker, A., Tonge, D., and B.
Campbell, "OpenID Connect Client-Initiated Backchannel
Authentication Flow - Core 1.0", 1 September 2021,
<https://openid.net/specs/openid-client-initiated-
backchannel-authentication-core-1_0.html>. [OIDC] Sakimura, N., Bradley, J., Jones, M., de Medeiros, B., and
C. Mortimore, "OpenID Connect Core 1.0 incorporating
errata set 1", 8 November 2014,
<https://openid.net/specs/openid-connect-core-1_0.html>. [RFC0020] Cerf, V., "ASCII format for network interchange", STD 80,
RFC 20, DOI 10.17487/RFC0020, October 1969,
<https://www.rfc-editor.org/info/rfc20>. [RFC6749] Hardt, D., Ed., "The OAuth 2.0 Authorization Framework",
RFC 6749, DOI 10.17487/RFC6749, October 2012,
<https://www.rfc-editor.org/info/rfc6749>. [RFC7591] Richer, J., Ed., Jones, M., Bradley, J., Machulak, M., and
P. Hunt, "OAuth 2.0 Dynamic Client Registration Protocol",
RFC 7591, DOI 10.17487/RFC7591, July 2015,
<https://www.rfc-editor.org/info/rfc7591>. [RFC8259] Bray, T., Ed., "The JavaScript Object Notation (JSON) Data
Interchange Format", STD 90, RFC 8259,
DOI 10.17487/RFC8259, December 2017,
<https://www.rfc-editor.org/info/rfc8259>. [RFC9101] Sakimura, N., Bradley, J., and M. Jones, "The OAuth 2.0
Authorization Framework: JWT-Secured Authorization Request
(JAR)", RFC 9101, DOI 10.17487/RFC9101, August 2021,
<https://www.rfc-editor.org/info/rfc9101>. [RFC9126] Lodderstedt, T., Campbell, B., Sakimura, N., Tonge, D.,
and F. Skokan, "OAuth 2.0 Pushed Authorization Requests",
RFC 9126, DOI 10.17487/RFC9126, September 2021,
<https://www.rfc-editor.org/info/rfc9126>. [Transaction-Auth]
Lodderstedt, T., "Transaction Authorization or why we need
to re-think OAuth scopes", 20 April 2019,
<https://medium.com/oauth-2/transaction-authorization-or-
why-we-need-to-re-think-oauth-scopes-2326e2038948>.A.Additional Examples
A.追加の例
A.1.OpenID Connect
A.1.OpenID Connect
OpenID Connect [OIDC] specifies the JSON-based claims request parameter that can be used to specify the claims a client (acting as an OpenID Connect Relying Party) wishes to receive in a fine-grained and privacy-preserving way as well as assign those claims to certain delivery mechanisms, i.e., ID Token or userinfo response.
OpenID Connect [OIDC] は、JSON ベースのリクエストパラメーター claims を規定している。これは、クライアント (OpenID Connect Relying Party として動作する) が受け取りたいクレームをきめ細かくプライバシーを保護する形で指定し、さらにそれらのクレームを特定の配送手段、すなわち ID トークンまたは userinfo レスポンスに割り当てるために使用できる。
The combination of the scope value openid and the additional parameter claims can be used beside authorization_details in the same way as every non-OIDC scope value.
scope 値 openid と追加パラメーター claims の組み合わせは、OIDC 以外のあらゆる scope 値と同じように、authorization_details と並べて使用できる。
Alternatively, there could be an authorization details type for OpenID Connect. This section gives an example of what such an authorization details type could look like, but defining this authorization details type is outside the scope of this specification.
あるいは、OpenID Connect 用の認可詳細の種類を設けることも考えられる。本節は、そのような認可詳細の種類がどのようなものになりうるかの例を示すが、この認可詳細の種類の定義は本仕様の範囲外である。
These hypothetical examples try to encapsulate all details specific to the OpenID Connect part of an authorization process into an authorization JSON object.
これらの仮想的な例は、認可プロセスのうち OpenID Connect に固有のすべての詳細を、一つの認可 JSON オブジェクトにまとめることを試みている。
The top-level fields are based on the definitions given in [OIDC]:
トップレベルのフィールドは、[OIDC] で与えられる定義に基づく:
claim_sets: the names of predefined claim sets, replacement for respective scope values, such as profile
claim_sets: 事前定義されたクレーム集合の名前。profile などの対応する scope 値の代替
max_age: Maximum Authentication Age
max_age: 最大認証経過時間 (Maximum Authentication Age)
acr_values: requested Authentication Context Class Reference (ACR) values
acr_values: 要求する認証コンテキストクラス参照 (ACR) の値
claims: the claims JSON structure as defined in [OIDC]
claims: [OIDC] で定義される claims の JSON 構造
This is a simple request for some claim sets.
これは、いくつかのクレーム集合に対する単純なリクエストである。
[
{
"type": "openid",
"locations": [
"https://op.example.com/userinfo"
],
"claim_sets": [
"email",
"profile"
]
}
] Figure 25: Example of OpenID Connect Request Utilizing
"authorization_details" | Note: locations specifies the location of the userinfo endpoint
| since this is the only place where an access token is used by a
| client (Relying Party) in OpenID Connect to obtain claims.A more sophisticated example is shown in Figure 26.
より高度な例を図 26 に示す。
[
{
"type": "openid",
"locations": [
"https://op.example.com/userinfo"
],
"max_age": 86400,
"acr_values": "urn:mace:incommon:iap:silver",
"claims": {
"userinfo": {
"given_name": {
"essential": true
},
"nickname": null,
"email": {
"essential": true
},
"email_verified": {
"essential": true
},
"picture": null,
"http://example.com/claims/groups": null
},
"id_token": {
"auth_time": {
"essential": true
}
}
}
}
] Figure 26: Advanced Example of OpenID Connect Request Utilizing
"authorization_details"A.2.Remote Electronic Signing
A.2.リモート電子署名
The following example is based on the concept laid out for remote electronic signing in ETSI TS 119 432 [ETSI] and the Cloud Signature Consortium (CSC) API for remote signature creation [CSC].
次の例は、ETSI TS 119 432 [ETSI] および Cloud Signature Consortium (CSC) のリモート署名作成 API [CSC] で示されたリモート電子署名の概念に基づく。
[
{
"type": "sign",
"locations": [
"https://signing.example.com/signdoc"
],
"credentialID": "60916d31-932e-4820-ba82-1fcead1c9ea3",
"documentDigests": [
{
"hash": "sTOgwOm+474gFj0q0x1iSNspKqbcse4IeiqlDg/HWuI=",
"label": "Credit Contract"
},
{
"hash": "HZQzZmMAIWekfGH0/ZKW1nsdt0xg3H6bZYztgsMTLw0=",
"label": "Contract Payment Protection Insurance"
}
],
"hashAlgorithmOID": "2.16.840.1.101.3.4.2.1"
}
]Figure 27: Example of Electronic Signing
The top-level fields have the following meaning:
トップレベルのフィールドは次の意味を持つ:
credentialID: identifier of the certificate to be used for signing
credentialID: 署名に使用する証明書の識別子
documentDigests: array containing the hash of every document to be signed (hash fields). Additionally, the corresponding label field identifies the respective document to the user, e.g., to be used in user consent.
documentDigests: 署名対象の各文書のハッシュ (hash フィールド) を含む配列。加えて、対応する label フィールドは、例えばユーザー同意で使うために、それぞれの文書をユーザーに対して識別する。
hashAlgorithm: algorithm that was used to calculate the hash values
hashAlgorithm: ハッシュ値の計算に使用されたアルゴリズム
The AS is supposed to ask the user for consent for the creation of signatures for the documents listed in the structure. The client uses the access token issued as a result of the process to call the document signature API at the respective signing service to actually create the signature. This access token is bound to the client, the user ID and the hashes (and signature algorithm) as consented by the user.
AS は、この構造に列挙された文書に対する署名の作成について、ユーザーに同意を求めることが想定される。クライアントは、このプロセスの結果として発行されたアクセストークンを使って、対応する署名サービスの文書署名 API を呼び出し、実際に署名を作成する。このアクセストークンは、ユーザーが同意したとおりに、クライアント、ユーザー ID、ハッシュ (および署名アルゴリズム) に束縛される。
A.3.Access to Tax Data
A.3.税務データへのアクセス
This example is inspired by an API allowing third parties to access citizen's tax declarations and income statements, for example, to determine their creditworthiness.
この例は、例えば信用力を判定するために、第三者が市民の納税申告や所得証明にアクセスできるようにする API から着想を得たものである。
[
{
"type": "tax_data",
"locations": [
"https://taxservice.govehub.no.example.com"
],
"actions":"read_tax_declaration",
"periods": ["2018"],
"duration_of_access": 30,
"tax_payer_id": "23674185438934"
}
]Figure 28: Example of Tax Data Access
The top-level fields have the following meaning:
トップレベルのフィールドは次の意味を持つ:
periods: the periods the client wants to access
periods: クライアントがアクセスしたい期間
duration_of_access: how long the clients intend to access the data in days
duration_of_access: クライアントがデータにアクセスしようとする期間 (日数)
tax_payer_id: identifier of the taxpayer (if known to the client)
tax_payer_id: 納税者の識別子 (クライアントが知っている場合)
A.4.eHealth
A.4.eHealth
These two examples are inspired by requirements for APIs used in the Norwegian eHealth system.
これら 2 つの例は、ノルウェーの eHealth システムで使われる API の要件から着想を得たものである。
In this use case, the physical therapist sits in front of their computer using a local Electronic Health Records (EHR) system. They want to look at the electronic patient records of a certain patient, and they also want to fetch the patient's journal entries in another system, perhaps at another institution or a national service. Access to this data is provided by an API.
このユースケースでは、理学療法士が自分のコンピューターの前に座り、ローカルの電子健康記録 (EHR) システムを使っている。理学療法士は特定の患者の電子患者記録を閲覧したいと考えており、さらに別のシステム (おそらく別の施設や国のサービス) にあるその患者の診療記録の項目も取得したいと考えている。このデータへのアクセスは API によって提供される。
The information necessary to authorize the request at the API is only known by the EHR system and must be presented to the API.
API でリクエストを認可するために必要な情報は EHR システムのみが知っており、API に提示されなければならない。
In the first example, the authorization details object contains the identifier of an organization. In this case, the API needs to know if the given organization has the lawful basis for processing personal health information to give access to sensitive data.
1 つ目の例では、認可詳細オブジェクトは組織の識別子を含む。この場合、API は、機微なデータへのアクセスを与えるために、当該組織が個人の健康情報を処理する法的根拠を持つかどうかを知る必要がある。
"authorization_details": {
"type": "patient_record",
"requesting_entity": {
"type": "Practitioner",
"identifier": [
{
"system": "urn:oid:2.16.578.1.12.4.1.4.4",
"value": "1234567"
}],
"practitioner_role": {
"organization": {
"identifier": {
"system": "urn:oid:2.16.578.1.12.4.1.2.101",
"type": "ENH",
"value": "[organizational number]"
}
}
}
}
}Figure 29: eHealth Example
In the second example, the API requires more information to authorize the request. In this case, the authorization details object contains additional information about the health institution and the current profession the user has at the time of the request. The additional level of detail could be used for both authorization and data minimization.
2 つ目の例では、API はリクエストを認可するためにより多くの情報を必要とする。この場合、認可詳細オブジェクトは、医療機関およびリクエスト時点でユーザーが持つ現在の職業に関する追加情報を含む。この追加の詳細レベルは、認可とデータ最小化の両方に利用できる。
[
{
"type": "patient_record",
"location": "https://fhir.example.com/patient",
"actions": [
"read"
],
"patient_identifier": [
{
"system": "urn:oid:2.16.578.1.12.4.1.4.1",
"value": "12345678901"
}
],
"reason_for_request": "Clinical treatment",
"requesting_entity": {
"type": "Practitioner",
"identifier": [
{
"system": "urn:oid:2.16.578.1.12.4.1.4.4",
"value": "1234567"
}
],
"practitioner_role": {
"organization": {
"identifier": [
{
"system": "urn:oid:2.16.578.1.12.4.1.2.101",
"type": "ENH",
"value": "<organizational number>"
}
],
"type": {
"coding": [
{
"system":
"http://hl7.example.org/fhir/org-type",
"code": "dept",
"display": "Hospital Department"
}
]
},
"name": "Akuttmottak"
},
"profession": {
"coding": [
{
"system": "http://snomed.example.org/sct",
"code": "36682004",
"display": "Physical therapist"
}
]
}
}
}
}
]Figure 30: Advanced eHealth Example
Description of the fields:
フィールドの説明:
patient_identifier: the identifier of the patient composed of a system identifier in OID format (namespace) and the actual value within this namespace.
patient_identifier: OID 形式のシステム識別子 (名前空間) と、その名前空間内での実際の値から構成される患者の識別子。
reason_for_request: the reason why the user wants to access a certain API.
reason_for_request: ユーザーが特定の API にアクセスしたい理由。
requesting_entity: specification of the requester by means of identity, role and organizational context. This data is provided to facilitate authorization and for auditing purposes.
requesting_entity: アイデンティティ、ロール、組織的コンテキストによる要求者の指定。このデータは認可を容易にするため、および監査目的で提供される。
In this use case, the AS authenticates the requester, who is not the patient, and approves access based on policies.
このユースケースでは、AS は患者ではない要求者を認証し、ポリシーに基づいてアクセスを承認する。
Acknowledgements
謝辞
We would like to thank Daniel Fett, Sebastian Ebling, Dave Tonge, Mike Jones, Nat Sakimura, and Rob Otto for their valuable feedback during the preparation of this specification.
本仕様の準備にあたり貴重なフィードバックをくださった Daniel Fett、Sebastian Ebling、Dave Tonge、Mike Jones、Nat Sakimura、Rob Otto に感謝する。
We would also like to thank Vladimir Dzhuvinov, Takahiko Kawasaki, Daniel Fett, Dave Tonge, Travis Spencer, Joergen Binningsboe, Aamund Bremer, Steinar Noem, Francis Pouatcha, Jacob Ideskog, Hannes Tschofenig, and Aaron Parecki for their valuable feedback to this specification.
また、本仕様に貴重なフィードバックをくださった Vladimir Dzhuvinov、Takahiko Kawasaki、Daniel Fett、Dave Tonge、Travis Spencer、Joergen Binningsboe、Aamund Bremer、Steinar Noem、Francis Pouatcha、Jacob Ideskog、Hannes Tschofenig、Aaron Parecki にも感謝する。