IETF103 Bangkok oauth wg 関連レポート

>100 Views

December 14, 18

スライド概要

2018年12月14日に開催された IETF103 Update Meeting での発表資料です。

profile-image

2023年10月からSpeaker Deckに移行しました。最新情報はこちらをご覧ください。 https://speakerdeck.com/lycorptech_jp

シェア

またはPlayer版

埋め込む »CMSなどでJSが使えない場合

関連スライド

各ページのテキスト
1.

IETF103 Bangkok oauth wg 関連レポート 2022年11月16日 ヤフー株式会社 都筑一希 Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved.

2.

F YT 自己紹介 E 名前 D ! 都筑一希(@kazuki229_dev) F 所属 E ヤフー株式会社 サービス統括本部 9 (IDソリューション本部 @ 22 ID連携開発担当 ( I Yahoo! () CA IEFTとの関わり (IETF初参加🎉 ) Copyright (C) 2018 .Yahoo Japan Corporation. All Rights Reserved. 8 2 8 8 2 1 1 10 2

3.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 3

4.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 4

5.

PoP Token(Proof-of-possession) 発行対象者しか使えないトークン OAuthでは下記の方法などでこれを実現 • Token Binding • Mutual TLS Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 5

6.

OAuth 2.0 Token Binding OAuth 2.0で利用する下記のトークン類 をToken Bindingするための仕様 • Access Token • Authorization Code • Refresh Token • JWT Authorization Grant • JWT Client Authentication draft-ietf-oauth-token-binding: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 6

7.

MontrealからのUpdate • Google ChromeがToken Bindingの実装を削除 • • Token BindingがRFC化 • • • Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 写真:アフロ Chrome Platform Status RFC8471 RFC8472 RFC8473 7

8.

Token Binding of Access Token With Implicit Flow “… tried to capture the way it is supposed to work in this sequence chart …” 6 https://datatracker.ietf.org /doc/slides-103-oauth-sessb-draft-ietf-oauth-token-binding/00/ Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 8

9.

議論 Implicit フローをサポートするか? Mutual TLSでは非サポート Implicitを採用するかどうかを議論してから Implicitのセキュリティ懸念点などを議論すべき BCPでも同様の課題があるので後ほどHum Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 9

10.

OAuth 2.0 Mutual TLS Client Authentication and Certificate Bound Access クライアント認証をMutual TLSベースで行う • Tokenエンドポイントにて tls_client_auth_subject_dnと証明書のDNの比較 クライアント証明書をAccess Tokenにバインド • クライアントとリソースサーバー間でMutual TLS • Access Token内の証明書ハッシュとクライアント証明 書を比較 draft-ietf-oauth-mtls: AD Evaluation::Revised I-D Needed Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 10

11.

議論 SANsをサポートするか? そもそもこのユースケースは存在するのか? SPIFFEではこれを利用している ラフコンセンサスをとるにはまだ早い メーリングリストでサンプルテキストを作成 Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 11

12.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 13

13.

OAuth 2.0 Security Best Current Practice RFC6819(OAuth 2.0 Threat Model and Security Considerations)を補足・強化 • OAuth実装の広がり • テクノロジーの変化 • 動的なセットアップのユースケースが増加 draft-ietf-oauth-security-topics: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 14

14.

• Privilege Escalation • Implicit Grant & Access Token Replay Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. MontrealからのUpdate 写真:アフロ 15

15.

Privilege Escalation Access Tokenは特定のリソースでの特定 のアクションのみ許可するようにすべき scopeやresourceパラメータを利用して これらを制御しても良い Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 16

16.

Implicit Grant & Access Token Replay JARMやToken Bindingで対策可能だが 時期尚早 Implicitを非推奨としたい Humの結果→賛成多数 Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 17

17.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 18

18.

JWT Response for OAuth Token Introspection IntrospectionのレスポンスをJWT化 リクエスト レスポンス POST /introspect HTTP/1.1 HTTP/1.1 200 OK Host: server.example.com Content-Type: application/jwt Accept: application/jwt eyJ… Content-Type: application/x-www-formurlencoded token=2YotnFZFEjr1zCsicMWpAA draft-ietf-oauth-jwt-introspection-response: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 19

19.

議論 Tokenエンドポイントなどその他の エンドポイントにも適用できるか? それぞれのエンドポイントにはそれぞれの懸念 事項があるので汎用化はできない? 議論はMLへ Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 20

20.

JWT Secured Authorization Response Mode for OAuth 2.0 (JARM) Authorization ResponseをJWTで返すための Response Mode • query.jwt • fragment.jwt • form_post.jwt • jwt Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 21

21.

議論 response_modeはパラメータの受け渡し方法の指定 なので、エンコードであるJWTは別で定義すべきでは? response_formatなどはどうか response_modeとresponse_typeだけでもわかり づらいので同じようなパラメータを増やしたくない Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 22

22.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 23

23.

Reciprocal OAuth RSが相互にリソースアクセスをしたい ユースケース 例:AlexaとSonosの連携 OAuthのフローを2回行わず、1つにま とめる draft-ietf-oauth-reciprocal: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 24

24.

DJ I G6 , Browser C A (Alexa) B (Sonos) AuthZ Req A B y AuthZ Res code=code_for_a &reciprocal=scope B A y Token Req grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agranttype%3reciprocal &code=code_for_a &access_token=access_token_for_b Token Res access_token=access_token_for_a 26 © DeNA Co., Ltd. 引用: https://www.slideshare.net/KaoruMaeda/ietf102-report-authorization Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 25

25.

議論 reciprocalとscopeの区別がわかりづらい reciprocalは後ほど発行されるBが利用する アクセストークンのスコープを表す Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 26

26.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 27

27.

Distributed OAuth 複数のリソースサーバ、認可サーバーが 存在するユースケース Client Credentialsフローでリソース サーバから認可サーバーの情報を取得す るための仕様 draft-ietf-oauth-distributed: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 28

28.
[beta]
Client

Authorization Server

Resource Server

Discovery Request
Discovery Response
Link: <https://api.example.com/resource">;

Authorization Request

rel="resource_uri",
<https://as.example.com/.well-known/oauth-authorization-server>;
rel="oauth_server_metadata_uri"

Access Token
Access Token
Protected Resource

Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved.

29

29.

議論 Link header vs WWW-Authenticate header どちらでresource_uriを送った方が良いか? RFC6750ではWWW-Authenticate headerに そのような拡張を許容している WWW-Authenticate headerを利用の方向へ Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 30

30.

議論 Discoveryはリクエスト先のfull URLでやるのか それもとissuerのURLを渡してMetadataから取得するか? Metadataはwell-knownのエンドポイントは 必ずしも実装されていない 意見が分かれるので議論はメーリスで Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 31

31.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 32

32.

Seamless OAuth 2.0 Client Assertion Grant IoTデバイスのクライアント認証 JWTエンコードされた ワンタイムパスワードを用いる draft-hevroni-oauth-seamless-flow: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 33

33.

アジェンダ セキュリティ • PoP Token 新しいユースケース • Reciprocal OAuth • Best Current Practice • OAuth Distributed • Seamless-flow • JWT response • Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 34

34.

OAuth 2.0 for Browser-Based Apps SPAでOAuth 2.0を実装する際のベスト プラクティス draft-parecki-oauth-browser-based-apps: I-D Exists Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 35

35.

まとめ Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved.

36.

まとめ • セキュリティ • • • PoP Token Best Current Practice JWT response • 新しいユースケース • • • • Reciprocal OAuth Distributed Seamless flow Browser-Based Apps Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 37

37.

初心者としての所感 • 他のカンファレンスとの雰囲気の違い • IETFは仕様を決めるための議論 • IETF参加にあたりRFCの読みこみやメーリングリストの キャッチアップを強制的に行えた(事前事後) • 議論に追いつけない • • • • 英語の問題 事前準備の問題 後ほど公開される議事録や動画で理解しきれなかった箇所を確認 質問内容などを事前に用意して議論に参加できるのが理想 Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved. 38