SlideShare a Scribd company logo
© Hitachi, Ltd. 2024. All rights reserved.
Keycloak最新動向 - 認証および認可
Cloud Native Security Japan Kickoff meetup 2024
@東京ガーデンテラス紀尾井町 紀尾井タワー
株式会社日立製作所
OSSソリューションセンタ
2024年5月17日
乗松 隆志
1
© Hitachi, Ltd. 2024. All rights reserved.
自己紹介
◼ OSSを利用したサービス・技術コンサルティングの提供
◼ Keycloakへのコントリビューション活動 (機能実装、コードレビュー、カンファレンスでのPR、コ
ミュニティ活動のリード)
Keycloakへの主要なコントリビューション :
 W3C Web Authentication (WebAuthn) のRelying Party側実装 (Passkeys authentication)
 セキュリティの標準仕様の実装 (e.g., RFC 7636 PKCE, RFC 8705 OAuth MTLS, OIDC CIBA,
RFC 9126 PAR, RFC 8032/8037 EdDSA, RFC 9449 DPoP, RFC 9207 OAuth2 Authz Server
Issuer Identification, Internet-Draft OAuth 2.1)
 Financial-grade API (FAPI) の各種Security Profilesの実装 (e.g., FAPI 1.0 Baseline, FAPI
1.0 Advanced, FAPI-CIBA, FAPI 2.0 Baseline, FAPI 2.0 Message Signing)
乗松 隆志 (@tnorimat in github) :
株式会社日立製作所 OSSソリューションセンタ所属 シニアOSSスペシャリスト
Keycloak*メンテナー, Keycloakサブプロジェクト “OAuth SIG” Tech Lead
* Keycloak : The Identity and Access Management (IAM) 用のOSS.
2
© Hitachi, Ltd. 2024. All rights reserved.
Keycloakとは
Keycloak
主要標準に対応したID連携
(OAuth2.0認可サーバー含む)
ソーシャルログイン
(Identity Brokering) ID管理と認証
LDAP
Active
Directory
RDB
OpenID SAML XML.org
GitHub
X Facebook
アイデンティティおよびアクセス管理用のオープ
ンソース・ソフトウェア。
シングルサインオンやOAuth2.0に対応したAPI
の認可サーバーの機能を提供。
2023年4月より、The Linux Foundation傘下の
Cloud Native Computing Foundation (CNCF) の
Incubating Projectとなっている。
https://www.cncf.io/projects/keycloak/
Githubを利用して開発。
https://github.com/keycloak/keycloak
© Hitachi, Ltd. 2024. All rights reserved.
1. 認証機能: Passkeys
2. 認可機能: OAuth 2.1
発表内容
3
4
© Hitachi, Ltd. 2024. All rights reserved.
1. 認証機能: Passkeys
5
© Hitachi, Ltd. 2024. All rights reserved.
Passkeysとは
二種類のPasskey:
• Synced passkey
• Device-bound passkey
二種類の認証方法:
• Cross-device authentication
• Same-device authentication
Keycloak 23はPasskeyのサポートを
Preview Featureとして始めました. (*2)
Passkeys := FIDO standardsをベースとし、ユーザーの複数のデバイスのアプリケー
ションで素早く、簡単に、そして安全にシングルサインオンを行える。Password認証に代
わるもの。 Passwordと違い、Passkeyはフィッシィング攻撃に耐性がある。
(quoted from the website of FIDO Alliance (*1))
*1 : https://fidoalliance.org/passkeys/#resources
*2 : https://www.keycloak.org/docs/23.0.7/release_notes/index.html#passkeys-support
6
© Hitachi, Ltd. 2024. All rights reserved.
Passkeys – WebAuthnとの関係
WebAuthn := 公開鍵アルゴリズムを利用したWebベースの認証標準で、W3Cにより策
定されている。Password-less認証とMulti-Factor認証をサポートし、Password認証で生
じる問題を解決している。
大体のところ、技術的な観点からはPasskey認証とWebAuthn認証は同じ。
KeycloakのPasskey認証は、既存サポートのWebAuthn認証を利用。
Keycloak 8 から、WebAuthn認証を正式にサポートしている。 (*1).
Passkeyは下記のメジャーなプラットフォームでサポートされている。
• Windows (Windows Hello)
• MacOS / iPhone / iPad
• Android
*1 : https://www.Keycloak.org/docs/latest/release_notes/index.html#w3c-web-authentication-support
7
© Hitachi, Ltd. 2024. All rights reserved.
Passkeys - Synced Passkey と Device-bound Passkey
ユーザー
PC
Synced Passkey := クラウドサービスにより
ユーザーの複数のデバイス間で同期される
Passkey。
(quoted from the website of FIDO Alliance (*1))
Device-bound Passkey := ユーザーの単一
のデバイスにバインドされるPasskey。そのデ
バイス外に出ていかない。
(quoted from the website of FIDO Alliance (*1))
• Google Account : Google Password Manager (*2)
• Apple ID : Apple iCloud Keychain (*3)
• 3rd party password manager : Bitwarden, 1Password, etc.
Android, iOS, and macOS have native APIs for 3rd party passkey providers
*1 : https://fidoalliance.org/faqs/#PasskeysFAQs
*2 : https://developers.google.com/identity/passkeys
*3 : https://developer.apple.com/passkeys/
スマートデバイス
Passkey
Passkey
クラウド
サービス:
sync
ユーザー
PC
スマートデバイス
Passkey
Passkey
同一
別物
8
© Hitachi, Ltd. 2024. All rights reserved.
Passkeys - Same-device認証 と Cross-device認証
Same-device Authentication := 認証を行
おうとしているデバイスと同じデバイスにある
Passkeyで認証する。
Cross-device Authentication:=認証を行お
うとしているデバイスとは異なるデバイスにあ
るPasskeyで認証する。
(quoted from passkeys.dev (*7))
*1: https://passkeys.dev/docs/reference/terms/#cross-device-authentication-cda
認証サーバー
ユーザー
PC
スマートデバイス
Passkey (A)
Passkey (B)
認証
by Passkey (A)
認証サーバー
ユーザー
PC
スマートデバイス
Passkey (A)
Passkey (B)
認証
by Passkey (B)
via
NFC
9
© Hitachi, Ltd. 2024. All rights reserved.
Passkeys : KeycloakではどのようにしてPasskey認証するか
Registration := 認証デバイスがローカルで認証ののち、 Passkeyで生成された情報
(Attestation)をKeycloakに登録し、KeycloakはこれをユーザーのIDとバインドする。
Authentication := 認証デバイスがローカルで認証ののち、Passkeyで生成した認証用
情報(Assertion)をKeycloakが検証する。
1. Registration
2. Authentication
• Password-less Authentication
• Login-less Authentication (Discoverable Credentials (*1) 限定)
*1 : https://www.w3.org/TR/webauthn-3/#discoverable-credential (Resident Key in webauthn level2)
10
© Hitachi, Ltd. 2024. All rights reserved.
Passkeys : Registration
ユーザー/ブラウザー 認証サーバー
(Keycloak)
認証デバイス
(スマートデバイス)
ローカルでユーザー認証。
authenticator attestation responseを生成。
ユーザーの公開鍵と関連情報を封入。
デバイスベンダーの
秘密鍵で署名。
デバイスベン
ダーの公開鍵で
署名検証。
Keycloakは、受け取ったデータ
が正統な認証デバイスにより生
成されたものであることを確認。
ユーザーを認証
user ID
ユーザーの
秘密鍵
認証のための
情報要求
authenticator
attestation response
デバイスベンダー
の秘密鍵
デバイスベンダー
の公開鍵
ユーザーの
公開鍵
キーペアを生成し、user
IDと紐づけ。
user IDとユーザーの公開鍵を紐づけ
Keycloakは、受け取ったデータ
内の公開鍵を、ユーザーのIDと
バインドする。
デバイスベンター
の証明書
ユーザー名
/パスワード
Passkey
Registration := 認証デバイスがローカルで認証ののち、 Passkeyで生成された情報
(Attestation)をKeycloakに登録し、KeycloakはこれをユーザーのIDとバインドする。
user ID
11
© Hitachi, Ltd. 2024. All rights reserved.
Passkeys : Authentication (password-less)
ユーザー名でuser IDを検索。
user ID
ユーザー名
authenticator
assertion response
Authentication: Keycloakは、
ユーザーが認証デバイスで
ローカル認証(Ex. 指紋)され
たことを確認する。.
User IDが入っている場合:
Identificationのフェーズでの
user IDと、assertion内のuser
IDが一致するか検証。
User IDをキーとして、
Registrationにて登録済のユー
ザー公開鍵を取得。
ユーザーの公開鍵
で署名検証。
ユーザーの
公開鍵
ユーザーの
秘密鍵
user ID
(handle)
ローカルでの認証要求
ローカルでユーザー認証。
authenticator assertion responseを生成。
User ID(オプショナル)と関連情報を封入。
ユーザーの秘密鍵で
署名。
Passkey
Authentication := 認証デバイスがローカルで認証ののち、Passkeyで生成した認証用
情報(Assertion)をKeycloakが検証する。
ユーザー/ブラウザー 認証サーバー
(Keycloak)
認証デバイス
(スマートデバイス)
Identification: ユーザーは
Keycloakに自身のID情報
(Ex. username)を伝える。
どのユーザーなのかを示す
情報要求
12
© Hitachi, Ltd. 2024. All rights reserved.
Passkey
Passkeys : Authentication (login-less)
authenticator
assertion response
user ID
(handle)
authenticator assertion responseを生成。
User ID(必須)と関連情報を封入。
Authentication := 認証デバイスがローカルで認証ののち、Passkeyで生成した認証用
情報(Assertion)をKeycloakが検証する。
ユーザー/ブラウザー 認証サーバー
(Keycloak)
認証デバイス
(スマートデバイス)
ローカルでユーザー認証。
Identification &
Authentication: Keycloakは、
ユーザーが認証デバイスで
ローカル認証(Ex. 指紋)され
たことを確認する。.
ユーザーはKeycloakに自身
のID情報(Ex. username)を
伝えない。
認証要求
ローカルでの認証要求
ユーザーの
秘密鍵
ユーザーの秘密鍵で
署名。
User IDをキーとして、
Registrationにて登録済のユー
ザー公開鍵を取得。
ユーザーの公開鍵
で署名検証。
ユーザーの
公開鍵
13
© Hitachi, Ltd. 2024. All rights reserved.
2. 認可機能: OAuth 2.1
14
© Hitachi, Ltd. 2024. All rights reserved.
OAuth 2.1 : Overview
OAuth 2.1 := RFC 6749 OAuth 2.0 Authorization FrameworkおよびRFC 6750
Bearer Token Usageを置き換える、OAuth 2.0の次バージョン。
(quoted from its internet draft (*1))
*1 : https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-10#abstract
*2 : https://www.keycloak.org/docs/24.0.1/release_notes/index.html#oauth-2-1-support
Keycloak 24からOAuth 2.1をサポート。 (*2)
OAuth 2.0
OAuth 2.1
アクセストークンで認可情報を伝える
認可フレームワーク。
OAuth 2.0をより安全にした
認可フレームワーク。
15
© Hitachi, Ltd. 2024. All rights reserved.
OAuth 2.0 : リスク – API不正アクセス
1. 認可コード要求
ユーザー/
ブラウザー
クライアント
アプリケーション
認可
サーバー
API
サーバー
3. 認可コード応答
5. APIアクセス
HTTPリダイレクト
HTTPリダイレクト
認可コード
アクセストークン
認可コード
アクセストークン
認可コード
フロー
2. ユーザー認証・認可
4. トークン要求・応答
RFC 6750 Bearer Token usage:
アクセストークンを持っている人ならだれでも
そのアクセストークンを使ってAPIアクセスで
きる(Bearer Token)。
リスク: 攻撃者がクライアントアプリケーション
に発行されたアクセストークンを盗聴し、API
に不正アクセスする。
16
© Hitachi, Ltd. 2024. All rights reserved.
リスク軽減: 認可サーバーからアクセストークン
を受け取ったクライアントアプリケーションしか、
アクセストークンを使えないようにする
(Sender Constrained Token).
実現法1: RFC 8705 OAuth 2.0 Mutual-TLS
Client Authentication and Certificate-Bound
Access Tokens
⇒ 相互TLS(Mutual TLS)を利用。コンフィデ
ンシャルクライアント向け。Webアプリケーショ
ン向け。
実現法2: RFC 9449 OAuth 2.0
Demonstrating Proof of Possession (DPoP)
⇒ 公開鍵アルゴリズムのキーペアを利用。パ
ブリッククライアント向け。ネイティブアプリケー
ション、Single Page Application(SPA)向け。
Keycloakは両方サポートしています。
New!
OAuth 2.1 : コントロール – API不正アクセス
1. 認可コード要求
認可
サーバー
API
サーバー
3. 認可コード応答
5. APIアクセス
HTTPリダイレクト
HTTPリダイレクト
認可コード
アクセストークン
認可コード
アクセストークン
認可コード
フロー
2. ユーザー認証・認可
4. トークン要求・応答
ユーザー/
ブラウザー
クライアント
アプリケーション
17
© Hitachi, Ltd. 2024. All rights reserved.
OAuth 2.1 : リスク軽減 - DPoP
C
5. APアクセス
認可
コード
アクセストークンを生成。
DPoP
proof
DPoP Proofの署名を検証。DPoP Proofの中の公開鍵
のハッシュ値をアクセストークン内に入れる。
秘密鍵でアクセストークンに署名。
アクセストークンの署名を検証。
DPoP Proofの中の公開鍵のハッシュ値と
アクセストークン内のハッシュ値とを
完全一致で照合。
4. トークン要求・応答
C
アクセストークン
DPoP
proof
DPoP proofを生成。公開鍵を
その中に入れる。
秘密鍵でDPoP proofに署名。
秘密鍵でDPoP proofに署名。
DPoP proofを生成。公開鍵を
その中に入れる。
キーペアを生成。
Keycloak 23からDPoP
をPreview Featureとして
サポートし始めました。(*1)
*1 : https://www.keycloak.org/docs/23.0.7/release_notes/index.html#dpop-preview-support
アクセス
トークン
攻撃者は、クライアントアプリケーションの
秘密鍵がないとDPoP Proofを作れない。
クライアントアプリ 認可サーバー APIサーバー
18
© Hitachi, Ltd. 2024. All rights reserved.
Summary
• 認証 : KeycloakはPasskey認証をPreview Featureとしてサポート開始。
• 認可 : KeycloakはOAuth 2.1をサポート開始。
パブリッククライアント向けのSender Constrained Access Token実現に
使えるDPoPをPreview Featureとしてサポート開始
19
© Hitachi, Ltd. 2024. All rights reserved.
Trademarks
• OpenID is a trademark or registered trademark of OpenID Foundation in the
United States and other countries.
• GitHub is a trademark or registered trademark of GitHub, Inc. in the United
States and other countries.
• Red Hat is a trademark or registered trademark of Red Hat, Inc. in the United
States and other countries.
• X is a trademark or registered trademark of X CORP. in the United States and
other countries.
• Facebook is a trademark or registered trademark of Meta Platforms, Inc. in the
United States and other countries.
• Other brand names and product names used in this material are trademarks,
registered trademarks, or trade names of their respective holders.
© Hitachi, Ltd. 2024. All rights reserved.
乗松 隆志
2024年5月17日
株式会社日立製作所
OSSソリューションセンタ
END
Keycloak最新動向 - 認証および認可
20
Authentication and Authorization of The Latest Keycloak

