返回技能目录
静态审阅软件开发

技能研究档案

implementing-hardware-security-key-authentication

来源声明

Builds a FIDO2/WebAuthn relying party server with the python-fido2 library, covering registration and authentication ceremonies, YubiKey enrollment, resident key (discoverable credential/passkey) workflows, and user verification policies. Use when implementing phishing-resistant MFA with hardware security keys, building a WebAuthn relying party, enrolling YubiKeys for a workforce, or migrating password-based authentication to passkeys.

保留作者的英文原始描述。它表达设计意图,不代表已验证的实际效果。

Builds a FIDO2/WebAuthn relying party server with the python-fido2 library, covering registration and authentication ceremonies, YubiKey enrollment, resident key (discoverable credential/passkey) workflows, and user verification policies. Use when implementing phishing-resistant MFA with hardware security keys, building a WebAuthn relying party, enrolling YubiKeys for a workforce, or migrating password-based authentication to passkeys.

developmentreferencesscripts

研究摘要

机器生成分析,等待人工复核

以下观察来自确定性源码解析,不代表人工安全审查或受控任务评估。

来源描述:Builds a FIDO2/WebAuthn relying party server with the python-fido2 library, covering registration and authentication ceremonies, YubiKey enrollment, resident key (discoverable credential/passkey) workflows, and user verification policies. Use when implementing phishing-resistant MFA with hardware security keys, building a WebAuthn relying party, enrolling YubiKeys for a workforce, or migrating password-based authentication to passkeys. 此双语摘要由所收集的源文本和文件结构确定性地生成,等待人工编辑复核。

审阅范围

对所收集的 SKILL.md 及辅助文本/代码进行确定性静态分析。机器辅助候选和发现等待人工编辑复核;不评估动态行为或效果。

可观察能力

  • Workflow[来源陈述;暂定,未测试。证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L64]
  • Step 1: Relying Party Server Configuration[来源陈述;暂定,未测试。证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L66]
  • Step 2: Registration Ceremony (Credential Creation)[来源陈述;暂定,未测试。证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L80]
  • Step 3: Authentication Ceremony (Assertion)[来源陈述;暂定,未测试。证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L95]
  • Step 4: YubiKey Enrollment and Management[来源陈述;暂定,未测试。证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L105]
  • Step 5: Passkey Migration Strategy[来源陈述;暂定,未测试。证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L115]

限制与范围

  • 静态分析无法评估运行时行为、命令是否成功、网络可达性或模型输出质量。
  • 未执行任何命令、脚本、网络请求、模型调用或受控技能测试。
  • 类别、标签、能力、工作流程和双语编辑摘要均为待人工复核的确定性候选,并非已验证结果。
  • 在后续管线实际执行并记录官方模型专用计数之前,无法提供精确 token 数。

适用读者

  • 评估是否检查并安装该来源技能的实践者;此受众由产品语境推断,并非测量得到的使用情况。[证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L1-L43]

技能包含哪些内容

文件清单来自记录提交中的采集源码。路径与大小属于结构观察,不代表质量评价。

个文件
4
Markdown 文件
2
个脚本
1
个引用
1
大小
72.7 KB
结构复杂度
低

文件清单

路径类型字节
skills/implementing-hardware-security-key-authentication/LICENSE其他11 KB
skills/implementing-hardware-security-key-authentication/references/api-reference.md引用6.3 KB
skills/implementing-hardware-security-key-authentication/scripts/agent.py脚本37.9 KB
skills/implementing-hardware-security-key-authentication/SKILL.md指令17.5 KB

SKILL.md 前置元数据

