FIDO2/WebAuthn 実装改善バックログ
概要
FIDO2/WebAuthn実装の現状分析と残課題をまとめたドキュメント。 現在の実装は基本機能が完成しており、本番運用可能な状態だが、いくつかの改善点が存在する。
現在の実装状況
完成済み機能
| 機能 | 状態 | 備考 |
|---|---|---|
| 登録チャレンジ生成 | ✅ | WebAuthn4jRegistrationChallengeExecutor |
| 登録検証・保存 | ✅ | WebAuthn4jRegistrationExecutor |
| 認証チャレンジ生成 | ✅ | WebAuthn4jAuthenticationChallengeExecutor |
| 認証検証 | ✅ | WebAuthn4jAuthenticationExecutor |
| マルチクレデンシャル対応 | ✅ | 1ユーザーで複数パスキー登録可能 |
| マルチテナント対応 | ✅ | 全クエリで tenant_id 使用 |
| PostgreSQL対応 | ✅ | PostgresqlExecutor |
| MySQL対応 | ✅ | MysqlExecutor |
| signCount検証(クローン検出) | ✅ | 認証時にカウンタ検証 |
| transports保存 | ✅ | UX最適化用 |
| credProtect保存 | ✅ | 保護レベル |
| Resident Key (Discoverable Credential) | ✅ | rk フラグ保存 |
アーキテクチャ
┌─────────────────────────────────────────────────────────────────┐
│ Application Plane API │
├─────────────────────────────────────────────────────────────────┤
│ Fido2RegistrationChallengeInteractor │
│ Fido2RegistrationInteractor │
│ Fido2AuthenticationChallengeInteractor │
│ Fido2AuthenticationInteractor │
├─────────────────────────────────────────────────────────────────┤
│ WebAuthn4j Adapter │
├─────────────────────────────────────────────────────────────────┤
│ WebAuthn4jRegistrationChallengeExecutor │
│ WebAuthn4jRegistrationExecutor │
│ WebAuthn4jAuthenticationChallengeExecutor │
│ WebAuthn4jAuthenticationExecutor │
├─────────────────────────────────────────────────────────────────┤
│ WebAuthn4jCredentialRepository (Interface) │
│ └── WebAuthn4jCredentialDataSource (Implementation) │
│ ├── PostgresqlExecutor │
│ └── MysqlExecutor │
└─────────────────────────────────────────────────────────────────┘