More Related Content

Similar to Authentication and Authorization of The Latest Keycloak

FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...
FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...
FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...
Tatsuo Kudo
 
KeycloakでAPI認可に入門する
KeycloakでAPI認可に入門するKeycloakでAPI認可に入門する
KeycloakでAPI認可に入門する
Hitachi, Ltd. OSS Solution Center.
 
「Windows Phone アプリ と 認証」のまとめ
「Windows Phone アプリ と 認証」のまとめ「Windows Phone アプリ と 認証」のまとめ
「Windows Phone アプリ と 認証」のまとめ
junichi anno
 
React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面
KentaEndoh
 
Authlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_inside
Authlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_insideAuthlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_inside
Authlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_inside
Tatsuo Kudo
 
YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜
YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜
YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜
Yahoo!デベロッパーネットワーク
 
FAPI and Beyond: From an specification author's point of view #fapisum - Japa...
FAPI and Beyond: From an specification author's point of view #fapisum - Japa...FAPI and Beyond: From an specification author's point of view #fapisum - Japa...
FAPI and Beyond: From an specification author's point of view #fapisum - Japa...
FinTechLabs.io
 
FIDO2 ~ パスワードのいらない世界へ
FIDO2 ~ パスワードのいらない世界へFIDO2 ~ パスワードのいらない世界へ
FIDO2 ~ パスワードのいらない世界へ
FIDO Alliance
 
Amazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピング
Amazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピングAmazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピング
Amazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピング
Amazon Web Services Japan
 
Idcon25 FIDO2 の概要と YubiKey の実装
Idcon25 FIDO2 の概要と YubiKey の実装Idcon25 FIDO2 の概要と YubiKey の実装
Idcon25 FIDO2 の概要と YubiKey の実装
Haniyama Wataru
 
NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話
Hitachi, Ltd. OSS Solution Center.
 
Azure ADとIdentity管理
Azure ADとIdentity管理Azure ADとIdentity管理
Azure ADとIdentity管理
Naohiro Fujie
 
OAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawaws
OAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawawsOAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawaws
OAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawaws
Tatsuo Kudo
 
数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート
FIDO Alliance
 
20150723 最近の興味動向 fido編
20150723 最近の興味動向 fido編20150723 最近の興味動向 fido編
20150723 最近の興味動向 fido編
Tatsuya (達也) Katsuhara (勝原)
 
[SC14] IoT のセキュリティアーキテクチャと実装モデル
[SC14] IoT のセキュリティアーキテクチャと実装モデル[SC14] IoT のセキュリティアーキテクチャと実装モデル
[SC14] IoT のセキュリティアーキテクチャと実装モデル
de:code 2017
 
CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...
CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...
CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...
Tatsuo Kudo
 
「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api
「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api
「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api
Tatsuo Kudo
 
Authlete overview
Authlete overviewAuthlete overview
Authlete overview
mtisol
 
認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜
Masaru Kurahayashi
 

Similar to Authentication and Authorization of The Latest Keycloak (20)

FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...
FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...
FAPI (Financial-grade API) and CIBA (Client Initiated Backchannel Authenticat...
 
KeycloakでAPI認可に入門する
KeycloakでAPI認可に入門するKeycloakでAPI認可に入門する
KeycloakでAPI認可に入門する
 
「Windows Phone アプリ と 認証」のまとめ
「Windows Phone アプリ と 認証」のまとめ「Windows Phone アプリ と 認証」のまとめ
「Windows Phone アプリ と 認証」のまとめ
 
React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面React(TypeScript) + Go + Auth0 で実現する管理画面
React(TypeScript) + Go + Auth0 で実現する管理画面
 
Authlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_inside
Authlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_insideAuthlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_inside
Authlete: セキュアな金融 API 基盤の実現と Google Cloud の活用 #gc_inside
 
YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜
YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜
YJTC18 D-1 安心安全な次世代認証を目指して 〜社会に溶け込む認証技術〜
 
FAPI and Beyond: From an specification author's point of view #fapisum - Japa...
FAPI and Beyond: From an specification author's point of view #fapisum - Japa...FAPI and Beyond: From an specification author's point of view #fapisum - Japa...
FAPI and Beyond: From an specification author's point of view #fapisum - Japa...
 
FIDO2 ~ パスワードのいらない世界へ
FIDO2 ~ パスワードのいらない世界へFIDO2 ~ パスワードのいらない世界へ
FIDO2 ~ パスワードのいらない世界へ
 
Amazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピング
Amazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピングAmazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピング
Amazon FreeRTOSを用いた量産向けIoTマイコンデバイス開発プロトタイピング
 
Idcon25 FIDO2 の概要と YubiKey の実装
Idcon25 FIDO2 の概要と YubiKey の実装Idcon25 FIDO2 の概要と YubiKey の実装
Idcon25 FIDO2 の概要と YubiKey の実装
 
NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話NGINXをBFF (Backend for Frontend)として利用した話
NGINXをBFF (Backend for Frontend)として利用した話
 
Azure ADとIdentity管理
Azure ADとIdentity管理Azure ADとIdentity管理
Azure ADとIdentity管理
 
OAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawaws
OAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawawsOAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawaws
OAuth / OpenID Connectを中心とするAPIセキュリティについて #yuzawaws
 
数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート数々の実績:迅速なFIDO認証の展開をサポート
数々の実績:迅速なFIDO認証の展開をサポート
 
20150723 最近の興味動向 fido編
20150723 最近の興味動向 fido編20150723 最近の興味動向 fido編
20150723 最近の興味動向 fido編
 
[SC14] IoT のセキュリティアーキテクチャと実装モデル
[SC14] IoT のセキュリティアーキテクチャと実装モデル[SC14] IoT のセキュリティアーキテクチャと実装モデル
[SC14] IoT のセキュリティアーキテクチャと実装モデル
 
CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...
CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...
CIBA (Client Initiated Backchannel Authentication) の可能性 #authlete #api #oauth...
 
「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api
「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api
「金融API向けOAuth」にみるOAuthプロファイリングの実際 #secjaws #finsecjaws01 #oauth #oidc #api
 
Authlete overview
Authlete overviewAuthlete overview
Authlete overview
 
認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜認証の課題とID連携の実装 〜ハンズオン〜
認証の課題とID連携の実装 〜ハンズオン〜
 

More from Hitachi, Ltd. OSS Solution Center.

Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...
Hitachi, Ltd. OSS Solution Center.
 
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩みKeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
Hitachi, Ltd. OSS Solution Center.
 
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
Hitachi, Ltd. OSS Solution Center.
 
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
Hitachi, Ltd. OSS Solution Center.
 
Challenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with KeycloakChallenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with Keycloak
Hitachi, Ltd. OSS Solution Center.
 
KubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdfKubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdf
Hitachi, Ltd. OSS Solution Center.
 
NGINXでの認可について考える
NGINXでの認可について考えるNGINXでの認可について考える
NGINXでの認可について考える
Hitachi, Ltd. OSS Solution Center.
 
Security Considerations for API Gateway Aggregation
Security Considerations for API Gateway AggregationSecurity Considerations for API Gateway Aggregation
Security Considerations for API Gateway Aggregation
Hitachi, Ltd. OSS Solution Center.
 
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開するKeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
Hitachi, Ltd. OSS Solution Center.
 
IDガバナンス&管理の基礎
IDガバナンス&管理の基礎IDガバナンス&管理の基礎
IDガバナンス&管理の基礎
Hitachi, Ltd. OSS Solution Center.
 
Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?
Hitachi, Ltd. OSS Solution Center.
 
What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...
Hitachi, Ltd. OSS Solution Center.
 
Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...
Hitachi, Ltd. OSS Solution Center.
 
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Hitachi, Ltd. OSS Solution Center.
 
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Hitachi, Ltd. OSS Solution Center.
 
Apache con@home 2021_sha
Apache con@home 2021_shaApache con@home 2021_sha
Apache con@home 2021_sha
Hitachi, Ltd. OSS Solution Center.
 
Node-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using ElectronNode-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using Electron
Hitachi, Ltd. OSS Solution Center.
 
Hacktoberfest 概要、Node-REDプロジェクト貢献手順
Hacktoberfest 概要、Node-REDプロジェクト貢献手順Hacktoberfest 概要、Node-REDプロジェクト貢献手順
Hacktoberfest 概要、Node-REDプロジェクト貢献手順
Hitachi, Ltd. OSS Solution Center.
 
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
Hitachi, Ltd. OSS Solution Center.
 
Node-RED v2.0新機能紹介
Node-RED v2.0新機能紹介Node-RED v2.0新機能紹介
Node-RED v2.0新機能紹介
Hitachi, Ltd. OSS Solution Center.
 

More from Hitachi, Ltd. OSS Solution Center. (20)

Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...Guide of authentication and authorization for cloud native applications with ...
Guide of authentication and authorization for cloud native applications with ...
 
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩みKeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
KeycloakのCNCF incubating project入りまでのアップストリーム活動の歩み
 
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
KubeCon NA 2023 Recap: Challenge to Implementing “Scalable” Authorization wit...
 
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
パスキーでリードする: NGINXとKeycloakによる効率的な認証・認可
 
Challenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with KeycloakChallenge to Implementing "Scalable" Authorization with Keycloak
Challenge to Implementing "Scalable" Authorization with Keycloak
 
KubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdfKubeConRecap_nakamura.pdf
KubeConRecap_nakamura.pdf
 
NGINXでの認可について考える
NGINXでの認可について考えるNGINXでの認可について考える
NGINXでの認可について考える
 
Security Considerations for API Gateway Aggregation
Security Considerations for API Gateway AggregationSecurity Considerations for API Gateway Aggregation
Security Considerations for API Gateway Aggregation
 
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開するKeycloakでFAPIに対応した高セキュリティなAPIを公開する
KeycloakでFAPIに対応した高セキュリティなAPIを公開する
 
IDガバナンス&管理の基礎
IDガバナンス&管理の基礎IDガバナンス&管理の基礎
IDガバナンス&管理の基礎
 
Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?Why Assertion-based Access Token is preferred to Handle-based one?
Why Assertion-based Access Token is preferred to Handle-based one?
 
What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...What API Specifications and Tools Help Engineers to Construct a High-Security...
What API Specifications and Tools Help Engineers to Construct a High-Security...
 
Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...Implementing security and availability requirements for banking API system us...
Implementing security and availability requirements for banking API system us...
 
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
Lightweight Zero-trust Network Implementation and Transition with Keycloak an...
 
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
Overall pictures of Identity provider mix-up attack patterns and trade-offs b...
 
Apache con@home 2021_sha
Apache con@home 2021_shaApache con@home 2021_sha
Apache con@home 2021_sha
 
Node-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using ElectronNode-RED Installer, Standalone Installer using Electron
Node-RED Installer, Standalone Installer using Electron
 
Hacktoberfest 概要、Node-REDプロジェクト貢献手順
Hacktoberfest 概要、Node-REDプロジェクト貢献手順Hacktoberfest 概要、Node-REDプロジェクト貢献手順
Hacktoberfest 概要、Node-REDプロジェクト貢献手順
 
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
最近のKeycloakのご紹介 ~クライアントポリシーとFAPI~
 
Node-RED v2.0新機能紹介
Node-RED v2.0新機能紹介Node-RED v2.0新機能紹介
Node-RED v2.0新機能紹介
 

Recently uploaded

Solanaで始めるRustプログラミング - Superteam Japan Developer Event
Solanaで始めるRustプログラミング - Superteam Japan Developer EventSolanaで始めるRustプログラミング - Superteam Japan Developer Event
Solanaで始めるRustプログラミング - Superteam Japan Developer Event
K Kinzal
 
アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)
アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)
アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)
You&I
 