{
  "name": "implementing-hardware-security-key-authentication",
  "description": "Builds a FIDO2/WebAuthn relying party server with the python-fido2 library, covering registration and authentication ceremonies, YubiKey enrollment, resident key (discoverable credential/passkey) workflows, and user verification policies. Use when implementing phishing-resistant MFA with hardware security keys, building a WebAuthn relying party, enrolling YubiKeys for a workforce, or migrating password-based authentication to passkeys.\n",
  "domain": "cybersecurity",
  "subdomain": "identity-and-access-management",
  "tags": [
    "FIDO2",
    "WebAuthn",
    "hardware-security-key",
    "YubiKey",
    "passkeys",
    "passwordless-authentication",
    "CTAP2"
  ],
  "version": "1.0.0",
  "author": "mukul975",
  "license": "Apache-2.0",
  "atlas_techniques": [
    "AML.T0051",
    "AML.T0054",
    "AML.T0056"
  ],
  "nist_ai_rmf": [
    "MEASURE-2.7",
    "MEASURE-2.5",
    "GOVERN-6.1",
    "MAP-5.1"
  ],
  "nist_csf": [
    "PR.AA-01",
    "PR.AA-02",
    "PR.AA-05"
  ],
  "mitre_attack": [
    "T1078",
    "T1190",
    "T1059",
    "T1003",
    "T1110"
  ]
}

对运行顺序的一种解读

此工作流根据源码材料重建表面顺序。除非明确记录受控评估,否则它属于暂定解读,而非真实运行轨迹。

  1. 01
    判断

    When to Use

    来源描述的决策候选,位于“When to Use”;未经执行验证。

  2. 02
    操作

    Workflow

    来源描述的步骤候选,位于“Workflow”;未经执行验证。

  3. 03
    操作

    Step 1: Relying Party Server Configuration

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  4. 04
    输出

    Define RP identity: Create a `PublicKeyCredentialRpEntity` with the relying party name (display name shown to users) and RP ID (the effective domain of the application). The RP ID must be a registrable domain suffix of the origin -- for example, `example.com` is valid for `https://auth.example.com` but `other.com` is not.

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  5. 05
    操作

    Initialize Fido2Server: Instantiate the `Fido2Server` class from the python-fido2 library with the RP entity. The server handles challenge generation, attestation verification, and assertion validation.

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  6. 06
    判断

    Configure attestation preference: Set the attestation conveyance preference to control whether the server requests proof of the authenticator's identity:

    来源描述的决策候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

