用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aibot88/sec_skill_store --skill spec-fido2命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Guides the creation of agile user stories and Gherkin feature files. Use when the user wants to create a user story, write acceptance criteria, define Gherkin scenarios, or author BDD feature files. This should trigger for requests such as Create a user story; Write a user story; I need to write a user story. Part of cursor-rules-java project
Guía técnica completa para integrar 250+ servicios externos con agentes IA usando Composio. Cubre instalación, autenticación OAuth, gestión de herramientas, triggers y flujos multi-servicio.
Facilitates conversational discovery to create Architectural Decision Records (ADRs) for non-functional requirements using the ISO/IEC 25010:2023 quality model. Use when the user wants to document quality attributes, NFR decisions, security/performance/scalability architecture, or design systems with measurable quality criteria. This should trigger for requests such as Create ADR for Non-functional requirements; Document Non-functional requirements; Capture Non-functional requirements; Generate Non-functional requirements in an ADR. Part of cursor-rules-java project
基于 SOC 职业分类
正在显示 SKILL.md
| name | spec-fido2 |
| description | FIDO2/WebAuthn/パスキー関連の実装・設定・ドキュメント・テストを扱う時に使用。パスキー登録、認証、管理、アテステーション検証に関する作業で自動的に呼び出される。 |
| argument-hint | ["作業内容の説明"] |
idp-serverにおけるFIDO2/WebAuthn/パスキー実装のコンテキスト情報。
クライアント (sample-web)
│
├── navigator.credentials.create() / get()
│
▼
idp-server (認可フロー内)
│
├── WebAuthn4jRegistrationManager (登録)
├── WebAuthn4jAuthenticationManager (認証)
│
▼
WebAuthn4j ライブラリ (内部統合)
重要: 外部FIDO2サーバーではなく、WebAuthn4jライブラリを内部統合。
| ファイル | 役割 |
|---|---|
libs/idp-server-webauthn4j-adapter/.../WebAuthn4jRegistrationManager.java | 登録処理・アテステーション検証 |
libs/idp-server-webauthn4j-adapter/.../WebAuthn4jAuthenticationManager.java | 認証処理・署名検証 |
libs/idp-server-webauthn4j-adapter/.../WebAuthn4jConfiguration.java | 設定パース |
libs/idp-server-webauthn4j-adapter/.../WebAuthn4jManagerFactory.java | Manager生成 |
| ファイル | 内容 |
|---|---|
documentation/.../fido2/01-registration.md | パスキー登録設定 |
documentation/.../fido2/02-authentication.md | パスキー認証設定 |
documentation/.../fido2/03-management.md | パスキー管理API |
documentation/.../fido2/04-attestation-verification.md | アテステーション検証 |
| prompt値 | 動作 |
|---|---|
create | ユーザー登録画面をトリガー |
login | 既存セッションがあっても再認証を強制 |
none | ユーザー操作なし。セッション有効+同意済みならcode発行、それ以外はエラー |
prompt=create でユーザー登録 → パスワード認証 → WebAuthn Registration Challenge → Passkey登録prompt=login で再認証 → WebAuthn認証(ブラウザのPasskeyダイアログ)CLI環境ではWebAuthnのブラウザインタラクションが必要なため、パスワードフォールバックでのテストに限定される。
| ファイル | 内容 |
|---|---|
e2e/src/tests/usecase/mfa/mfa-05-fido2.test.js | FIDO2基本フロー |
e2e/src/tests/usecase/mfa/mfa-06-fido2-attestation-verification.test.js | アテステーション検証 |
e2e/src/lib/fido/fido2.js | テスト用FIDO2ヘルパー |
| ファイル | 内容 |
|---|---|
sample-web/src/components/PasskeyRegistration.tsx | 登録UI |
sample-web/src/components/PasskeyAuthentication.tsx | 認証UI |
sample-web/src/components/UserInfo.tsx | デバイス一覧表示 |
| interaction | function | 用途 |
|---|---|---|
fido2-registration-challenge | webauthn4j_registration_challenge | 登録チャレンジ発行 |
fido2-registration | webauthn4j_registration | 登録完了・検証 |
fido2-authentication-challenge | webauthn4j_authentication_challenge | 認証チャレンジ発行 |
fido2-authentication | webauthn4j_authentication | 認証完了・検証 |
{
"rp_id": "example.com",
"origin": "https://example.com",
"rp_name": "My Service",
"require_resident_key": true,
"user_verification_required": true
}
| モード | 設定 | 用途 |
|---|---|---|
| なし | attestation_preference: "none" | 開発・一般向け |
| TrustStore | trust_store_path: "/path/to/truststore.p12" | 特定ベンダー限定 |
| FIDO MDS | mds.enabled: true | 本番・高セキュリティ |
{
"rp_id": "example.com",
"allowed_origins": [
"https://app.example.com",
"https://www.example.com"
]
}
FIDO2をブラウザUIで動かす際の必須確認事項:
| # | 確認観点 | 設定箇所 | よくあるミス |
|---|---|---|---|
| 1 | signin_page = /signin/fido2/ | テナント ui_config | /signin/ のままだとFIDO2 UI画面が表示されない |
| 2 | base_url = 認証UIのオリジン | テナント ui_config | APIサーバーURLを設定してしまう(例: api.local.test → 正しくは auth.local.test) |
| 3 | cors_config に全フィールド設定 | テナント cors_config | allow_origins だけ設定して allow_headers, allow_methods, allow_credentials が抜ける |
| 4 | rp_id = 認証UIオリジンの登録可能ドメイン | FIDO2認証設定 | auth.local.test に対して auth.local.test を設定(正しくは local.test) |
| 5 | allowed_origins = ui_config.base_url と一致 | FIDO2認証設定 | 不一致で BadOriginException が発生 |
| 6 | email認証設定が存在する | authentication-config | 未作成で Authentication Configuration Not Found (email) |
| 7 | step_definitions でemail→fido2の順序定義 | 認証ポリシー | 未設定だとFIDO2ブラウザUIでユーザー識別ができない |
| 8 | device_registration_conditions にMFA条件 | 認証ポリシー | 未設定だとMFAなしでデバイス登録可能(脆弱性) |
認証UI URL: https://auth.local.test
^^^^^^^^^^^^^^
rp_id: local.test ← 登録可能ドメイン(eTLD+1)
allowed_origins: https://auth.local.test ← ブラウザページのオリジン(ui_config.base_url と一致)
rp_id はオリジンの登録可能ドメイン(effective top-level domain + 1)allowed_origins はブラウザの collectedClientData.origin と照合されるBadOriginException をスローするFIDO2ブラウザ利用時は email でユーザー識別(Step 1)→ FIDO2 で認証(Step 2)の2段構成が必要:
"step_definitions": [
{ "method": "email", "order": 1, "requires_user": false, "allow_registration": true, "user_identity_source": "email" },
{ "method": "fido2", "order": 2, "requires_user": true, "allow_registration": false, "user_identity_source": "sub" }
]
認証デバイス登録にはMFAが必要(脆弱性対策)。email認証成功を条件にする:
"device_registration_conditions": {
"any_of": [
[{ "path": "$.email-authentication.success_count", "type": "integer", "operation": "gte", "value": 1 }]
]
}
{
"success_conditions": {
"any_of": [
[{ "path": "$.password-authentication.success_count", "operation": "gte", "value": 1 }],
[{ "path": "$.fido2-authentication.success_count", "operation": "gte", "value": 1 }]
]
}
}
パスキー一覧は ID Token / Userinfo の authentication_devices クレーム から取得。
custom_claims_scope_mapping: truescope: "openid claims:authentication_devices"scope=openid+claims:authentication_devicesWebAuthn4j*Manager.java に処理追加WebAuthn4jConfiguration.java に設定追加04-attestation-verification.md で設定例確認WebAuthn4jConfiguration.java でパース確認| Executor | 役割 |
|---|---|
WebAuthn4jRegistrationChallengeExecutor | 登録チャレンジ生成 |
WebAuthn4jRegistrationExecutor | 登録(Attestation 検証) |
WebAuthn4jAuthenticationChallengeExecutor | 認証チャレンジ生成 |
WebAuthn4jAuthenticationExecutor | 認証(Assertion 検証) |
WebAuthn4jDeregistrationExecutor | 登録解除 |
全て AuthenticationExecutor インターフェースを実装。
| パラメータ | 説明 |
|---|---|
rpId | Relying Party ID |
rpName | Relying Party 名 |
allowedOrigins | 許可オリジン(origin は deprecated) |
attestationPreference | Attestation モード |
authenticatorAttachment | Authenticator タイプ |
residentKey | Resident Key 要件 |
userVerificationRequired | User Verification 要件 |
pubKeyCredAlgorithms | 公開鍵アルゴリズム |
timeout | リクエストタイムアウト |
trustStorePath/Password/Type | Attestation Trust Store |
mds | FIDO Metadata Service 設定 |
$ARGUMENTS