Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Okta × OpenID Connect × FIDO2

kg0r0
April 13, 2021
1.6k

Okta × OpenID Connect × FIDO2

第1回 Okta勉強会 #jougでの登壇資料です。
OktaでのOIDCおよびFIDOの設定方法について説明しています。
資料作成時点で無料アカウントの範囲内で利用できる機能のみでやっています。

kg0r0

April 13, 2021
Tweet

Transcript

  1. 全体処理フロー User Agent RP OP スタート OPへリダイレクト (302) Authentication Request

    RPへリダイレクト (302) Authentication Response Token Request Token Response OpenID Connect ユーザー認証および同意 FIDO2
  2. もくじ • OpenID Connect (OIDC) とは • Okta – OIDC設定

    • FIDO2とは • Okta – FIDO2設定 • デモ • おわりに
  3. OpenID Connect (OIDC) とは • IdP (OP) が管理するアカウント情報でサード パーティーアプリケーションにログイン 可能

    にする ◦ 例えばconnpassにGithubアカウントでログインなど ◦ アプリケーション・ユーザーともにID・パスワードの 管理する手間が省くことができる • アプリケーション (RP) はIdPが提供するユー ザーの属性情報を利用できる
  4. OpenID Connect 2つのClient Type • Confidential Client クライアントシークレットの機密性を維持することができるクライアント (Webアプリケーションなど) •

    Public Client クライアントシークレットの機密性を維持することができないクライアン ト (JavaScriptアプリやNativeアプリなど)
  5. OpenID Connect 3つのフロー • Authorization Code Flow • Implicit Flow

    • Hybrid Flow ※ アプリケーションの種類 (Client Type) が利用するフローに影響
  6. (参考) OAuth 2.0 Playground • OAuth/OpenID Connectのフロ ーを実際に手を動かしながら解 説付きで学ぶことが可能 •

    Sponsored By Okta • URL: https://www.oauth.com/playgr ound/ https://www.oauth.com/playground/
  7. OIDC設定 • [Applications] からApplication の追加 • アプリケーションのタイプをも とにPlatformを選択 • ユーザー認証後のリダイレクト

    先を登録 • 設定に必要な値を確認 • ユーザーやグループを作成 • アプリケーションにユーザーや グループをアサイン
  8. OIDC設定 • [Applications] からApplication の追加 • アプリケーションのタイプをも とにPlatformを選択 • ユーザー認証後のリダイレクト

    先を登録 • 設定に必要な値を確認 • ユーザーやグループを作成 • アプリケーションにユーザーや グループをアサイン
  9. OIDC設定 • [Applications] からApplication の追加 • アプリケーションのタイプをも とにPlatformを選択 • ユーザー認証後のリダイレクト

    先を登録 • 設定に必要な値を確認 • ユーザーやグループを作成 • アプリケーションにユーザーや グループをアサイン
  10. OIDC設定 • [Applications] からApplication の追加 • アプリケーションのタイプをも とにPlatformを選択 • ユーザー認証後のリダイレクト

    先を登録 • 設定に必要な値を確認 • ユーザーやグループを作成 • アプリケーションにユーザーや グループをアサイン
  11. OIDC設定 • [Applications] からApplication の追加 • アプリケーションのタイプをも とにPlatformを選択 • ユーザー認証後のリダイレクト

    先を登録 • 設定に必要な値を確認 • ユーザーやグループを作成 • アプリケーションにユーザーや グループをアサイン
  12. OIDC設定 • [Applications] からApplication の追加 • アプリケーションのタイプをも とにPlatformを選択 • ユーザー認証後のリダイレクト

    先を登録 • 設定に必要な値を確認 • ユーザーやグループを作成 • アプリケーションにユーザーや グループをアサイン
  13. FIDO2認証モデル (概略) クライアント (ブラウザ) 認証器 (Yubikeyなど) FIDOサーバー / RP (Oktaなど)

    1. 認証要求 (チャレンジなど) 4. ローカル認証 2.WebAuthentication API 呼び出し 5. 認証結果 (署名など) 6. 認証結果 (署名など) 3. 認証要求 (チャレンジなど) 7. 署名などの検証
  14. FIDO2設定 • [Security] > [Multifactor]から FIDO2(WebAuthn)を有効化 • Factor Enrollmentからアサイン するグループを指定

    • 認証器の登録タイミングを指定 • [Security] > [Authentication] で 要求するタイミングを指定
  15. FIDO2設定 • [Security] > [Multifactor]から FIDO2(WebAuthn)を有効化 • Factor Enrollmentからアサイン するグループを指定

    • 認証器の登録タイミングを指定 • [Security] > [Authentication] で 要求するタイミングを指定
  16. FIDO2設定 • [Security] > [Multifactor]から FIDO2(WebAuthn)を有効化 • Factor Enrollmentからアサイン するグループを指定

    • 認証器の登録タイミングを指定 • [Security] > [Authentication] で 要求するタイミングを指定
  17. FIDO2設定 • [Security] > [Multifactor]から FIDO2(WebAuthn)を有効化 • Factor Enrollmentからアサイン するグループを指定

    • 認証器の登録タイミングを指定 • [Security] > [Authentication] で 要求するタイミングを指定
  18. サンプルアプリケーションの起動 $ git clone https://github.com/okta/samples-nodejs-express-4.git $ cd samples-nodejs-express-4/ $ npm

    install $ npm run okta-hosted-login-server 参考) https://github.com/okta/samples-nodejs-express-4/tree/master/okta-hosted-login 事前に環境変数ISSUER、CLIENT_ID、CLIENT_SECRETをそれぞれ設定
  19. ログイン画面 User Agent RP OP スタート OPへリダイレクト (302) Authentication Request

    RPへリダイレクト (302) Authentication Response Token Request Token Response ユーザー認証および同意
  20. ID / PW 認証画面 User Agent RP OP スタート OPへリダイレクト

    (302) Authentication Request RPへリダイレクト (302) Authentication Response Token Request Token Response ユーザー認証および同意
  21. FIDO2 登録画面 (初回) User Agent RP OP スタート OPへリダイレクト (302)

    Authentication Request RPへリダイレクト (302) Authentication Response Token Request Token Response ユーザー認証および同意
  22. FIDO2 認証画面 User Agent RP OP スタート OPへリダイレクト (302) Authentication

    Request RPへリダイレクト (302) Authentication Response Token Request Token Response ユーザー認証および同意
  23. ログイン完了画面 User Agent RP OP スタート OPへリダイレクト (302) Authentication Request

    RPへリダイレクト (302) Authentication Response Token Request Token Response ユーザー認証および同意
  24. (参考) Okta GitHub • 便利なライブラリが複数存在 • 今回のデモアプリに組み込まれ ているライブラリもここで開発 されている •

    Okta NodeJS OIDC Middleware (https://github.com/okta/okta- oidc- js/tree/master/packages/oidc- middleware) https://github.com/okta
  25. 参考 • Add User Authentication to Your Node.js App https://developer.okta.com/code/nodejs/

    • okta Help Center WebAuthn (MFA) https://help.okta.com/en/prod/Content/Topics/Security/mfa-webauthn.htm • How FIDO2 + WebAuthn Offer a Seamless Secure Login https://www.okta.com/blog/2019/04/how-fido2-webauthn-offer-a-seamless- secure-login/ • パスワードのいらない世界へ : FIDOアライアンスとFIDO認証の最新状況 https://www.slideshare.net/FIDOAlliance/2020-0218-fidofido