查看全部工作流候选节点 (64 个候选步骤)
  1. 07
    操作

    `none`: No attestation requested (simplest, recommended for most deployments)

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  2. 08
    输入

    `indirect`: Attestation may be provided but CA may anonymize it

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  3. 09
    操作

    `direct`: Full attestation chain from the authenticator's manufacturer

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  4. 10
    操作

    `enterprise`: Device-identifying attestation for managed environments

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  5. 11
    操作

    Session management: Configure server-side sessions to store WebAuthn state between the begin and complete phases of registration/authentication ceremonies. Use secure, httponly cookies with SameSite=Strict.

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  6. 12
    操作

    Credential storage: Design the database schema to store credential records: `credentialid` (binary), `publickey` (COSE key), `signcount` (uint32 for clone detection), `userid`, `createdat`, `lastused`, `displayname`, and `transports` (USB, NFC, BLE, internal).

    来源描述的步骤候选,位于“Step 1: Relying Party Server Configuration”;未经执行验证。

  7. 13
    操作

    Step 2: Registration Ceremony (Credential Creation)

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  8. 14
    输出

    Begin registration: Call `server.registerbegin()` with the user entity (`PublicKeyCredentialUserEntity` containing user ID, username, and display name), the list of existing credentials for the user (to prevent duplicate registration), and options for `userverification` and `authenticatorattachment`.

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  9. 15
    操作

    Authenticator selection criteria:

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  10. 16
    操作

    `authenticatorattachment: cross-platform` restricts to roaming authenticators (USB/NFC keys)

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  11. 17
    操作

    `authenticatorattachment: platform` restricts to built-in authenticators (Touch ID, Windows Hello)

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  12. 18
    操作

    Omitting this field allows both types

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  13. 19
    操作

    `residentkey: required` forces creation of a discoverable credential (passkey) stored on the authenticator

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  14. 20
    操作

    `userverification: required` enforces PIN or biometric verification on the authenticator

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  15. 21
    操作

    Client-side ceremony: The browser calls `navigator.credentials.create()` with the options from the server. The authenticator generates a new key pair, stores the private key in its secure element, and returns the public key, credential ID, attestation object, and client data JSON.

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  16. 22
    操作

    Complete registration: Call `server.registercomplete()` with the saved state and the client response. The server verifies the attestation signature, extracts the credential public key and ID, and returns `AuthenticatorData` containing the credential data to store.

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  17. 23
    操作

    Store credential: Persist the `credentialdata` (contains `credentialid`, `publickey` as COSE key, and `signcount`) to the database associated with the user account.

    来源描述的步骤候选,位于“Step 2: Registration Ceremony (Credential Creation)”;未经执行验证。

  18. 24
    操作

    Step 3: Authentication Ceremony (Assertion)

    来源描述的步骤候选,位于“Step 3: Authentication Ceremony (Assertion)”;未经执行验证。

  19. 25
    操作

    Begin authentication: Call `server.authenticatebegin()` with the list of registered credentials for the user (or omit for discoverable credential flows where the authenticator identifies the user). Set `userverification` based on the assurance level required.

    来源描述的步骤候选,位于“Step 3: Authentication Ceremony (Assertion)”;未经执行验证。

  20. 26
    判断

    Client-side assertion: The browser calls `navigator.credentials.get()` with the server options. The authenticator locates the matching credential, performs user verification if required, increments the signature counter, and signs the challenge with the private key.

    来源描述的决策候选,位于“Step 3: Authentication Ceremony (Assertion)”;未经执行验证。

  21. 27
    操作

    Complete authentication: Call `server.authenticatecomplete()` with the saved state, registered credentials, and the client response. The server verifies the assertion signature against the stored public key and validates the signature counter has incremented (clone detection).

    来源描述的步骤候选,位于“Step 3: Authentication Ceremony (Assertion)”;未经执行验证。

  22. 28
    判断

    Update sign count: After successful authentication, update the stored `signcount` for the credential. If the new sign count is not greater than the stored value, the key may have been cloned -- flag this as a security event.

    来源描述的决策候选,位于“Step 3: Authentication Ceremony (Assertion)”;未经执行验证。

  23. 29
    操作

    Discoverable credential flow: For passwordless authentication, the user does not need to enter a username first. The authenticator presents all discoverable credentials for the RP ID, and the selected credential's `userHandle` identifies the user.

    来源描述的步骤候选,位于“Step 3: Authentication Ceremony (Assertion)”;未经执行验证。

  24. 30
    操作

    Step 4: YubiKey Enrollment and Management

    来源描述的步骤候选,位于“Step 4: YubiKey Enrollment and Management”;未经执行验证。

  25. 31
    操作

    PIN initialization: Before first use, a YubiKey requires a FIDO2 PIN (minimum 4 characters, 8 retries before lockout). Guide users through PIN setup using the Yubico Authenticator application or programmatically via the CTAP2 `clientPin` command.

    来源描述的步骤候选,位于“Step 4: YubiKey Enrollment and Management”;未经执行验证。

  26. 32
    操作

    Primary key enrollment: Register the user's primary YubiKey with their account. Store the credential with a user-friendly label (e.g., "USB-A YubiKey - Office") and the authenticator's AAGUID for device identification.

    来源描述的步骤候选,位于“Step 4: YubiKey Enrollment and Management”;未经执行验证。

  27. 33
    操作

    Backup key enrollment: Require users to register at least two security keys. The backup key should be stored separately (home, safety deposit box). Both keys must be registered to the same account so either can authenticate.

    来源描述的步骤候选,位于“Step 4: YubiKey Enrollment and Management”;未经执行验证。

  28. 34
    操作

    Key attestation verification: For enterprise deployments, verify the attestation certificate chain to confirm the key is a genuine YubiKey from Yubico. Compare the AAGUID against Yubico's published values to identify the exact model.

    来源描述的步骤候选,位于“Step 4: YubiKey Enrollment and Management”;未经执行验证。

  29. 35
    操作

    Key lifecycle management: Implement administrative functions to list a user's registered keys, revoke compromised keys, force re-enrollment, and audit key usage patterns (last authentication time, total authentications).

    来源描述的步骤候选,位于“Step 4: YubiKey Enrollment and Management”;未经执行验证。

  30. 36
    操作

    Step 5: Passkey Migration Strategy

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  31. 37
    操作

    Phased rollout: Begin with voluntary passkey enrollment alongside existing password authentication. Track adoption metrics (percentage of users with passkeys, percentage of logins using passkeys vs. passwords).

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  32. 38
    输出

    Credential upgrade flow: When a user authenticates with a password, prompt them to register a passkey. Present the WebAuthn registration dialog immediately after successful password login to minimize friction.

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  33. 39
    输入

    Cross-device passkeys: Support synced passkeys (passkeys stored in platform credential managers like iCloud Keychain, Google Password Manager, or 1Password) for users who do not have hardware security keys. These provide phishing resistance without requiring dedicated hardware.

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  34. 40
    操作

    Account recovery: Design recovery flows for users who lose all their security keys:

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  35. 41
    操作

    Recovery codes generated at enrollment time (printed, stored in password manager)

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  36. 42
    操作

    Supervised re-enrollment by an administrator after identity verification

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  37. 43
    操作

    Temporary time-limited password login with mandatory key re-enrollment

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  38. 44
    操作

    Never allow recovery via email or SMS alone, as these defeat the phishing resistance

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  39. 45
    操作

    Password deprecation timeline: After passkey adoption exceeds the target threshold, enforce passkey-only authentication for high-privilege accounts first, then expand to all accounts. Maintain password as a fallback during the transition window.

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  40. 46
    操作

    Monitoring and metrics: Track registration success rates, authentication failure rates (wrong key, timeout, cancelled), mean time to authenticate, and the ratio of passkey to password logins.

    来源描述的步骤候选,位于“Step 5: Passkey Migration Strategy”;未经执行验证。

  41. 47
    操作

    Key Concepts

    来源描述的步骤候选,位于“Key Concepts”;未经执行验证。

  42. 48
    操作

    Tools & Systems

    来源描述的步骤候选,位于“Tools & Systems”;未经执行验证。

  43. 49
    操作

    Common Scenarios

    来源描述的步骤候选,位于“Common Scenarios”;未经执行验证。

  44. 50
    操作

    Provision YubiKey 5 NFC keys (2 per developer: primary + backup) and distribute in tamper-evident packaging with initial PIN setup instructions

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  45. 51
    操作

    Deploy the WebAuthn relying party server integrated with the company's SSO (OAuth 2.0 / OpenID Connect) provider, configured with `authenticatorattachment: cross-platform` and `userverification: required`

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  46. 52
    操作

    Run enrollment sessions where each developer registers both keys to their account, with attestation verification confirming genuine YubiKey 5 NFC AAGUIDs

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  47. 53
    操作

    Configure the SSO provider to require FIDO2 as the second factor for all developer accounts, with a 30-day grace period where TOTP remains available

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  48. 54
    输出

    Implement a self-service portal for key management: view registered keys, register replacement keys, and report lost/stolen keys (which triggers immediate credential revocation and re-enrollment)

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  49. 55
    输入

    After the grace period, disable TOTP for developer accounts. Monitor authentication logs for any fallback attempts and provide 1:1 support for remaining holdouts

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  50. 56
    操作

    Achieve 100% FIDO2 adoption for the development team, reducing phishing risk to near-zero for production infrastructure access

    来源描述的步骤候选,位于“Scenario: Deploying FIDO2 MFA for a Development Team”;未经执行验证。

  51. 57
    操作

    Implement WebAuthn with `residentkey: required` to create discoverable credentials that enable username-less login

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  52. 58
    操作

    Support both platform authenticators (Touch ID, Windows Hello, Android biometrics) and roaming authenticators (security keys) by omitting `authenticatorattachment`

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  53. 59
    输出

    Add a "Sign in with a passkey" button to the login page that triggers `navigator.credentials.get()` with an empty `allowCredentials` list, prompting the authenticator to present available passkeys

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  54. 60
    操作

    After successful passkey creation, prompt users to create a passkey on a second device for redundancy

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  55. 61
    操作

    Maintain password login as a fallback during the rollout period, with a persistent prompt encouraging passkey setup after each password login

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  56. 62
    操作

    Track metrics: passkey registration rate (target 30% in first quarter), passkey vs. password login ratio, authentication failure rates, and account takeover incidents

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  57. 63
    操作

    After 6 months, offer incentives (extended session duration, reduced CAPTCHA) for users who switch to passkey-only authentication

    来源描述的步骤候选,位于“Scenario: Implementing Passwordless Login for a Customer-Facing Application”;未经执行验证。

  58. 64
    输出

    Output Format

    来源描述的步骤候选,位于“Output Format”;未经执行验证。

