---
title: Reactor Netty &amp; Apache Kafka Stack #jsug
tags:  #jsug  
author: [Yahoo!デベロッパーネットワーク](https://www.docswell.com/user/ydnjp)
site: [Docswell](https://www.docswell.com/)
thumbnail: https://bcdn.docswell.com/page/P7R6NK29E9.jpg?width=480
description: JSUG勉強会で話しました、SpringOne Platform 2018のセッション紹介資料です。   JSUG勉強会 2018年その6 SpringOne Platform 2018報告会 https://jsug.doorkeeper.jp/events/83089
published: November 30, 18
canonical: https://www.docswell.com/s/ydnjp/ZQ73VK-2018-11-30-135201
---
# Page. 1

![Page Image](https://bcdn.docswell.com/page/P7R6NK29E9.jpg)

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


# Page. 2

![Page Image](https://bcdn.docswell.com/page/PJXMNLD3EX.jpg)

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


# Page. 3

![Page Image](https://bcdn.docswell.com/page/3JKGNLXN7D.jpg)

アジェンダ
セキュリティ
• 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


# Page. 4

![Page Image](https://bcdn.docswell.com/page/LE3NV35ZE5.jpg)

アジェンダ
セキュリティ
• 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


# Page. 5

![Page Image](https://bcdn.docswell.com/page/8EDW84D47G.jpg)

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


# Page. 6

![Page Image](https://bcdn.docswell.com/page/V7P98MXVJ8.jpg)

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


# Page. 7

![Page Image](https://bcdn.docswell.com/page/2JVMN9LRJQ.jpg)

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


# Page. 8

![Page Image](https://bcdn.docswell.com/page/5EGGKZX6EL.jpg)

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


# Page. 9

![Page Image](https://bcdn.docswell.com/page/4JQXNL82EP.jpg)

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


# Page. 10

![Page Image](https://bcdn.docswell.com/page/K746GD2PE1.jpg)

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


# Page. 11

![Page Image](https://bcdn.docswell.com/page/LJ1VDZMXEG.jpg)

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


# Page. 12

![Page Image](https://bcdn.docswell.com/page/GJWLY93KE2.jpg)

アジェンダ
セキュリティ
• 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


# Page. 13

![Page Image](https://bcdn.docswell.com/page/4EZMX9VNJ3.jpg)

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


# Page. 14

![Page Image](https://bcdn.docswell.com/page/Y76N4K597V.jpg)

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


# Page. 15

![Page Image](https://bcdn.docswell.com/page/G755QPYD74.jpg)

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


# Page. 16

![Page Image](https://bcdn.docswell.com/page/9J2NP6YMER.jpg)

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


# Page. 17

![Page Image](https://bcdn.docswell.com/page/DEYP59GPEM.jpg)

アジェンダ
セキュリティ
• 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


# Page. 18

![Page Image](https://bcdn.docswell.com/page/VJN5NLGM78.jpg)

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


# Page. 19

![Page Image](https://bcdn.docswell.com/page/YE9YR4WWJ3.jpg)

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


# Page. 20

![Page Image](https://bcdn.docswell.com/page/GE86WQNR7D.jpg)

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


# Page. 21

![Page Image](https://bcdn.docswell.com/page/LEL9NXP2JR.jpg)

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


# Page. 22

![Page Image](https://bcdn.docswell.com/page/4JMZXL49EW.jpg)

アジェンダ
セキュリティ
• 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


# Page. 23

![Page Image](https://bcdn.docswell.com/page/PJR6NKW979.jpg)

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


# Page. 24

![Page Image](https://bcdn.docswell.com/page/PEXMNLP37X.jpg)

DJ I
G6 ,
Browser
C
A (Alexa)
B (Sonos)
AuthZ Req
A
B
y
AuthZ Res
code=code_for_a
&amp;reciprocal=scope
B
A
y
Token Req
grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agranttype%3reciprocal
&amp;code=code_for_a
&amp;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


# Page. 25

![Page Image](https://bcdn.docswell.com/page/3EKGNLDNJD.jpg)

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


# Page. 26

![Page Image](https://bcdn.docswell.com/page/L73NV3RZ75.jpg)

アジェンダ
セキュリティ
• 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


# Page. 27

![Page Image](https://bcdn.docswell.com/page/87DW84Y4JG.jpg)

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


# Page. 28

![Page Image](https://bcdn.docswell.com/page/VJP98M6VE8.jpg)

Client
Authorization Server
Resource Server
Discovery Request
Discovery Response
Link: &lt;https://api.example.com/resource&quot;&gt;;
Authorization Request
rel=&quot;resource_uri&quot;,
&lt;https://as.example.com/.well-known/oauth-authorization-server&gt;;
rel=&quot;oauth_server_metadata_uri&quot;
Access Token
Access Token
Protected Resource
Copyright (C) 2018 Yahoo Japan Corporation. All Rights Reserved.
29


# Page. 29

![Page Image](https://bcdn.docswell.com/page/2EVMN93REQ.jpg)

議論
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


# Page. 30

![Page Image](https://bcdn.docswell.com/page/57GGKZ367L.jpg)

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


# Page. 31

![Page Image](https://bcdn.docswell.com/page/4EQXNL527P.jpg)

アジェンダ
セキュリティ
• 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


# Page. 32

![Page Image](https://bcdn.docswell.com/page/KJ46GD9P71.jpg)

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


# Page. 33

![Page Image](https://bcdn.docswell.com/page/LE1VDZKX7G.jpg)

アジェンダ
セキュリティ
• 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


# Page. 34

![Page Image](https://bcdn.docswell.com/page/GEWLY9DK72.jpg)

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


# Page. 35

![Page Image](https://bcdn.docswell.com/page/47ZMX9GNE3.jpg)

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


# Page. 36

![Page Image](https://bcdn.docswell.com/page/YJ6N4KY9JV.jpg)

まとめ
• セキュリティ
•
•
•
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


# Page. 37

![Page Image](https://bcdn.docswell.com/page/GJ55QPGDJ4.jpg)

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


