Skip to content
OAuth Working Group                                         S. Cecchetti
Internet-Draft                                                    Amazon
Intended status: Standards Track                        21 February 2024
Expires: 24 August 2024

draft-cecchetti-oauth-rar-cedar-02

Abstract

この仕様は、authorization_details JSONオブジェクト内で、Cedarポリシー形式による OAuth 2.0 Rich Authorization Requests のプロファイルを定義する。異なるベンダーの Authorization Server と Resource Server は、このプロファイルを活用することで、関連する Cedar のポリシーセットを相互運用可能な形で配布し、受領できる。

Status of This Memo

本 Internet-Draft は、BCP 78 および BCP 79 の規定に完全に準拠して提出されている。

Internet-Drafts は、Internet Engineering Task Force (IETF) の作業文書である。なお、他のグループも Internet-Draft として作業文書を配布することがある。現行の Internet-Drafts の一覧は https://datatracker.ietf.org/drafts/current/ にある。

Internet-Drafts は最長 6 か月間有効な草案文書であり、いつでも更新、置換、または廃止される可能性がある。Internet-Drafts を参照資料として用いたり、「進行中の作業 (work in progress)」以外の形で引用したりすることは不適切である。

本 Internet-Draft は 24 August 2024 に失効する。

Copyright Notice

Copyright (c) 2024 IETF Trust および文書著者として識別された者。All rights reserved.

