implementing-hardware-security-key-authentication
하는 일
이 도구는 실제 보안 키(예: YubiKey)나 기기의 기능(예: 지문)을 사용해 안전한 로그인 시스템을 만들도록 돕습니다. 비밀번호를 대체하거나 보완하여 해커가 접근하기 어렵게 만듭니다.
사용하는 경우
- ✓중요한 계정을 추가 보안 방식으로 보호하고 싶을 때.
- ✓더 안전한 로그인이 필요한 웹사이트나 앱을 만들 때.
- ✓보안 키만으로 비밀번호 없이 로그인할 수 있도록 하려는 경우.
스킬 링크
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-hardware-security-key-authentication/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“보안 키를 사용해 제 웹사이트에 안전한 로그인을 설정해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 도구는 보안 키와 통신하도록 서버를 설정합니다. 새 키의 등록과 로그인 시의 검증을 관리해, 키의 소유자만 접근할 수 있도록 합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Implementing Hardware Security Key Authentication
When to Use
- Deploying phishing-resistant multi-factor authentication (MFA) using FIDO2 hardware security keys for high-value accounts (administrators, developers, privileged users)
- Building a WebAuthn relying party server that supports both roaming authenticators (USB/NFC security keys) and platform authenticators (Windows Hello, Touch ID, Android biometrics)
- Migrating an existing password-based authentication system to support passkeys (discoverable credentials) as a primary or secondary authentication factor
- Enrolling YubiKey devices for an organization's workforce, including PIN setup, credential registration, and backup key provisioning
- Implementing passwordless authentication flows that comply with NIST SP 800-63B AAL3 (authenticator assurance level 3) requirements
Do not use without HTTPS in production (WebAuthn requires a secure origin), for systems where users cannot physically access a USB/NFC port, or as the sole authentication factor without a recovery mechanism for lost keys.
Prerequisites
- Python 3.10+ with
fido2(python-fido2 >= 2.0.0),flask, andcryptographylibraries installed - HTTPS-enabled web server (WebAuthn API requires secure context; localhost is exempt for development)
- FIDO2-compatible hardware security key (YubiKey 5 Series, SoloKeys, Titan Security Key) or platform authenticator
- Modern web browser supporting the WebAuthn API (Chrome 67+, Firefox 60+, Safari 14+, Edge 79+)
- Understanding of public key cryptography, challenge-response protocols, and HTTP session management
Workflow
Step 1: Relying Party Server Configuration
Configure the WebAuthn relying party (RP) identity and server:
- Define RP identity: Create a
PublicKeyCredentialRpEntitywith 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.comis valid forhttps://auth.example.combutother.comis not. - Initialize Fido2Server: Instantiate the
Fido2Serverclass from the python-fido2 library with the RP entity. The server handles challenge generation, attestation verification, and assertion validation. - Configure attestation preference: Set the attestation conveyance preference to control whether the server requests proof of the authenticator's identity:
none: No attestation requested (simplest, recommended for most deployments)indirect: Attestation may be provided but CA may anonymize itdirect: Full attestation chain from the authenticator's manufacturerenterprise: Device-identifying attestation for managed environments
- 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.
- Credential storage: Design the database schema to store credential records:
credential_id(binary),public_key(COSE key),sign_count(uint32 for clone detection),user_id,created_at,last_used,display_name, andtransports(USB, NFC, BLE, internal).
Step 2: Registration Ceremony (Credential Creation)
Implement the WebAuthn registration flow to create new credentials:
- Begin registration: Call
server.register_begin()with the user entity (PublicKeyCredentialUserEntitycontaining user ID, username, and display name), the list of existing credentials for the user (to prevent duplicate registration), and options foruser_verificationandauthenticator_attachment. - Authenticator selection criteria:
authenticator_attachment: cross-platformrestricts to roaming authenticators (USB/NFC keys)authenticator_attachment: platformrestricts to built-in authenticators (Touch ID, Windows Hello)- Omitting this field allows both types
resident_key: requiredforces creation of a discoverable credential (passkey) stored on the authenticatoruser_verification: requiredenforces PIN or biometric verification on the authenticator
- 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.
…
자주 묻는 질문
실제 보안 키가 꼭 필요한가요?
꼭 그렇지는 않습니다. YubiKey 같은 실제 키를 사용하거나, Windows Hello나 Touch ID 같은 컴퓨터나 휴대폰의 기능을 사용할 수 있습니다.
‘피싱 저항성’이란 무엇을 의미하나요?
해커가 가지고 있지 않은 실제 기기나 생체 인식에 의존하므로, 가짜 이메일이나 웹사이트로 속이기가 훨씬 어렵다는 뜻입니다.
어떤 웹사이트에서나 사용할 수 있나요?
직접 만들거나 관리하는 웹사이트와 앱에 가장 적합합니다. 단순히 이용하는 웹사이트는 해당 웹사이트가 이 옵션을 제공하면 켤 수 있습니다.
상세 정보
작성자의 원본 설명
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 pas
인기도
- GitHub 스타
- 35k
- 순위
- #8051
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.