潜在风险面

静态发现用于提示安装前需要检查的位置,不能证明一项技能安全、恶意或有效。

有需要复核的项目

收集的文本中有 47 项确定性词法发现需要复核。发现可能仅位于文档中,不证明已执行或可被利用;仅含二进制的文件未扫描。

网络访问已观察到
文件写入已观察到
凭据使用未观察到
中

文本提及网络访问

7 次命中

此源文件行包含 URL 或网络客户端。应检查目标地址、发送的数据和信任边界;静态文本无法证明实际发生了网络活动。 该规则在收集文本中命中 7 处;此处列出 3 个代表位置。命中文本可能只是文档,分析器没有执行它。

提示

文本描述或实现了文件修改

40 次命中

此行包含可能的文件写入或重定向操作。应检查目标路径和覆盖行为;静态审查没有写入任何文件。 该规则在收集文本中命中 40 处;此处列出 3 个代表位置。命中文本可能只是文档,分析器没有执行它。

上下文可能消耗在哪里

发现、激活与资源层具有不同含义。只有使用指定官方方法并记录模型的运行时,才显示精确数值。

精确 token 计数不可用

在管线使用明确模型执行官方精确计数之前,包括文件清单在内的所有 token 值均为 null。

未使用要求的官方方法记录 token 测量。本档案不会用字符数、文件大小或估计值替代。

