Skip to content

Support loading offline MDS blobs in MetadataService#752

Merged
MasterKale merged 18 commits intomasterfrom
feat/support-offline-metadata-blobs
Mar 10, 2026
Merged

Support loading offline MDS blobs in MetadataService#752
MasterKale merged 18 commits intomasterfrom
feat/support-offline-metadata-blobs

Conversation

@MasterKale
Copy link
Owner

@MasterKale MasterKale commented Mar 3, 2026

This PR exports a new verifyMDSBlob() method from @simplewebauthn/server/helpers to enable FIDO MDS metadata statements to be validated and then cached, to be loaded later into a runtime that does not support runtime network egress. It accepts a single string value containing a FIDO MDS JWT, verifies the integrity of the JWT, and then extracts the metadata statements suitable for passing in as statements when calling MetadataService.initialize() later.

Fixes #732.

Example

On runtime that can make external network requests:

import { verifyMDSBlob } from '@simplewebauthn/server/helpers';

const blob: string = manuallyFetchMDSBlob();

// Makes network requests for things like CRL checks
const { statements, parsedNextUpdate, payload } = await verifyMDSBlob(blob);

await writeStatementsToDisk(statements);

On runtime that cannot make external network requests

import { MetadataService } from '@simplewebauthn/server';

const savedStatements = await readStatementsFromDisk();

// No network requests nor validation happen here because the statements are assumed trusted
await MetadataService.initialize({
  mdsServers: [],
  statements: savedStatements,
});

@MasterKale MasterKale added the package:server @simplewebauthn/server label Mar 3, 2026
@MasterKale MasterKale added this to the v13.2.4 milestone Mar 3, 2026
@MasterKale MasterKale merged commit d9e7dd1 into master Mar 10, 2026
4 checks passed
@MasterKale MasterKale deleted the feat/support-offline-metadata-blobs branch March 10, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package:server @simplewebauthn/server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose MDS download or statement cache

1 participant