मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #8051

implementing-hardware-security-key-authentication

यह क्या करती है

यह टूल फिजिकल सिक्योरिटी की (जैसे YubiKey) या आपके डिवाइस के फीचर (जैसे फिंगरप्रिंट) का इस्तेमाल करके एक सुरक्षित लॉगिन सिस्टम बनाने में मदद करता है। यह पासवर्ड की जगह लेता है या उसके साथ अतिरिक्त सुरक्षा जोड़ता है, जिससे हैकर्स के लिए अकाउंट में घुसना मुश्किल हो जाता है।

कब इस्तेमाल करें

  • ✓जब आप किसी ज़रूरी अकाउंट को अतिरिक्त सिक्योरिटी तरीके से बचाना चाहते हैं।
  • ✓जब आप कोई वेबसाइट या ऐप बना रहे हैं जिसे सुरक्षित लॉगिन चाहिए।
  • ✓ताकि लोग सिर्फ सिक्योरिटी की से, बिना पासवर्ड के, लॉग इन कर सकें।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-hardware-security-key-authentication/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-hardware-security-key-authentication/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरी वेबसाइट के लिए सिक्योरिटी की का इस्तेमाल करके सुरक्षित लॉगिन सेट करो।”

हर हफ़्ते 5 नई skills, 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, and cryptography libraries 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 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.
  • 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.
  • 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 it
    • direct: Full attestation chain from the authenticator's manufacturer
    • enterprise: 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, and transports (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 (PublicKeyCredentialUserEntity containing user ID, username, and display name), the list of existing credentials for the user (to prevent duplicate registration), and options for user_verification and authenticator_attachment.
  • Authenticator selection criteria:
    • authenticator_attachment: cross-platform restricts to roaming authenticators (USB/NFC keys)
    • authenticator_attachment: platform restricts to built-in authenticators (Touch ID, Windows Hello)
    • Omitting this field allows both types
    • resident_key: required forces creation of a discoverable credential (passkey) stored on the authenticator
    • user_verification: required enforces 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।

'phishing-resistant' का क्या मतलब है?

इसका मतलब है कि यह सिस्टम फेक ईमेल या फेक वेबसाइट से धोखा खाना बहुत मुश्किल बना देता है, क्योंकि यह एक फिजिकल डिवाइस या बायोमेट्रिक पर निर्भर करता है, जो हैकर के पास नहीं होता।

क्या इसे हर वेबसाइट पर इस्तेमाल कर सकते हैं?

यह उन वेबसाइट और ऐप के लिए सबसे अच्छा है जिन्हें आप बना रहे हैं या मैनेज कर रहे हैं। जिन वेबसाइट को आप सिर्फ इस्तेमाल करते हैं, उनमें अगर यह विकल्प मिलता है, तो आप उसे चालू कर सकते हैं।

जानकारी

लेखक का मूल विवरण

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

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8051
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills