5. Topics(私見)
• Financial-grade API (FAPI)
• Best Current Practice (BCP)
• JWT Profile for Access Token
• New Use Cases
• Security Enhancement and Practice
5
18. Talk + 2 Unconference Slots
Usage of JWT in Access Tokens
https://sec.uni-stuttgart.de/events/osw2019/agenda#talkusage_of_jwt_in_access_tokens
• 「JWTなアクセストークン」のガイドラインを作りたい
– JWTなATを使っている既存のIDaaS / ソフトウェアの、そのJWTの
クレームがどうなっているかを分析・分類し、標準的なプロファイ
ルを提案(したい)
Claims idtoken Auth0 Azure AD PingIdentity IdentityServer AWS OKTA Profile
Validation iss
aud
exp
iat
nonce
auth_time
iss
aud
exp
iat
iss
aud
exp
iat
nbf
iss
exp
jti
[aud]
iss
aud
nbf
exp
auth_time
iss
iat
exp
auth_time
iss
aud
iad
exp
iss
aud
exp
iat
jti
auth_time
Identity sub
lots
sub
<any>
sub
name
preferred_user
name
oid
ipaddr
unique_name
sub
email
uid
[sub] sub
username
sub
cid
uid
sub
Authorization N/A scope roles
scp
groups
scope
memberOf
scope scope scp scope
?roles, groups
Context/misc azp
acr
amr
azp
gty
aio
app_displayname
appid
idp
tid
uti
ver
xms_tcdt
---
azp
azpacr
idpid
client_id
client_id
idp
amr
token_use ver client_id
acr
amr
?idp
?azpacr
Source: https://sec.uni-stuttgart.de/_media/events/osw2019/slides/bertocci_- _a_jwt_pr ofile_for_ats.pptx
18
19. Talk + 2 Unconference Slots
Usage of JWT in Access Tokens (con’t)
https://sec.uni-stuttgart.de/events/osw2019/agenda#talkusage_of_jwt_in_access_tokens
• 議論百出
– そもそもなぜATの中身をclientに見せてしまうのか。暗号化すべきではない
か。PII leakageについてはどうするのか
– 暗号化アルゴリズムはオプションがあって良いのではないか
– Resource Indicatorを使ってクレームの種類を絞ることができると良いので
はないか
– ASとRSとの間のUser Claims Schemaが必要なのではないか(OIDCのク
レーム定義はIdPとclientとの間)
– 法的根拠のある同意が必要ではないか。Profile をATに入れることを誰かが
承認する必要がある。AS/RS に閉じなくなる(1st party scenarioではなくな
る)。3rd Party (client) に開示することになる
• → JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens
https://tools.ietf.org/id/draft-bertocci-oauth-access-token-jwt-00.txt 19
25. Talk
WPSE: Fortifying Web Protocols via Browser-Side Security Monitoring
https://sec.uni-stuttgart.de/events/osw2019/agenda#talkwpsefortifying_web_protocols_via_browser-side_security_monitoring
• ブラウザをWebプロトコルに遵守させるためのブラウザ拡張
– メッセージの順序や制約をチェック
– メッセージ内容をランダム値で置き換え
25
Source: https://sec.uni-stuttgart.de/_media/events/osw2019/slides/squarcina_-_wpse.pdf
26. Talk
An Approachfor Secure Code Generation of Single Sign-On and AccessDelegationSolutions for
Mobile Native Appshttps://sec.uni-stuttgart.de/events/osw2019/agenda#talkan_approach_for_secure_code_generation_of_single_sign -on_and_access_delegation_solutions_for_mobile_na tive_apps
• 現状、Native App開発者はIDMP (e.g. Okta, OAuth0, Google, …)
ごとにドキュメントをチェックしたりSDKを組み込んだりしない
といけない
• それらの差異を吸収するためのウィザード (Android Studio Plugin)
を開発した
26
27. Unconference
Locking Down Tokens in Browsers
by Johan Peeters https://yo1peeters.blogspot.com/2019/03/token-lockdown.html
• ブラウザベースWebアプリケーションにおける、XSS脆弱性によるトークン
窃取の可能性と、その対策を、Reactアプリケーションを用いて実演
27
28. Unconference
iFrame Sandbox for Tokens
by Jim Manico
• 認可コードがメインページに返ってくる
• それをiframeに渡してトークン交換を行う
Source: https://handouts.secappdev.org/handouts/2019/Philippe%20D e%20R yck%20-%20The%20security%20model%20of%20the%20web%20.pdf 28
29. Invited Talk
WhyAre We TalkingAbout XSS in 2019?
https://sec.uni-stuttgart.de/events/osw2019/agenda#invited_talkwhy_are_we_talking_about_xss_in_2019
• XSSの現状と対策
29Source: https://sec.uni-stuttgart.de/_media/events/osw2019/slides/manico_-_why_are_we_talking_about_xss_in_2019.pdf
33. まとめ(私見)
• Financial-grade API (FAPI)
– “Proved security under strong attacker
model”
– 今後 Lodging Intent Pattern, Req/Res
Signing が盛り上がりそう
• Best Current Practice (BCP)
– 基本としての “Authz Code Grant w/
PKCE and mTLS”
• JWT Profile for Access Token
– プライバシー保護と同意管理に留意
• New Use Cases
– Self-signedmTLS auth code power flow
• Security Enhancement and Practice
– XSS!!
33