QA
Senior LevelWeb Security & Cyber Defense

How do you validate WebAuthn Attestation Statements to enforce enterprise hardware authenticators?

❓ Interview Prompt: Explain WebAuthn / FIDO2 Attestation Statements, CBOR decoding, FIDO Metadata Service (MDS3), and verifying hardware authenticators (YubiKeys).

In high-security enterprise environments, applications must verify that a user registered a FIPS-certified hardware security key (like a YubiKey) rather than a software passkey:

Attestation Statement Validation:

1
During WebAuthn registration, the authenticator returns an Attestation Statement containing an X.509 certificate chain.
2
Server decodes CBOR attestation payload and extracts the AAGUID (Authenticator Attestation GUID).
3
Server verifies AAGUID against the FIDO Alliance Metadata Service (MDS) to confirm the key is a certified hardware device!

Code Implementation Example

typescript
import { SimpleWebAuthnServer } from '@simplewebauthn/server';

// Verifying WebAuthn registration attestation against FIDO MDS
const verification = await SimpleWebAuthnServer.verifyRegistrationResponse({
  response: registrationBody,
  expectedChallenge,
  expectedOrigin: 'https://app.example.com',
  expectedRPID: 'example.com',
});
console.log('Authenticator AAGUID:', verification.registrationInfo?.aaguid);
💡Verifying WebAuthn registration attestation response in TypeScript.
🎯 Interview Key Takeaway

Verify WebAuthn attestation statement AAGUIDs against the FIDO Metadata Service to enforce hardware authenticator usage.

#WebAuthn#Passkeys#FIDO2#YubiKey#Senior
Back to all Web Security & Cyber Defense Questions→

More Web Security & Cyber Defense Interview Questions

Beginner LevelSecurity & Web Security

Explain OWASP Top 10 vulnerabilities (XSS, CSRF, SQL Injection) and their defenses.

Beginner LevelSecurity & Web Security

What are the 3 types of XSS (Stored, Reflected, DOM-based) and how do they differ?

Beginner LevelSecurity & Web Security

How do Parameterized Queries (Prepared Statements) prevent SQL Injection attacks?