シグネチャで始めるRustプログラミング - Superteam Japan Developer Event
シグネチャで始めるRustプログラミング - Superteam Japan Developer Eventシグネチャで始めるRustプログラミング - Superteam Japan Developer Event
シグネチャで始めるRustプログラミング - Superteam Japan Developer Event
K Kinzal
 
クラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdf
クラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdfクラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdf
クラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdf
TatsuyaHanayama
 
CO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdf
CO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdfCO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdf
CO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdf
yamamotominami
 
NIST Cybersecurity Framework 2.0の変更点整理をしよう
NIST Cybersecurity Framework 2.0の変更点整理をしようNIST Cybersecurity Framework 2.0の変更点整理をしよう
NIST Cybersecurity Framework 2.0の変更点整理をしよう
You&I
 

Recently uploaded (6)

Solanaで始めるRustプログラミング - Superteam Japan Developer Event
Solanaで始めるRustプログラミング - Superteam Japan Developer EventSolanaで始めるRustプログラミング - Superteam Japan Developer Event
Solanaで始めるRustプログラミング - Superteam Japan Developer Event
 
アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)
アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)
アジャイルの30年(Tree Decades of Agileというブログ記事に関する要約)
 
シグネチャで始めるRustプログラミング - Superteam Japan Developer Event
シグネチャで始めるRustプログラミング - Superteam Japan Developer Eventシグネチャで始めるRustプログラミング - Superteam Japan Developer Event
シグネチャで始めるRustプログラミング - Superteam Japan Developer Event
 
クラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdf
クラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdfクラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdf
クラウドネイティブにおけるセキュアなソフトウェア・サプライ・チェーンの考え方とベストプラクティス.pdf
 
CO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdf
CO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdfCO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdf
CO2排出量見える化・削減・報告クラウド「アスエネ」サービス紹介_Saleshub.pdf
 
NIST Cybersecurity Framework 2.0の変更点整理をしよう
NIST Cybersecurity Framework 2.0の変更点整理をしようNIST Cybersecurity Framework 2.0の変更点整理をしよう
NIST Cybersecurity Framework 2.0の変更点整理をしよう
 

Authentication and Authorization of The Latest Keycloak

  • 1. © Hitachi, Ltd. 2024. All rights reserved. Keycloak最新動向 - 認証および認可 Cloud Native Security Japan Kickoff meetup 2024 @東京ガーデンテラス紀尾井町 紀尾井タワー 株式会社日立製作所 OSSソリューションセンタ 2024年5月17日 乗松 隆志
  • 2. 1 © Hitachi, Ltd. 2024. All rights reserved. 自己紹介 ◼ OSSを利用したサービス・技術コンサルティングの提供 ◼ Keycloakへのコントリビューション活動 (機能実装、コードレビュー、カンファレンスでのPR、コ ミュニティ活動のリード) Keycloakへの主要なコントリビューション :  W3C Web Authentication (WebAuthn) のRelying Party側実装 (Passkeys authentication)  セキュリティの標準仕様の実装 (e.g., RFC 7636 PKCE, RFC 8705 OAuth MTLS, OIDC CIBA, RFC 9126 PAR, RFC 8032/8037 EdDSA, RFC 9449 DPoP, RFC 9207 OAuth2 Authz Server Issuer Identification, Internet-Draft OAuth 2.1)  Financial-grade API (FAPI) の各種Security Profilesの実装 (e.g., FAPI 1.0 Baseline, FAPI 1.0 Advanced, FAPI-CIBA, FAPI 2.0 Baseline, FAPI 2.0 Message Signing) 乗松 隆志 (@tnorimat in github) : 株式会社日立製作所 OSSソリューションセンタ所属 シニアOSSスペシャリスト Keycloak*メンテナー, Keycloakサブプロジェクト “OAuth SIG” Tech Lead * Keycloak : The Identity and Access Management (IAM) 用のOSS.
  • 3. 2 © Hitachi, Ltd. 2024. All rights reserved. Keycloakとは Keycloak 主要標準に対応したID連携 (OAuth2.0認可サーバー含む) ソーシャルログイン (Identity Brokering) ID管理と認証 LDAP Active Directory RDB OpenID SAML XML.org GitHub X Facebook アイデンティティおよびアクセス管理用のオープ ンソース・ソフトウェア。 シングルサインオンやOAuth2.0に対応したAPI の認可サーバーの機能を提供。 2023年4月より、The Linux Foundation傘下の Cloud Native Computing Foundation (CNCF) の Incubating Projectとなっている。 https://www.cncf.io/projects/keycloak/ Githubを利用して開発。 https://github.com/keycloak/keycloak
  • 4. © Hitachi, Ltd. 2024. All rights reserved. 1. 認証機能: Passkeys 2. 認可機能: OAuth 2.1 発表内容 3
  • 5. 4 © Hitachi, Ltd. 2024. All rights reserved. 1. 認証機能: Passkeys
  • 6. 5 © Hitachi, Ltd. 2024. All rights reserved. Passkeysとは 二種類のPasskey: • Synced passkey • Device-bound passkey 二種類の認証方法: • Cross-device authentication • Same-device authentication Keycloak 23はPasskeyのサポートを Preview Featureとして始めました. (*2) Passkeys := FIDO standardsをベースとし、ユーザーの複数のデバイスのアプリケー ションで素早く、簡単に、そして安全にシングルサインオンを行える。Password認証に代 わるもの。 Passwordと違い、Passkeyはフィッシィング攻撃に耐性がある。 (quoted from the website of FIDO Alliance (*1)) *1 : https://fidoalliance.org/passkeys/#resources *2 : https://www.keycloak.org/docs/23.0.7/release_notes/index.html#passkeys-support
  • 7. 6 © Hitachi, Ltd. 2024. All rights reserved. Passkeys – WebAuthnとの関係 WebAuthn := 公開鍵アルゴリズムを利用したWebベースの認証標準で、W3Cにより策 定されている。Password-less認証とMulti-Factor認証をサポートし、Password認証で生 じる問題を解決している。 大体のところ、技術的な観点からはPasskey認証とWebAuthn認証は同じ。 KeycloakのPasskey認証は、既存サポートのWebAuthn認証を利用。 Keycloak 8 から、WebAuthn認証を正式にサポートしている。 (*1). Passkeyは下記のメジャーなプラットフォームでサポートされている。 • Windows (Windows Hello) • MacOS / iPhone / iPad • Android *1 : https://www.Keycloak.org/docs/latest/release_notes/index.html#w3c-web-authentication-support
  • 8. 7 © Hitachi, Ltd. 2024. All rights reserved. Passkeys - Synced Passkey と Device-bound Passkey ユーザー PC Synced Passkey := クラウドサービスにより ユーザーの複数のデバイス間で同期される Passkey。 (quoted from the website of FIDO Alliance (*1)) Device-bound Passkey := ユーザーの単一 のデバイスにバインドされるPasskey。そのデ バイス外に出ていかない。 (quoted from the website of FIDO Alliance (*1)) • Google Account : Google Password Manager (*2) • Apple ID : Apple iCloud Keychain (*3) • 3rd party password manager : Bitwarden, 1Password, etc. Android, iOS, and macOS have native APIs for 3rd party passkey providers *1 : https://fidoalliance.org/faqs/#PasskeysFAQs *2 : https://developers.google.com/identity/passkeys *3 : https://developer.apple.com/passkeys/ スマートデバイス Passkey Passkey クラウド サービス: sync ユーザー PC スマートデバイス Passkey Passkey 同一 別物
  • 9. 8 © Hitachi, Ltd. 2024. All rights reserved. Passkeys - Same-device認証 と Cross-device認証 Same-device Authentication := 認証を行 おうとしているデバイスと同じデバイスにある Passkeyで認証する。 Cross-device Authentication:=認証を行お うとしているデバイスとは異なるデバイスにあ るPasskeyで認証する。 (quoted from passkeys.dev (*7)) *1: https://passkeys.dev/docs/reference/terms/#cross-device-authentication-cda 認証サーバー ユーザー PC スマートデバイス Passkey (A) Passkey (B) 認証 by Passkey (A) 認証サーバー ユーザー PC スマートデバイス Passkey (A) Passkey (B) 認証 by Passkey (B) via NFC
  • 10. 9 © Hitachi, Ltd. 2024. All rights reserved. Passkeys : KeycloakではどのようにしてPasskey認証するか Registration := 認証デバイスがローカルで認証ののち、 Passkeyで生成された情報 (Attestation)をKeycloakに登録し、KeycloakはこれをユーザーのIDとバインドする。 Authentication := 認証デバイスがローカルで認証ののち、Passkeyで生成した認証用 情報(Assertion)をKeycloakが検証する。 1. Registration 2. Authentication • Password-less Authentication • Login-less Authentication (Discoverable Credentials (*1) 限定) *1 : https://www.w3.org/TR/webauthn-3/#discoverable-credential (Resident Key in webauthn level2)
  • 11. 10 © Hitachi, Ltd. 2024. All rights reserved. Passkeys : Registration ユーザー/ブラウザー 認証サーバー (Keycloak) 認証デバイス (スマートデバイス) ローカルでユーザー認証。 authenticator attestation responseを生成。 ユーザーの公開鍵と関連情報を封入。 デバイスベンダーの 秘密鍵で署名。 デバイスベン ダーの公開鍵で 署名検証。 Keycloakは、受け取ったデータ が正統な認証デバイスにより生 成されたものであることを確認。 ユーザーを認証 user ID ユーザーの 秘密鍵 認証のための 情報要求 authenticator attestation response デバイスベンダー の秘密鍵 デバイスベンダー の公開鍵 ユーザーの 公開鍵 キーペアを生成し、user IDと紐づけ。 user IDとユーザーの公開鍵を紐づけ Keycloakは、受け取ったデータ 内の公開鍵を、ユーザーのIDと バインドする。 デバイスベンター の証明書 ユーザー名 /パスワード Passkey Registration := 認証デバイスがローカルで認証ののち、 Passkeyで生成された情報 (Attestation)をKeycloakに登録し、KeycloakはこれをユーザーのIDとバインドする。 user ID
  • 12. 11 © Hitachi, Ltd. 2024. All rights reserved. Passkeys : Authentication (password-less) ユーザー名でuser IDを検索。 user ID ユーザー名 authenticator assertion response Authentication: Keycloakは、 ユーザーが認証デバイスで ローカル認証(Ex. 指紋)され たことを確認する。. User IDが入っている場合: Identificationのフェーズでの user IDと、assertion内のuser IDが一致するか検証。 User IDをキーとして、 Registrationにて登録済のユー ザー公開鍵を取得。 ユーザーの公開鍵 で署名検証。 ユーザーの 公開鍵 ユーザーの 秘密鍵 user ID (handle) ローカルでの認証要求 ローカルでユーザー認証。 authenticator assertion responseを生成。 User ID(オプショナル)と関連情報を封入。 ユーザーの秘密鍵で 署名。 Passkey Authentication := 認証デバイスがローカルで認証ののち、Passkeyで生成した認証用 情報(Assertion)をKeycloakが検証する。 ユーザー/ブラウザー 認証サーバー (Keycloak) 認証デバイス (スマートデバイス) Identification: ユーザーは Keycloakに自身のID情報 (Ex. username)を伝える。 どのユーザーなのかを示す 情報要求
  • 13. 12 © Hitachi, Ltd. 2024. All rights reserved. Passkey Passkeys : Authentication (login-less) authenticator assertion response user ID (handle) authenticator assertion responseを生成。 User ID(必須)と関連情報を封入。 Authentication := 認証デバイスがローカルで認証ののち、Passkeyで生成した認証用 情報(Assertion)をKeycloakが検証する。 ユーザー/ブラウザー 認証サーバー (Keycloak) 認証デバイス (スマートデバイス) ローカルでユーザー認証。 Identification & Authentication: Keycloakは、 ユーザーが認証デバイスで ローカル認証(Ex. 指紋)され たことを確認する。. ユーザーはKeycloakに自身 のID情報(Ex. username)を 伝えない。 認証要求 ローカルでの認証要求 ユーザーの 秘密鍵 ユーザーの秘密鍵で 署名。 User IDをキーとして、 Registrationにて登録済のユー ザー公開鍵を取得。 ユーザーの公開鍵 で署名検証。 ユーザーの 公開鍵
  • 14. 13 © Hitachi, Ltd. 2024. All rights reserved. 2. 認可機能: OAuth 2.1
  • 15. 14 © Hitachi, Ltd. 2024. All rights reserved. OAuth 2.1 : Overview OAuth 2.1 := RFC 6749 OAuth 2.0 Authorization FrameworkおよびRFC 6750 Bearer Token Usageを置き換える、OAuth 2.0の次バージョン。 (quoted from its internet draft (*1)) *1 : https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-10#abstract *2 : https://www.keycloak.org/docs/24.0.1/release_notes/index.html#oauth-2-1-support Keycloak 24からOAuth 2.1をサポート。 (*2) OAuth 2.0 OAuth 2.1 アクセストークンで認可情報を伝える 認可フレームワーク。 OAuth 2.0をより安全にした 認可フレームワーク。
  • 16. 15 © Hitachi, Ltd. 2024. All rights reserved. OAuth 2.0 : リスク – API不正アクセス 1. 認可コード要求 ユーザー/ ブラウザー クライアント アプリケーション 認可 サーバー API サーバー 3. 認可コード応答 5. APIアクセス HTTPリダイレクト HTTPリダイレクト 認可コード アクセストークン 認可コード アクセストークン 認可コード フロー 2. ユーザー認証・認可 4. トークン要求・応答 RFC 6750 Bearer Token usage: アクセストークンを持っている人ならだれでも そのアクセストークンを使ってAPIアクセスで きる(Bearer Token)。 リスク: 攻撃者がクライアントアプリケーション に発行されたアクセストークンを盗聴し、API に不正アクセスする。
  • 17. 16 © Hitachi, Ltd. 2024. All rights reserved. リスク軽減: 認可サーバーからアクセストークン を受け取ったクライアントアプリケーションしか、 アクセストークンを使えないようにする (Sender Constrained Token). 実現法1: RFC 8705 OAuth 2.0 Mutual-TLS Client Authentication and Certificate-Bound Access Tokens ⇒ 相互TLS(Mutual TLS)を利用。コンフィデ ンシャルクライアント向け。Webアプリケーショ ン向け。 実現法2: RFC 9449 OAuth 2.0 Demonstrating Proof of Possession (DPoP) ⇒ 公開鍵アルゴリズムのキーペアを利用。パ ブリッククライアント向け。ネイティブアプリケー ション、Single Page Application(SPA)向け。 Keycloakは両方サポートしています。 New! OAuth 2.1 : コントロール – API不正アクセス 1. 認可コード要求 認可 サーバー API サーバー 3. 認可コード応答 5. APIアクセス HTTPリダイレクト HTTPリダイレクト 認可コード アクセストークン 認可コード アクセストークン 認可コード フロー 2. ユーザー認証・認可 4. トークン要求・応答 ユーザー/ ブラウザー クライアント アプリケーション
  • 18. 17 © Hitachi, Ltd. 2024. All rights reserved. OAuth 2.1 : リスク軽減 - DPoP C 5. APアクセス 認可 コード アクセストークンを生成。 DPoP proof DPoP Proofの署名を検証。DPoP Proofの中の公開鍵 のハッシュ値をアクセストークン内に入れる。 秘密鍵でアクセストークンに署名。 アクセストークンの署名を検証。 DPoP Proofの中の公開鍵のハッシュ値と アクセストークン内のハッシュ値とを 完全一致で照合。 4. トークン要求・応答 C アクセストークン DPoP proof DPoP proofを生成。公開鍵を その中に入れる。 秘密鍵でDPoP proofに署名。 秘密鍵でDPoP proofに署名。 DPoP proofを生成。公開鍵を その中に入れる。 キーペアを生成。 Keycloak 23からDPoP をPreview Featureとして サポートし始めました。(*1) *1 : https://www.keycloak.org/docs/23.0.7/release_notes/index.html#dpop-preview-support アクセス トークン 攻撃者は、クライアントアプリケーションの 秘密鍵がないとDPoP Proofを作れない。 クライアントアプリ 認可サーバー APIサーバー
  • 19. 18 © Hitachi, Ltd. 2024. All rights reserved. Summary • 認証 : KeycloakはPasskey認証をPreview Featureとしてサポート開始。 • 認可 : KeycloakはOAuth 2.1をサポート開始。 パブリッククライアント向けのSender Constrained Access Token実現に 使えるDPoPをPreview Featureとしてサポート開始
  • 20. 19 © Hitachi, Ltd. 2024. All rights reserved. Trademarks • OpenID is a trademark or registered trademark of OpenID Foundation in the United States and other countries. • GitHub is a trademark or registered trademark of GitHub, Inc. in the United States and other countries. • Red Hat is a trademark or registered trademark of Red Hat, Inc. in the United States and other countries. • X is a trademark or registered trademark of X CORP. in the United States and other countries. • Facebook is a trademark or registered trademark of Meta Platforms, Inc. in the United States and other countries. • Other brand names and product names used in this material are trademarks, registered trademarks, or trade names of their respective holders.
  • 21. © Hitachi, Ltd. 2024. All rights reserved. 乗松 隆志 2024年5月17日 株式会社日立製作所 OSSソリューションセンタ END Keycloak最新動向 - 認証および認可 20