Upgrade to Pro — share decks privately, control downloads, hide ads and more …

20231109 OpenID TechNight vol.20 「OpenID Federation」

20231109 OpenID TechNight vol.20 「OpenID Federation」

「OpenID Federation」
OpenID TechNight vol.20 ~ 分散型 ID 技術勉強会 ~ 2023/11/09(木)

OpenID Foundation Japan

November 09, 2023
Tweet

More Decks by OpenID Foundation Japan

Other Decks in Technology

Transcript

  1. R. Hedberg, Ed. M.B. Jones A.Å. Solberg J. Bradley G.

    De Marco V. Dzhuvinov indepedent Self-Issued Consulting Sikt Yubico indepedent Connect2id Appendix D. Document History [[ To be removed from the final specification ]] -30 • ...... • Fixed #1727: Changed specification name from "OpenID Connect Federation" to "OpenID Federation". Workgroup: OpenID Connect Working Group Published: 5 October 2023 Authors: OpenID Federation 1.0 – draft 30 ドラフト30で仕様の名称が 『OpenID Connect Federation』から 『OpenID Federation』に変更された。
  2. https://gainforum.org/GAINWhitePaper.pdf GAIN Global Assured Identity Network GAIN (Global Assured Identity

    Network) は インターネット上に信頼性の⾼いデジタル アイデンティティネットワークを構築する プロジェクトです。 150名以上の関連分野の専⾨家が集まり、 GAIN DIGITAL TRUSTという⽩書を 執筆し、2021年9⽉に公開しました。 GAINの実現可能性を検証するため GAIN PoC Community Group が作られました。
  3. 現在のエコシステムのアーキテクチャ (1/4) オープンバンキングはイギリスで 始まり、世界に広がっていきました。 各国は独⾃のエコシステムを構築し、 複数のサービスと複数のアプリが 接続できるようにしました。 サービスとアプリは、OAuth 2.0 と

    OpenID Connect で技術詳細が定義 されている認可サーバとOAuth クラ イアントを実装しました。 英国 オープン バンキング オーストラリア 消費者データ権 ブラジル オープン ファイナンス サウジアラビア オープン バンキング
  4. 現在のエコシステムのアーキテクチャ (3/4) この関係を築くため、アプリケーションは動的クライアント登録という 仕組みを使い、⾃⾝を各認可サーバに登録します。 サービス 認可サーバ アプリ OAuth クライアント 動的クライアント

    登録エンドポイント クライアントのメタデータ クライアントのメタデータと識別⼦ クライアント識別⼦ サービス 認可サーバ OAuth クライアント 動的クライアント 登録エンドポイント クレイアントのメタデータ クライアントのメタデータと識別⼦ クライアント識別⼦
  5. 現在のエコシステムのアーキテクチャ (4/4) 認可を受けていない者によるクライアント登録を 防ぐため、実世界のシステムでは何らかの対策が 講じられます。 ⼀例として、動的クライアント登録リクエストに 中央の権威機関が発⾏したソフトウェアステート メントを含めることを要求する⽅法があります。 サービス 認可サーバ

    アプリ OAuth クライアント 動的クライアント 登録エンドポイント クライアントのメタデータ + ソフトウェアステートメント クライアントのメタデータと識別⼦ クライアント識別⼦ 中央 権威機関 ソフトウェア ステートメント 発⾏
  6. アプリ オープンバンキングディレクトリ 鍵ペア ソフトウェアステートメント クライアント情報 署名 クライアント情報 秘密鍵でクライアント 情報に署名し、ソフト ウェアステートメント

    を⽣成する。 秘密鍵 署名 ソフトウェアステートメント発⾏API JWKセットエンドポイント 公開鍵を含む JWK セット ① ② ③ 認可サーバ ソフトウェア ステートメント発⾏ ソフトウェア ステートメント要求 クライアント登録エンドポイント ソフトウェアステートメント クライアント情報 署名 { "keys": [ ....., ]} 公開鍵 公開鍵 公開鍵 ソフトウェアステートメント クライアント情報 署名 検証 ⑤ ⑥ JWKセット送信 JWKセット要求 ソフトウェアステートメント および追加のクライアントメ タデータを含む動的クライア ント登録リクエスト ④ ⑦
  7. 採⽤された世界標準仕様 • OpenID Connect Federation 1.0 • OpenID Connect for

    Identity Assurance 1.0 GAIN POCフェーズ1 • OpenID for Verifiable Credential Issuance • SD-JWT-based Verifiable Credentials (SD-JWT VC) • OAuth 2.0 Attestation-Based Client Authentication GAIN POCフェーズ2
  8. クライアントA-1 クライアントA-2 クライアントA-3 認可サーバA 管理下 (直接的関係) クライアントB-1 クライアントB-2 クライアントB-3 認可サーバB

    管理下 (直接的関係) 中間 権威機関A トラスト アンカーA 信頼 トラストチェーンにより確⽴される関係 OpenID Federation 概要 トラスト アンカーB 中間 権威機関B 認可 認可 認可 信頼 認可 トラストチェーン トラストチェーン
  9. トラストチェーン 末端エンティティ ⾃⾝が発⾏する、 ⾃⾝のメタデータ を記述したもの。 中間権威機関が、 下位エンティティ を認可しているこ とを⽰すもの。 トラストアンカー

    が、下位エンティ ティを認可してい ることを⽰すもの。 トラストアンカー ⾃⾝が発⾏する、 ⾃⾝のメタデータ を記述したもの。 発⾏ 発⾏ 発⾏ エンティティ ステートメント エンティティ ステートメント エンティティ ステートメント エンティティ ステートメント エンティティ コンフィギュレーション エンティティ コンフィギュレーション 末端エンティティ Leaf Entity 中間権威機関 Intermediate Authority トラストアンカー Trust Anchor トラストチェーンの構成要素 フェデレーション エンティティ群
  10. TRUST CHAIN Leaf Entity LEの秘密鍵 LEの公開鍵 署名 署名 IAの秘密鍵 IAの公開鍵

    署名 署名 TAの秘密鍵 TAの公開鍵 署名 署名 署名 署名 Intermediate Authority Trust Anchor 発⾏ 発⾏ 発⾏ { "iss": , } LEの識別⼦ "sub": , LEの識別⼦ "jwks":[ ], ... LEの公開鍵 IAの識別⼦ { "iss": , } "sub": , LEの識別⼦ LEの公開鍵 "jwks":[ ], ... { "iss": , } TAの識別⼦ IAの識別⼦ "sub": , IAの公開鍵 "jwks":[ ], ... { "iss": , } TAの識別⼦ TAの識別⼦ "sub": , TAの公開鍵 "jwks":[ ], ...
  11. トラストチェーン解決 末端エンティティ コンフィギュレーション エンドポイント 中間権威機関 フェッチエンドポイント トラストチェーン トラストアンカー フェッチエンドポイント 末端エンティティの

    エンティティ コンフィギュレーション 中間権威機関が発⾏する エンティティ ステートメント トラストアンカーが 発⾏するエンティティ ステートメント
  12. TRUST CHAIN Leaf Entity /123/.well-known/openid-federation https://rp.example.com Intermediate Authority /.well-known/openid-federation {

    "iss":"https://ia.example.com", "sub":"https://ia.example.com", "metadata":{ "federation_entity":{ "federation_fetch_endpoint": "https://ia.example.com/fetch", ... }, }, "authority_hints":[ "https://ta.example.com" ], entity configuration Trust Anchor /.well-known/openid-federation https://ta.example.com { "iss":"https://ta.example.com", "sub":"https://ta.example.com", "metadata":{ "federation_entity":{ "federation_fetch_endpoint": "https://ta.example.com/fetch", entity configuration 例:末端エンティティの識別⼦が https://rp.example.com/123 の場合 entity configuration { "iss":"https://rp.example.com/123", "sub":"https://rp.example.com/123", "authority_hints":[ "https://ia.example.com" ], "jwks":[ ], LEの公開鍵 { "iss":"https://ia.example.com", "sub":"https://rp.example.com/123", "jwks":[ ], LEの公開鍵 { "iss":"https://ta.example.com", "sub":"https://ia.example.com", "jwks":[ ], IAの公開鍵 https://ia.example.com sub= https://rp.example.com/123 /fetch sub=https://ia.example.com /fetch
  13. エンティティのメタデータ エンティティ /.well-known/ openid-federation { ..., "metadata": { "エンティティタイプ識別⼦": {

    } } } エンティティコンフィギュレーション メタデータ エンティティタイプ識別⼦ • openid_relying_party • openid_provider • oauth_authorization_server • oauth_client • oauth_resource • federation_entity • openid_credential_issuer
  14. { "iss":"https://idp.example.com", "sub":"https://idp.example.com", "authority_hints":[ "https://ia.example.com" ], "jwks":[ ], "metadata":{ "openid_provider":{

    "issuer":"https://idp.example.com", "authorization_endpoint": "https://idp.example.com/authorize", "token_endpoint": "https://idp.example.com/token", "userinfo_endpoint": "https://idp.example.com/userinfo", ... } }, ... } /.well-known/openid-federation https://idp.example.com entity configuration identity provider's public key entity configuration of an identity provider OpenIDプロバイダの エンティティコンフィギュレーションの例
  15. { "iss":"https://rp.example.com/123", "sub":"https://rp.example.com/123", "authority_hints":[ "https://ia.example.com" ], "jwks":[ ], "metadata":{ "openid_relying_party":{

    "redirect_uris":[ "https://rp.example.com/123/callback" ], "response_types":[ "code" ], ... } }, ... } /123/.well-known/openid-federation https://rp.example.com entity configuration relying party's public key entity configuration of a relying party OpenIDリライングパーティの エンティティコンフィギュレーションの例
  16. { "iss":"https://ia.example.com", "sub":"https://ia.example.com", "authority_hints":[ "https://ta.example.com" ], "jwks":[ ], "metadata":{ "federation_entity":{

    "federation_fetch_endpoint": "https://ia.example.com/fetch", "federation_list_endpoint": "https://ia.example.com/list", "federation_resolve_endpoint": "https://ia.example.com/resolve", ... } }, ... } /.well-known/openid-federation https://ia.example.com entity configuration intermediate authority's public key entity configuration of an intermediate authority 中間権威機関の エンティティコンフィギュレーションの例
  17. { "iss":"https://ta.example.com", "sub":"https://ta.example.com", "jwks":[ ], "metadata":{ "federation_entity":{ "federation_fetch_endpoint": "https://ta.example.com/fetch", "federation_list_endpoint":

    "https://ta.example.com/list", "federation_resolve_endpoint": "https://ta.example.com/resolve", ... } }, ... } /.well-known/openid-federation https://ta.example.com entity configuration trust anchor's public key entity configuration of a trust anchor トラストアンカーの エンティティコンフィギュレーションの例
  18. エンティティID https://relying-party.authlete.net/5899463614448063 の クライアントを受け⼊れるためにトラストチェーンの解決を⾏う。 ① エンティティコンフィギュレーションを取得する。 $ curl -s https://relying-party.authlete.net/5899463614448

    063/.well-known/openid-federation "authority_hints": [ "https://trust-anchor.authlete.net/" ], 返ってくるJWTのペイロード部分には "authority_hints" が含まれている。 "authority_hints" 配列には上位権威機関群(中間権威機関や トラストアンカー)が列挙されている。 (名前から推察できるように、この例では直接の上位機関がトラストアンカーとなっている。)
  19. ②上位権威機関のエンティティコンフィギュレーションを取得する。 $ curl -s https://trust-anchor.authlete.net/.well-known/op enid-federation "metadata": { "federation_entity": {

    "federation_list_endpoint": "https://trust-anchor.authlete.net/list/", "federation_fetch_endpoint": "https://trust-anchor.authlete.net/fetch/" } } ペイロード部分には "federation_fetch_endpoint" が含まれている。 "federation_fetch_endpoint" で⽰されるエンドポイントから エンティティステートメントを取得できる。
  20. ③エンティティステートメントを取得する。 $ curl -s https://trust-anchor.authlete.net/fetch/?sub=htt ps://relying-party.authlete.net/5899463614448063 "iss": "https://trust-anchor.authlete.net/", "sub": "https://relying-party.authlete.net/5899463614448063",

    "jwks": { "keys": [ { ... } ] } 返ってくるJWTのペイロード部分を⾒ると、iss (issuer) が上位権威 機関で、sub (subject) が末端エンティティであることが分かる。 jwks.keys には末端エンティティの公開鍵が含まれている。
  21. OpenID Federation 1.0 仕様: 解説: https://openid.net/specs/openid-federation-1_0.html https://www.authlete.com/developers/oidcfed/ Global Assured Identity

    Network (GAIN) ホワイトペーパー: 中間報告 (⾮公式): https://gainforum.org/GAINWhitePaper.pdf https://qiita.com/TakahikoKawasaki/items/3c65d546627e9e1fabd0 OpenID for Verifiable Credential Issuance (OID4VCI) 仕様ドラフト: 解説: https://openid.github.io/OpenID4VCI/openid-4- verifiable-credential-issuance-wg-draft.html https://www.authlete.com/ja/developers/oid4vci/
  22. 質疑応答 川﨑 貴彦 (かわさき たかひこ) Authlete 社代表取締役社⻑。ソフトウェアエンジニア。1997 年に慶應⼤学 総合政策学部を卒業後、⺠間企業 4

    社に勤めた後 2009 年に独⽴。ネット ワークやデータベース、Java 仮想マシン、モバイルアプリ、分散システム 等の業務に携わってきた。Web API セキュリティやシングルサインオンの ための世界標準技術であるOAuth 2.0 / OpenID Connect の実装を部品化・ SaaS 化する独⾃アーキテクチャを考案し、2015 年に Authlete 社を創業。 ⾦融業界 API 化の世界的な潮流に乗って国内外で顧客を獲得し、持続可能 な事業として確⽴。現在は世界標準仕様策定活動に参画して実装に落とし 込む作業をしている。 株式会社 Authlete (オースリート) 2015 年 9 ⽉創業。OAuth/OIDC の実装を Web API 化し、SaaS として提供。独⾃ アーキテクチャと実装の網羅性、最新仕様への対応の早さで世界的競争⼒を持つ。 2023 年 9 ⽉にシリコンバレーの連続起業家を CEO に迎え⽶国市場進出を本格化。 ੵۃ࠾༻த