The user wants a rollout plan for WebAuthn/passkeys.
The plan needs to cover:
- Ceremony flows (Registration and Authentication).
- Recovery mechanisms (what happens when a device is lost).
- Phishing-resistant defaults (ensuring the implementation is secure).
Target Audience: Likely developers, product managers, or security architects looking to implement passkeys. The tone should be professional, technical but accessible, and structured.
Key Concepts to Include:
- WebAuthn/Passkeys: The core standard.
- Ceremonies: Registration (attestation) and Authentication (assertion).
- Phishing Resistance: Origin binding, user verification.
- Recovery: Backup codes, multiple devices, sync providers (iCloud/Google Password Manager).
- UX: Critical for adoption.
Structure of the Draft:
- Executive Summary: Brief overview of the goal (passwordless, high security).
- Phase 1: Architecture & Decisions (The "Defaults"):
- Choose the right options (Discoverable Credentials vs. Server-side credentials).
- Phishing resistance mechanisms (RP ID, user verification).
- Phase 2: The Ceremony Flows (The "How-To"):
- Registration (Attestation): Step-by-step flow.
- Authentication (Assertion): Step-by-step flow.
- Re-authentication/Second Factor: How it fits.
- Phase 3: User Experience (UX) & Adoption:
- Handling "Attestation" choices (Direct vs. None).
- Friendly UI prompts.
- Phase 4: Recovery & Edge Cases:
- What if I lose my phone?
- Cross-device syncing (The "Passkey" advantage).
- Fallback methods (Don't create a bypass that kills security).
- Implementation Checklist/Technical Details:
- Libraries, Relying Party ID handling.
Drafting - Section by Section:
-
Phishing-Resistant Defaults:
- Constraint: Must be secure.
- Action: Enforce
userVerification: "required". This prevents "presence only" (tap and go) which might be susceptible to relay attacks if not careful, though strict origin binding handles most phishing. Actually, userVerification: preferred or required is the key for "Passkeys" because they need the biometric/PIN.
- Action: Origin checking. The browser/client does this, but the server must verify the
origin matches the expected RP ID.
-
Ceremony Flows:
- Registration:
- User opts in.
- Server sends challenge + user info.
- Client (browser/OS) prompts for biometric.
- Authenticator creates key pair.
- Public key + Attestation sent to server.
- Server verifies challenge, origin, attestation. Stores credential ID + public key.
- Authentication:
- User enters username (or uses "Sign in with Passkey" if conditional UI).
- Server sends challenge.
- Client prompts biometric.
- Authenticator signs challenge.
- Server verifies signature using stored public key.
-
Recovery (The hard part):
- Passkeys (Synced): This is the modern way. iCloud Keychain / Google Password Manager sync keys. If I lose my phone but have an iPad, I'm good.
- Hybrid Approach: Allow multiple passkeys. "Add a hardware key" (YubiKey) as a backup.
- The "Nuclear" Option: Recovery codes (like 2FA). Must be generated and stored.
-
Refining the "Phishing-Resistant" aspect:
- Explain why it works. The private key never leaves the device. The signature is bound to the origin (domain). A fake site (evilginx2) can't sign for the real domain.
-
Reviewing the "Passkey" specific nuance:
- Passkeys = Discoverable Credentials (Resident Keys).
- Why? So you don't need to type a username first (sometimes).
- Must enable
residentKey: preferred or required.
Self-Correction/Refinement during drafting:
- Initial thought: Just list the API calls.
- Correction: The prompt asks for a "rollout plan," which implies strategy, UX, and edge cases, not just code. I should structure it as a strategic rollout guide.
- Recovery: I need to be careful not to suggest SMS OTP as a recovery method, as that defeats the phishing resistance purpose (NIST guidelines). I will suggest recovery codes or backup passkeys.
Final Polish: Use bold headings, bullet points, and clear distinction between the User, Browser/Authenticator, and Server.
(Self-Correction on Phishing Resistance): Simply using WebAuthn is phishing resistant, unless you use it as a second factor (U2F) alongside a password. The password step is the weak link. To be truly phishing resistant, the flow should prioritize "Passwordless" or at least "Password replacement".
Let's structure the output into a "Strategic Rollout Guide".
- Philosophy: Phishing resistance by default.
- Architecture: The specific flags (
userVerification: required, residentKey: preferred).
- Flows: Registration and Auth.
- Recovery: The backup plan.
- UX: Conditional UI.
Okay, ready to generate.
This rollout plan outlines a strategy for implementing WebAuthn/Passkeys with a focus on high security, user experience, and resilience. This approach prioritizes Phishing-Resistance as the default state.
Phase 1: Architecture & Defaults (The "Phishing-Proof" Foundation)
Before writing code, strict configuration policies must be defined to ensure the "Phishing-Resistant" guarantee.
1. Relying Party (RP) Configuration
- Effective Domain: The RP ID must match your root domain (e.g.,
example.com), allowing the credential to work on login.example.com and app.example.com.
- HTTPS Only: WebAuthn is strictly bound to secure contexts.
2. Credential Policy (The "Passkey" Standard)
To ensure cross-device sync and phishing resistance, enforce these defaults during registration:
- Resident Credentials (Discoverable):
requireResidentKey: "preferred" (or "required" for strict implementation). This allows users to authenticate without typing a username first (Usernameless flows).
- User Verification:
userVerification: "required".
- Why? This forces the authenticator (Phone, TPM, YubiKey) to perform a biometric or PIN check locally. This is the core defense against remote attackers; a stolen password cannot bypass the need for physical presence or biometrics.
- Attestation:
attestation: "none" (for privacy/consumer apps) or "direct" (for high-assurance enterprise apps where you need to verify the specific key model used).
Phase 2: The Ceremony Flows
"Ceremonies" are the cryptographic dances between the Client, Authenticator, and Server.
Flow A: Registration (Adding a Passkey)
Goal: Bind a user's identity to a device-specific cryptographic pair.
- Server Challenge: The user creates an account. The server generates a random
challenge and sends user info (User ID, Username, Display Name) to the frontend.
- Client Creation: The frontend calls
navigator.credentials.create(). The browser/OS UI prompts the user to verify (FaceID, Fingerprint, Windows Hello).
- Key Generation: The authenticator generates a Public/Private key pair. The private key never leaves the device.
- Attestation: The device sends the
clientDataJSON (origin, challenge) and attestationObject (public key, metadata) back to the server.
- Server Verification (Crucial Steps):
- Verify the
challenge matches the one stored in the session.
- Verify the
origin matches your domain (prevents MITM).
- Verify
userVerification is present.
- Store the
credentialID and publicKey associated with the user.
Flow B: Authentication (Login)
Goal: Prove possession of the private key without transmitting secrets.
- Server Challenge: The server sends a new
challenge and the RP ID.
- Client Assertion: The frontend calls
navigator.credentials.get().
- Discoverable Flow: If configured for passkeys, the user simply scans their face/fingerprint. The authenticator selects the correct key based on the RP ID.
- Signature: The authenticator signs the
challenge + origin using the Private Key.
- Server Verification:
- Look up the user by
credentialID or userHandle.
- Use the stored Public Key to mathematically verify the Signature.
- Check the
origin and rpIdHash in the auth data.
Phase 3: Recovery & Account Integrity
If a user loses their device, they lose their Private Key. A robust recovery strategy is mandatory.
Strategy 1: The "Multi-Device" Default (Synced Passkeys)
- Mechanism: By default, register "Synced Passkeys" (Apple iCloud Keychain, Google Password Manager, 1Password).
- Benefit: If a user loses their iPhone, the Passkey syncs automatically to their iPad or Mac. No action required.
Strategy 2: The "Paper" Escape Hatch (Recovery Codes)
For users who do not use synced providers (e.g., using a hardware YubiKey on a single device):
- On Registration: Generate a high-entropy set of Recovery Codes (e.g., 8 alphanumeric strings).
- Storage: Hash these codes like passwords and store them. Display them once to the user to print or save in a secure vault.
- Usage: If all devices are lost, the user enters a Recovery Code. This code allows the creation of a new WebAuthn credential.
Strategy 3: Graceful Degradation (Fallback)
- Do NOT use SMS OTP as a primary backup (SIM swapping risks).
- Secondary Email Magic Link: Allow a "Login via Email" link as a fallback only if the user has no registered passkeys. This should trigger a high-alert notification to the user.
Phase 4: UX & Implementation Checklist
Conditional UI (Autofill)
Do not force users to click a "Sign in with Passkey" button immediately.
- Implement
navigator.credentials.get({ mediation: 'conditional' }).
- This allows the browser's password autofill dropdown to suggest the Passkey automatically when the user focuses the username field. This is the gold standard for UX.
User Experience (Do's and Don'ts)
- DO: Encourage users to add two passkeys immediately (e.g., "Add your phone AND a security key").
- DON'T: Force users to create a password before creating a passkey. Allow "Passwordless Signup."
- DO: Clearly label credentials. Let users name them "My iPhone 15" or "YubiKey on Keyring" so they know which one to remove later.
Phishing Resistance Check
To validate your rollout is truly phishing-resistant:
- Attempt to login on a clone site (different domain). It should fail because the
origin check fails.
- Attempt to login via a remote desktop session (RDP/TeamViewer). It should fail or require local physical interaction (FIDO2 User Presence check).
Summary of Rollout Stages
- Foundation: Setup RP ID, Database schema for Public Keys.
- Registration: Allow users to add a Passkey to an existing account.
- Login: Enable Passkey login (conditional UI).
- Passwordless: Allow new users to sign up without setting a password.
- Sunset: Deprecate passwords for users who have 2+ active Passkeys.