JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicros...
-戻る
--[[JWTとOAuth2.0]]
--[[FAPI Part 2 (Read and Write API Security Profile)]]
* 目次 [#x774c2a7]
#contents
*概要 [#ta7069e9]
-ドイツの金融業界の要望に対応するため、驚くほどのスピード...
駆け込みで FAPI Implementer's Draft 第二版と一緒に処理さ...
-[[FAPI Part 2 (Read and Write API Security Profile)]]で...
-認可レスポンスのパラメタ群が一つの JWT にまとめられ、res...
--JWT形式で Authorization Response を返すための仕様
--[[Response Mode を指定するための response_mode パラメタ...
--Client / Authorization Server それぞれの metadata も拡...
※ よくよく見ると、[[JWT Secured Authorization Request (JA...
*詳細 [#wdfc0b3d]
-Authorization Response に JWT を使う方法が定義されている。
-[[Response Type>OAuth 2.0 Multiple Response Type Encodin...
-JWTのalgなどは仕様範囲外なので、よく考えて設計する必要が...
**Discovery / Registration [#ef0c71f9]
***[[Discovery>OpenID Connect - Discovery]] [#k71e4d3e]
response_modes_supportedパラメタで
-[[response_mode>#jdf53132]]
-[[AuthZ metadata>#be301260]]
をアドバタイズ
***[[Registration>OpenID Connect - Dynamic Client Registr...
[[Client metadata>#x88195b8]]を登録。
**Metadata [#q6882927]
***Client metadata [#x88195b8]
Clientが、JWT の署名・暗号にどのアルゴリズムを使用して欲...
-authorization_signed_response_alg
-authorization_encrypted_response_alg
-authorization_encrypted_response_enc
***AuthZ metadata [#be301260]
AuthZがサポートするJWT の署名・暗号アルゴリズムを列挙。
-authorization_signing_alg_values_supported
-authorization_encryption_alg_values_supported
-authorization_encryption_enc_values_supported
**[[response_mode>OAuth 2.0 Form Post Response Mode]] [#j...
***query.jwt [#le68ebcd]
HTTP/1.1 302 Found
Location: https://client.com/callback?response={JWT}
***fragment.jwt [#w7232cda]
HTTP/1.1 302 Found
Location: https://client.example.com/cb#response={JWT}
***form_post.jwt [#xbf7b21a]
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Cache-Control: no-cache, no-store
Pragma: no-cache
<html>
<head><title>Submit This Form</title></head>
<body onload="javascript:document.forms[0].submit()">
<form method="post" action="https://client.example.c...
<input type="hidden" name="response" value="{JWT}"/>
</form>
</body>
</html>
***jwt [#b838208d]
-ショートカット。以下の何れかを示す。
-[[response_type>OAuth 2.0 Multiple Response Type Encodin...
--"code"の場合、[[query.jwt>#le68ebcd]]
--"token"の場合、[[fragment.jwt>#w7232cda]]
**[[response_type>OAuth 2.0 Multiple Response Type Encodi...
上記の{JWT}には、以下のペイロードを署名してJWS化したもの...
***code [#j941ae96]
{
"iss":"https://accounts.example.com",
"aud":"s6BhdRkqt3",
"exp":1311281970,
"code":"PyyFaux2o7Q0YfXBU32jhw.5FXSQpvr8akv9CeRDSd0QA",
"state":"S8NJ7uqk5fY4EjNvP_G_FtyJu6pUsvH9jsYni9dMAJw"
}
***token [#b15366cd]
{
"iss":"https://accounts.example.com",
"aud":"s6BhdRkqt3",
"exp":1311281970,
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"state":"S8NJ7uqk5fY4EjNvP_G_FtyJu6pUsvH9jsYni9dMAJw",
"token_type":"bearer",
"expires_in":"3600",
"scope":"example"
}
***error [#j941ae96]
{
"error":"access_denied",
"state":"S8NJ7uqk5fY4EjNvP_G_FtyJu6pUsvH9jsYni9dMAJw"
}
**実装に関する考察。 [#yc74604a]
***ベースライン [#s4b02fd0]
-一般的に[[code>#v81da939]]系と[[token>#x0febf97]]系でエ...
-queryとpostの共通化は(MVCのを使用している場合、バインダ...
-fragmentについては、サーバで処理できないのでRedirectエン...
***code (authorization code) [#v81da939]
-既定値
--query
-追加実装~
既存のエンドポイントを流用可
--query系
---query~
既定値
---query.jwt~
検証・デコード処理を追加。
--fragment系
---fragment~
SPAでPKCEを使用する際に必要になる。
---fragment.jwt~
SPAでPKCEを使用する際に必要になる(jwtでセキュリティ強化...
--form_post系
---form_post~
Formsから取得(メジャーなユースケース)。
---form_post.jwt~
Formsから検証・デコードする。
-実装不要~
...。
***token (Implicit, Hybrid) [#x0febf97]
-既定値
--fragment
-追加実装~
既存のエンドポイントを流用可
--fragmen系
---fragmen~
既定値
---fragment.jwt~
検証・デコード処理を追加。
--form_post系
---form_post~
Formsから取得し、Hiddenに入れる。
---form_post.jwt~
Formsから検証・デコードし、Hiddenに入れる。
-実装不要
--query系~
fragment → queryはNG(JWE化していればOKらしいが...。)
---query
---query.jwt
*参考 [#x941b618]
-Draft-nn: Financial-grade API: JWT Secured Authorization...
https://openid.net/specs/openid-financial-api-jarm.html
**インフル諸兄 [#j1267125]
***TakahikoKawasaki [#h306ef44]
-OAuth 2.0 の認可レスポンスとリダイレクトに関する説明 - Q...
JWT Secured Authorization Response Mode~
https://qiita.com/TakahikoKawasaki/items/8567c80528da43c7...
***ritou [#kfb57e70]
-FAPI : JWT Secured Authorization Response Mode for OAuth...
https://ritou.hatenablog.com/entry/2018/09/21/143349
**関連仕様 [#t43a5fc4]
***[[OAuth 2.0 Form Post Response Mode]] [#g80b53c7]
***[[OAuth 2.0 Multiple Response Type Encoding Practices]...
***[[OpenID Connect - Discovery]] [#n79fb3c3]
***[[OpenID Connect - Dynamic Client Registration]] [#q62...
***[[FAPI Part 2 (Read and Write API Security Profile)]] ...
----
Tags: [[:IT国際標準]], [[:認証基盤]], [[:クレームベース認...
終了行:
「[[マイクロソフト系技術情報 Wiki>http://techinfoofmicros...
-戻る
--[[JWTとOAuth2.0]]
--[[FAPI Part 2 (Read and Write API Security Profile)]]
* 目次 [#x774c2a7]
#contents
*概要 [#ta7069e9]
-ドイツの金融業界の要望に対応するため、驚くほどのスピード...
駆け込みで FAPI Implementer's Draft 第二版と一緒に処理さ...
-[[FAPI Part 2 (Read and Write API Security Profile)]]で...
-認可レスポンスのパラメタ群が一つの JWT にまとめられ、res...
--JWT形式で Authorization Response を返すための仕様
--[[Response Mode を指定するための response_mode パラメタ...
--Client / Authorization Server それぞれの metadata も拡...
※ よくよく見ると、[[JWT Secured Authorization Request (JA...
*詳細 [#wdfc0b3d]
-Authorization Response に JWT を使う方法が定義されている。
-[[Response Type>OAuth 2.0 Multiple Response Type Encodin...
-JWTのalgなどは仕様範囲外なので、よく考えて設計する必要が...
**Discovery / Registration [#ef0c71f9]
***[[Discovery>OpenID Connect - Discovery]] [#k71e4d3e]
response_modes_supportedパラメタで
-[[response_mode>#jdf53132]]
-[[AuthZ metadata>#be301260]]
をアドバタイズ
***[[Registration>OpenID Connect - Dynamic Client Registr...
[[Client metadata>#x88195b8]]を登録。
**Metadata [#q6882927]
***Client metadata [#x88195b8]
Clientが、JWT の署名・暗号にどのアルゴリズムを使用して欲...
-authorization_signed_response_alg
-authorization_encrypted_response_alg
-authorization_encrypted_response_enc
***AuthZ metadata [#be301260]
AuthZがサポートするJWT の署名・暗号アルゴリズムを列挙。
-authorization_signing_alg_values_supported
-authorization_encryption_alg_values_supported
-authorization_encryption_enc_values_supported
**[[response_mode>OAuth 2.0 Form Post Response Mode]] [#j...
***query.jwt [#le68ebcd]
HTTP/1.1 302 Found
Location: https://client.com/callback?response={JWT}
***fragment.jwt [#w7232cda]
HTTP/1.1 302 Found
Location: https://client.example.com/cb#response={JWT}
***form_post.jwt [#xbf7b21a]
HTTP/1.1 200 OK
Content-Type: text/html;charset=UTF-8
Cache-Control: no-cache, no-store
Pragma: no-cache
<html>
<head><title>Submit This Form</title></head>
<body onload="javascript:document.forms[0].submit()">
<form method="post" action="https://client.example.c...
<input type="hidden" name="response" value="{JWT}"/>
</form>
</body>
</html>
***jwt [#b838208d]
-ショートカット。以下の何れかを示す。
-[[response_type>OAuth 2.0 Multiple Response Type Encodin...
--"code"の場合、[[query.jwt>#le68ebcd]]
--"token"の場合、[[fragment.jwt>#w7232cda]]
**[[response_type>OAuth 2.0 Multiple Response Type Encodi...
上記の{JWT}には、以下のペイロードを署名してJWS化したもの...
***code [#j941ae96]
{
"iss":"https://accounts.example.com",
"aud":"s6BhdRkqt3",
"exp":1311281970,
"code":"PyyFaux2o7Q0YfXBU32jhw.5FXSQpvr8akv9CeRDSd0QA",
"state":"S8NJ7uqk5fY4EjNvP_G_FtyJu6pUsvH9jsYni9dMAJw"
}
***token [#b15366cd]
{
"iss":"https://accounts.example.com",
"aud":"s6BhdRkqt3",
"exp":1311281970,
"access_token":"2YotnFZFEjr1zCsicMWpAA",
"state":"S8NJ7uqk5fY4EjNvP_G_FtyJu6pUsvH9jsYni9dMAJw",
"token_type":"bearer",
"expires_in":"3600",
"scope":"example"
}
***error [#j941ae96]
{
"error":"access_denied",
"state":"S8NJ7uqk5fY4EjNvP_G_FtyJu6pUsvH9jsYni9dMAJw"
}
**実装に関する考察。 [#yc74604a]
***ベースライン [#s4b02fd0]
-一般的に[[code>#v81da939]]系と[[token>#x0febf97]]系でエ...
-queryとpostの共通化は(MVCのを使用している場合、バインダ...
-fragmentについては、サーバで処理できないのでRedirectエン...
***code (authorization code) [#v81da939]
-既定値
--query
-追加実装~
既存のエンドポイントを流用可
--query系
---query~
既定値
---query.jwt~
検証・デコード処理を追加。
--fragment系
---fragment~
SPAでPKCEを使用する際に必要になる。
---fragment.jwt~
SPAでPKCEを使用する際に必要になる(jwtでセキュリティ強化...
--form_post系
---form_post~
Formsから取得(メジャーなユースケース)。
---form_post.jwt~
Formsから検証・デコードする。
-実装不要~
...。
***token (Implicit, Hybrid) [#x0febf97]
-既定値
--fragment
-追加実装~
既存のエンドポイントを流用可
--fragmen系
---fragmen~
既定値
---fragment.jwt~
検証・デコード処理を追加。
--form_post系
---form_post~
Formsから取得し、Hiddenに入れる。
---form_post.jwt~
Formsから検証・デコードし、Hiddenに入れる。
-実装不要
--query系~
fragment → queryはNG(JWE化していればOKらしいが...。)
---query
---query.jwt
*参考 [#x941b618]
-Draft-nn: Financial-grade API: JWT Secured Authorization...
https://openid.net/specs/openid-financial-api-jarm.html
**インフル諸兄 [#j1267125]
***TakahikoKawasaki [#h306ef44]
-OAuth 2.0 の認可レスポンスとリダイレクトに関する説明 - Q...
JWT Secured Authorization Response Mode~
https://qiita.com/TakahikoKawasaki/items/8567c80528da43c7...
***ritou [#kfb57e70]
-FAPI : JWT Secured Authorization Response Mode for OAuth...
https://ritou.hatenablog.com/entry/2018/09/21/143349
**関連仕様 [#t43a5fc4]
***[[OAuth 2.0 Form Post Response Mode]] [#g80b53c7]
***[[OAuth 2.0 Multiple Response Type Encoding Practices]...
***[[OpenID Connect - Discovery]] [#n79fb3c3]
***[[OpenID Connect - Dynamic Client Registration]] [#q62...
***[[FAPI Part 2 (Read and Write API Security Profile)]] ...
----
Tags: [[:IT国際標準]], [[:認証基盤]], [[:クレームベース認...
ページ名: