This specification is maintained by the AgentRules Working Group. Have enhancements or want to claim maintainership?Submit Specification →
securitycritical PriorityID: fido-mds3-passkey-hardware-root-attestation-standard

FIDO Alliance MDS3 Hardware Root of Trust Attestation Verification Standard

Enforces cryptographic hardware-backed attestation verification for passkeys against dynamically synchronized FIDO Metadata Service 3 (MDS3) endpoints. Rejects software-emulated credential injection, unverified authenticator AAGUID claims, and authenticators with compromised status reports. Mandates local MDS3 JWT blob validation with FIDO Root CA chain verification, CRL checks, and strict attestation certificate path matching.

Prohibited Anti-Pattern: Accepting Self-Asserted or Unchecked AAGUIDs Without Cryptographic MDS3 Hardware Attestation Verification

Export Ready-to-Drop Configuration

Select format below to copy code or download file directly.

---
description: FIDO Alliance MDS3 Hardware Root of Trust Attestation Verification Standard - Enforces cryptographic hardware-backed attestation verification for passkeys against dynamically synchronized FIDO Metadata Service 3 (MDS3) endpoints. Rejects software-emulated credential injection, unverified authenticator AAGUID claims, and authenticators with compromised status reports. Mandates local MDS3 JWT blob validation with FIDO Root CA chain verification, CRL checks, and strict attestation certificate path matching.
globs: src/**/auth/**/*.{ts,js}, src/**/webauthn/**/*.{ts,js}, src/**/passkey/**/*.{ts,js}, packages/**/auth/**/*.{ts,js}
alwaysApply: true
verified_by: "agentrules.org"
license: "CC-BY-4.0"
source: "https://agentrules.org/rules/fido-mds3-passkey-hardware-root-attestation-standard"
---

# FIDO Alliance MDS3 Hardware Root of Trust Attestation Verification Standard

> **Severity**: CRITICAL | **Category**: security
> **Anti-Pattern Warning**: Accepting Self-Asserted or Unchecked AAGUIDs Without Cryptographic MDS3 Hardware Attestation Verification

## System Constraints
You are a Principal Security Architect enforcing FIDO Alliance MDS3 hardware root-of-trust attestation. You MUST reject any WebAuthn/Passkey registration that relies on client-asserted AAGUIDs without verifying attestation object certificate chains against an authenticated, continuously refreshed FIDO MDS3 payload. Software-emulated authenticators, compromised keys, or stale metadata caches MUST NOT pass verification.

## Strict Guidelines
- Engineers MUST ALWAYS verify the FIDO MDS3 JWT signature against the official FIDO Alliance Root Certificate and check intermediate certificates for revocation via CRL/OCSP.
- Engineers MUST dynamically synchronize and cache MDS3 metadata blobs with an automatic refresh mechanism triggered before the nextUpdate timestamp expires.
- Services MUST extract the authenticating AAGUID directly from the attested credential data within authData, NEVER trusting unauthenticated client parameters.
- Verification logic MUST inspect the MDS3 StatusReport array for the matching AAGUID and REJECT registrations if any report flags 'ATTESTATION_KEY_COMPROMISE', 'USER_VERIFICATION_BYPASS', or other non-compliant statuses.
- When enterprise hardware policy requires high assurance, authenticators MUST be validated to meet specific FIDO Authenticator Certification levels (e.g., L2+ or FIPS-140-2) declared in the MDS3 metadata statement.
- Components NEVER accept 'none' attestation conveyance when hardware assurance policies mandate cryptographic proof of authenticator provenance.

## Bad vs Good Implementations
### Passkey Registration Attestation Verification against FIDO MDS3

#### Bad Antipattern (AI Common Hallucination)
> **Why it fails**: The code blindly trusts the AAGUID supplied by the client, uses a hardcoded allowlist without checking revocation or MDS3 status reports, and fails to verify the cryptographic attestation chain against trusted FIDO MDS3 metadata, enabling software credential injection.
```typescript
import { Request, Response } from 'express';

// INSECURE: Relies solely on client-asserted AAGUID without MDS3 attestation chain validation
export async function verifyPasskeyRegistration(req: Request, res: Response) {
  const { clientAaguid, attestationResponse } = req.body;
  
  // Flaw 1: Blindly trusts client-submitted AAGUID
  // Flaw 2: Ignores attestation certificate chain validation
  // Flaw 3: Does not check FIDO MDS3 for compromised authenticator status
  const allowedAaguids = ['4238cfb2-03dc-4cc6-8e54-8e3b4a49c636'];
  if (!allowedAaguids.includes(clientAaguid)) {
    return res.status(403).json({ error: 'Authenticator not allowed' });
  }

  // Decodes response without hardware root verification
  const decoded = JSON.parse(Buffer.from(attestationResponse, 'base64').toString());
  return res.json({ verified: true, credentialId: decoded.id });
}
```

#### Production Standard (Correct)
> **Standard**: The implementation extracts the AAGUID directly from cryptographic attestation data, queries a dynamically synchronized FIDO MDS3 provider, evaluates status reports for security flags, and cryptographically verifies the attestation certificate path against the MDS3 root trust anchors.
```typescript
import { verifyRegistrationResponse } from '@simplewebauthn/server';
import { FidoMds3Service } from './fido-mds3-service';
import type { RegistrationResponseJSON } from '@simplewebauthn/types';

interface VerifyRegistrationInput {
  response: RegistrationResponseJSON;
  expectedChallenge: string;
  expectedOrigin: string;
  expectedRPID: string;
}

export async function verifyPasskeyRegistrationWithMds3(
  input: VerifyRegistrationInput,
  mds3Service: FidoMds3Service
) {
  // 1. Verify standard WebAuthn response with direct attestation required
  const verification = await verifyRegistrationResponse({
    response: input.response,
    expectedChallenge: input.expectedChallenge,
    expectedOrigin: input.expectedOrigin,
    expectedRPID: input.expectedRPID,
    requireUserVerification: true,
  });

  if (!verification.verified || !verification.registrationInfo) {
    throw new Error('WebAuthn attestation signature verification failed');
  }

  const { aaguid, attestationObject } = verification.registrationInfo;

  // 2. Query dynamically synchronized FIDO MDS3 repository by extracted AAGUID
  const mdsEntry = await mds3Service.getMetadataEntry(aaguid);
  if (!mdsEntry) {
    throw new Error(`Untrusted authenticator: AAGUID ${aaguid} not registered in FIDO MDS3`);
  }

  // 3. Reject authenticators with compromised status reports
  const revokedStatuses = new Set([
    'ATTESTATION_KEY_COMPROMISE',
    'USER_VERIFICATION_BYPASS',
    'USER_KEY_REMOTE_COMPROMISE',
    'REVOKED'
  ]);

  const hasCompromisedStatus = mdsEntry.statusReports.some((report) =>
    revokedStatuses.has(report.status)
  );
  if (hasCompromisedStatus) {
    throw new Error(`Authenticator rejected due to compromised FIDO status report for AAGUID ${aaguid}`);
  }

  // 4. Verify attestation root against MDS3 attestationRootCertificates
  const isRootTrusted = await mds3Service.verifyAttestationCertificateChain(
    attestationObject,
    mdsEntry.metadataStatement.attestationRootCertificates
  );

  if (!isRootTrusted) {
    throw new Error('Attestation certificate path failed verification against MDS3 root anchors');
  }

  return {
    verified: true,
    credentialID: verification.registrationInfo.credential.id,
    credentialPublicKey: verification.registrationInfo.credential.publicKey,
    counter: verification.registrationInfo.credential.counter,
    authenticatorInfo: {
      description: mdsEntry.metadataStatement.description,
      certificationLevel: mdsEntry.metadataStatement.authenticatorGetInfo?.certificationLevel,
    },
  };
}
```

Architectural Specification & Invariant Rationale

Architectural Invariant Design: FIDO Alliance MDS3 Hardware Root of Trust Attestation Verification Standard

FIDO Alliance MDS3 Hardware Root of Trust Attestation Verification Standard defines an industrial-grade behavioral standard for security engineering. Enforces cryptographic hardware-backed attestation verification for passkeys against dynamically synchronized FIDO Metadata Service 3 (MDS3) endpoints. Rejects software-emulated credential injection, unverified authenticator AAGUID claims, and authenticators with compromised status reports. Mandates local MDS3 JWT blob validation with FIDO Root CA chain verification, CRL checks, and strict attestation certificate path matching. Modern software architectures require strict adherence to deterministic patterns to guarantee high availability, maintainability, and zero security vulnerabilities.

Framework Paradigm Shift & Drift MechanicsLLMs are trained on millions of open-source repositories containing outdated code, legacy idioms, and unpatched antipatterns. When coding assistants generate implementations for this stack, they default to common statistical tokens: Accepting Self-Asserted or Unchecked AAGUIDs Without Cryptographic MDS3 Hardware Attestation Verification Without an explicit system instruction file, developers spend hours debugging silent failures.
Failure Modes & Production Blast Radius

Hazard Analysis: What Breaks Without This Rule

The following failure modes have been cataloged from hundreds of hours of production code reviews where AI assistants produced non-compliant implementations:

Failure ModeAI Symptom (The Anti-Pattern)SeverityProduction Impact & Remedy
AI Hallucination & Deprecation DriftAccepting Self-Asserted or Unchecked AAGUIDs Without Cryptographic MDS3 Hardware Attestation VerificationCritical
Violating this industrial standard introduces regression bugs, security risks, and unexpected runtime failures in production.
Enforce explicit behavioral system directives across all AI coding assistants in your repository.
Silent Architecture InconsistencyAI assistants produce mixed paradigms across files, creating fragmented codebase conventions.Medium
Increases cognitive load during code reviews and leads to maintenance debt across engineering teams.
Pin project conventions in .cursor/rules, CLAUDE.md, and AGENTS.md so all team agents follow identical guardrails.
Architectural Directives in Detail

Step-by-Step Production Directives

Each rule constraint below is injected into the AI agent's system prompt to establish deterministic boundaries:

1

Engineers MUST ALWAYS verify the FIDO MDS3 JWT signature against the official FIDO Alliance Root Certificate and check intermediate certificates for revocation via CRL/OCSP.

Engineers MUST ALWAYS verify the FIDO MDS3 JWT signature against the official FIDO Alliance Root Certificate and check intermediate certificates for revocation via CRL/OCSP.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
2

Engineers MUST dynamically synchronize and cache MDS3 metadata blobs with an automatic refresh mechanism triggered before the nextUpdate timestamp expires.

Engineers MUST dynamically synchronize and cache MDS3 metadata blobs with an automatic refresh mechanism triggered before the nextUpdate timestamp expires.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
3

Services MUST extract the authenticating AAGUID directly from the attested credential data within authData, NEVER trusting unauthenticated client parameters.

Services MUST extract the authenticating AAGUID directly from the attested credential data within authData, NEVER trusting unauthenticated client parameters.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
4

Verification logic MUST inspect the MDS3 StatusReport array for the matching AAGUID and REJECT registrations if any report flags 'ATTESTATION_KEY_COMPROMISE', 'USER_VERIFICATION_BYPASS', or other non-compliant statuses.

Verification logic MUST inspect the MDS3 StatusReport array for the matching AAGUID and REJECT registrations if any report flags 'ATTESTATION_KEY_COMPROMISE', 'USER_VERIFICATION_BYPASS', or other non-compliant statuses.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
5

When enterprise hardware policy requires high assurance, authenticators MUST be validated to meet specific FIDO Authenticator Certification levels (e.g., L2+ or FIPS-140-2) declared in the MDS3 metadata statement.

When enterprise hardware policy requires high assurance, authenticators MUST be validated to meet specific FIDO Authenticator Certification levels (e.g., L2+ or FIPS-140-2) declared in the MDS3 metadata statement.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
6

Components NEVER accept 'none' attestation conveyance when hardware assurance policies mandate cryptographic proof of authenticator provenance.

Components NEVER accept 'none' attestation conveyance when hardware assurance policies mandate cryptographic proof of authenticator provenance.

Rationale:AI models frequently generate unconstrained code here because statistical language distributions lack project-specific architectural context. Mandating this directive ensures that generated code adheres to verified industrial production requirements.
Enforcement:Integrated into the Agent Pack rule file. When Cursor, Claude Code, or Codex processes this prompt, it applies this constraint before emitting syntax.
Technical Questions & Answers

Frequently Asked Technical Questions

Common questions developers face when configuring AI coding assistants for this stack:

Q:Why is FIDO Alliance MDS3 Hardware Root of Trust Attestation Verification Standard critical for AI coding assistants?

Enforces cryptographic hardware-backed attestation verification for passkeys against dynamically synchronized FIDO Metadata Service 3 (MDS3) endpoints. Rejects software-emulated credential injection, unverified authenticator AAGUID claims, and authenticators with compromised status reports. Mandates local MDS3 JWT blob validation with FIDO Root CA chain verification, CRL checks, and strict attestation certificate path matching. Without explicit behavioral boundaries, AI coding assistants (Cursor, Claude Code, Windsurf, Codex) rely on training data averages, which frequently produce deprecated, inefficient, or vulnerable code patterns.

Q:How does adopting this rule prevent AI hallucinations?

This rule explicitly declares what the AI must avoid (Accepting Self-Asserted or Unchecked AAGUIDs Without Cryptographic MDS3 Hardware Attestation Verification) and prescribes verified positive examples. Grounding the LLM with negative and positive pairs eliminates guesswork.

Q:Which AI coding environments are supported?

This specification is multi-platform compatible: Cursor (.cursor/rules/*.mdc & .cursorrules), Anthropic Claude Code (CLAUDE.md), Windsurf (.windsurfrules), Codex / Cline (AGENTS.md), and GitHub Copilot (.github/copilot-instructions.md).

Q:Can I combine this rule with other technology stacks?

Yes. Use the Interactive Stack Builder or download an Agent Pack to merge this rule with other frontend, backend, database, security, and DevOps rules without syntax collision.

Open Specification · CC BY 4.0·Free for Personal, Team & Commercial In-Repo Use

Citation & Open Source Attribution Guidelines

This specification is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0). You are completely free to adapt and share this rule in your workspace. If citing, including in public AI benchmark datasets, or redistributing, attribution to AgentRules.org is required.

1 Rule in Stack

FIDO