本文書は、本文書の公開日に有効な、BCP 78 および IETF Trust の IETF Documents に関する Legal Provisions (https://trustee.ietf.org/license-info) の適用を受ける。これらの文書には、本書に関するあなたの権利および制約が記載されているため、十分に確認すること。本文書から抽出された Code Components には、Trust Legal Provisions の Section 4.e で記述される Revised BSD License の文言を含めなければならず、また Revised BSD License に記載のとおり、無保証で提供される。


Table of Contents

Note: Table of Contents は英語のまま(原文どおり)保持します。

- 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 2 - 1.1. Requirements Notation and Conventions . . . . . . . . . . 3 - 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 - 2. Request in Cedar Policy Format . . . . . . . . . . . . . . . 3 - 7. Token Response . . . . . . . . . . . . . . . . . . . . . . . 5 - 4. Security Considerations . . . . . . . . . . . . . . . . . . . 6 - 5. Privacy Considerations . . . . . . . . . . . . . . . . . . . 6 - 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 - 7. References . . . . . . . . . . . . . . . . . . . . . . . . . 6 - 7.1. Normative References . . . . . . . . . . . . . . . . . . 6 - 7.2. Informative References . . . . . . . . . . . . . . . . . 7 - Appendix A. Acknowledgements . . . . . . . . . . . . . . . . . . 7 - Appendix B. Document History . . . . . . . . . . . . . . . . . . 7 - Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 7


1. Introduction

元の OAuth 2.0 Rich Authorization Requests 仕様は、authorization_detail パラメータについて特定の形式を必須としていない。本仕様は、独自仕様の authorization_detail 形式に代わるものとして、標準化され相互運用可能なプロファイルを提供することを目的とする。

Cedar ポリシー応答形式の目的は、Authorization Server がクライアントに対して、権限の集合を Cedar のポリシー形式で提供できるようにすることである。これにより、クライアントと Resource Server は、Authorization Server によって署名された「どの文脈でどの操作が許可されるか」について、共通の理解を持てる。

例えば、クレジット振込(複数のオープンバンキングの取り組みでは「payment initiation」として指定される)に対する authorization request は、以下のように、二重引用符をエスケープした JSON オブジェクト内の Cedar ポリシーとして表現できる。

{
  "type": "payment_initiation",
  "rarFormat": "cedar",
  "policySet": "
    permit (
          principal == BankA::User::\"696d28c8-8912-41d2-b182-aa7087323318\",
          action == BankA::Action::\"initiate\",
      resource == Creditor::\"https://example.com/payments\"
          )
          when { context.instructedAmount.currency == \"EUR\" &&
      context.instructedAmount.amount == decimal(\"123.50\") &&
      resource.creditorName == \"Merchant A\" &&
      resource.creditorAccount.bic == \"ABCIDEFFXXX\" &&
      resource.creditorAccount.iban == \"DE02100100109307118603\" &&
      context.remittanceInformationUnstructured == \"Ref Number Merchant\"
          };
  "
}

Figure 1: クレジット振込のための Cedar Authorization Request の例

最後に、本仕様は、発生しがちな誤りやアンチパターンを防ぐことを意図した、セキュリティおよびプライバシーの考慮事項を提供する。


1.1. Requirements Notation and Conventions

本文書中のキーワード「MUST」「MUST NOT」「REQUIRED」「SHALL」「SHALL NOT」「SHOULD」「SHOULD NOT」「RECOMMENDED」「NOT RECOMMENDED」「MAY」「OPTIONAL」は、ここに示すようにすべて大文字で表記される場合に限り、BCP 14 に記載のとおりに解釈される。


1.2. Terminology

本仕様は、The OAuth 2.0 Authorization Framework により定義された用語「access token」「refresh token」「authorization server」「resource server」「authorization endpoint」「authorization request」「authorization response」「token endpoint」「grant type」「access token request」「access token response」および「client」を用いる。


2. Request in Cedar Policy Format

Rich Authorization Request の token request における authorization_details パラメータには、フィールド "rarFormat" を含めてもよい (MAY)。そして、このプロファイルに準拠するためには、そのフィールドは値 "cedar" と等しくなければならない (MUST)。

authorization_details 配列は、同一の type のエントリを複数含めてもよい (MAY)。

Figure 2 は、上記の例データを用いた type が payment_initiation の authorization_details を示す。

[
  {
    "type": "payment_initiation",
    "rarFormat": "cedar",
    "policySet": "
      permit (
        principal == BankA::User::\"696d28c8-8912-41d2-b182-aa7087323318\",
        action in [BankA::Action::\"initiate\", BankA::Action::\"status\", BankA::Action::\"cancel\"],
        resource == Creditor::\"https://example.com/payments\"
      )
      when { context.instructedAmount.currency == \"EUR\" &&
        context.instructedAmount.amount == decimal(\"123.50\") &&
        resource.creditorName == \"Merchant A\" &&
        resource.creditorAccount.iban == \"DE02100100109307118603\" &&
        context.remittanceInformationUnstructured == \"Ref Number Merchant\"
      };
    "
  }
]

Figure 2: クレジット振込のための "authorization_details" の例

Figure 3 は、口座情報へのアクセスと、支払い開始の許可を同時に要求する combined request を示す。

[
  {
    "type": "account_information",
    "rarFormat": "cedar",
    "policySet": "
      permit (
        principal == BankA::User::\"696d28c8-8912-41d2-b182-aa7087323318\",
        action in [BankA::Action::\"list_accounts\", BankA::Action::\"read_balances\", BankA::Action::\"read_transactions\"],
        resource == BankA::\"https://example.com/accounts\"
      );
    "
  },
  {
    "type": "payment_initiation",
    "rarFormat": "cedar",
    "policySet": "
      permit (
        principal == BankA::User::\"696d28c8-8912-41d2-b182-aa7087323318\",
        action in [BankA::Action::\"initiate\", BankA::Action::\"status\", BankA::Action::\"cancel\"],
        resource == Creditor::\"https://example.com/payments\"
      )
      when { context.instructedAmount.currency == \"EUR\" &&
        context.instructedAmount.amount == decimal(\"123.50\") &&
        resource.creditorName == \"Merchant A\" &&
        resource.creditorAccount.iban == \"DE02100100109307118603\" &&
        context.remittanceInformationUnstructured == \"Ref Number Merchant\"
      };
    "
  }
]

Figure 3: Combined Request の "authorization_details" の例


7. Token Response

Rich Authorization Request の token response における authorization_details パラメータには、フィールド "rarFormat" を含めてもよい (MAY)。そして、そのフィールドは値 "cedar" と等しくなければならない (MUST)。

AS は、要求されたポリシーよりも許可範囲が狭いポリシーを、authorization_details 内でクライアントに返してもよい (MAY)。

先ほどからの例では、次のようになる。

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",
      "rarFormat": "cedar",
      "policySet": "
        permit (
          principal == BankA::User::\"696d28c8-8912-41d2-b182-aa7087323318\",
          action in [BankA::Action::\"initiate\", BankA::Action::\"status\", BankA::Action::\"cancel\"],
          resource == Creditor::\"https://example.com/payments\"
        )
        when { context.instructedAmount.currency == \"EUR\" &&
          context.instructedAmount.amount == decimal(\"123.50\") &&
          resource.creditorName == \"Merchant A\" &&
          resource.creditorAccount.iban == \"DE02100100109307118603\" &&
          context.remittanceInformationUnstructured == \"Ref Number Merchant\"
        };
      "
    }
  ]
}

Figure 4: Token Response の例


4. Security Considerations

[[todo]]


5. Privacy Considerations

[[todo]]


6. IANA Considerations

[[todo]]


7. References

7.1. Normative References

(本文中には内容の記載なし)


7.2. Informative References

(本文中には内容の記載なし)


Appendix A. Acknowledgements

[[todo]]


Appendix B. Document History

(本文中には内容の記載なし)


Author's Address

Sarah Cecchetti\ Amazon\ Email: sarahcec@amazon.com