受控评估

没有受控评估

该技能仅具备以上标明的证据。不声称任何任务成功率、token 效率、延迟或质量优势。

尚未测试

在源码可见的情况下使用

安装命令
Inspect the pinned source at https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/54a798831d2266a3ca61ce68a7acb80b81160d57/skills/implementing-hardware-security-key-authentication/SKILL.md and follow the source repository's installation instructions. No installation was performed or verified by this static analyzer. Source license: Apache-2.0.

前置条件

  • 静态分析无法评估运行时行为、命令是否成功、网络可达性或模型输出质量。
  • 未执行任何命令、脚本、网络请求、模型调用或受控技能测试。
  • 类别、标签、能力、工作流程和双语编辑摘要均为待人工复核的确定性候选,并非已验证结果。
  • 在后续管线实际执行并记录官方模型专用计数之前,无法提供精确 token 数。

示例提示词

未提供

附上限制条件的判断

优势

  • 快照包含 4 个收集文件、2 个 Markdown 文件和 1 个脚本文件,可进行源代码级检查。[证据:skills/implementing-hardware-security-key-authentication/SKILL.md:L1]

注意事项

  • 尚未确立功能、安全或模型质量结果。安装或发布前,人工复核必须检查源代码上下文和所有引用发现。
研究结论

仅为暂定的确定性静态清单;等待人工编辑复核以及独立的受控评估。不构成安装建议、安全保证或有效性声明。

从结构上保持可追溯

档案是对公开工件的限时阅读,而非背书。请通过来源链接检查确切的上游材料。

mukul975Anthropic-Cybersecurity-Skillsskills/implementing-hardware-security-key-authentication
来源类型
社区
提交
54a798831d2266a3ca61ce68a7acb80b81160d57
采集时间
2026年11月20日
最近核查
2026年11月20日
上游许可证
Apache-2.0
仓库星标
36,446
内容依据

仅对提供的文件进行确定性词法解析、YAML frontmatter 校验、文件清单、来源描述的工作流程提取和启发式暂定分类。由机器生成;无 LLM、执行、动态测试或人工编辑批准。