Node module for FIDO Alliance Metadata Service v3
This module helps to access FIDO Alliance Metadata Service (MDS).
(Memo) What is Metadata Service?
The FIDO Alliance Metadata Service (MDS) is a centralized repository of the Metadata Statement that is used by the relying parties to validate authenticator attestation and prove the genuineness of the device model.
More detail information about FIDO Alliance Metadata Service is here.
How to work:
- Load authenticator information in the manner described below
- download Metadata Service BLOB file from FIDO Alliance site
- specify BLOB file's path
- provide JWT string
- Verify signature(JWS) with FIDO Alliance root certificate
- Find Metadata Statement by an identifier of authenticator(e.g. AAGUID for FIDO2 authenticator).
ESM
import FM3 from 'fido-mds3';
const client = new FM3.Builder().build();
client.findByAAGUID('9c835346-796b-4c27-8898-d6032f515cc5').then(data => {
console.log(data);
});
// {
// aaguid: '9c835346-796b-4c27-8898-d6032f515cc5',
// metadataStatement: {
// legalHeader: 'https://fidoalliance.org/metadata/metadata-statement-legal-hea
// der/',
// aaguid: '9c835346-796b-4c27-8898-d6032f515cc5',
// description: 'Cryptnox FIDO2',
// authenticatorVersion: 2,
// protocolFamily: 'fido2',
// schema: 3,
// .
// .
// .
// statusReports: [
// {
// status: 'FIDO_CERTIFIED_L1',
// effectiveDate: '2021-01-02',
// url: 'www.cryptnox.ch',
// certificateNumber: 'FIDO20020200803001',
// certificationPolicyVersion: '1.3.7',
// certificationRequirementsVersion: '1.3.0'
// }
// ],
// timeOfLastStatusChange: '2021-01-02'
// }
CommonJS
const FM3 = require('fido-mds3');
const client = new FM3.Builder().build();
client.findByAAGUID('9c835346-796b-4c27-8898-d6032f515cc5').then(data => {
console.log(data);
});
import FM3 from 'fido-mds3';
(async () => {
const builder = new FM3.Builder();
const client = await builder.buildAsync();
const data = await client.findByAAGUID('9c835346-796b-4c27-8898-d6032f515cc5');
console.log(data);
})();
Introduce some important APIs.
Builder class builds Client class which finds authenticator's information, following config.
- config FidoMds3Config
- returns Client
This method returns the instance of Client class which does not load authenticator's info yet.
- returns Promise
This method returns the instance of Client class which already loads authenticator's info.
Client class finds authenticator information from metadata service by authenticator model identifier(AAGUID etc.).
Find Metadata about FIDO2 authenticator with AAGUID.
- aaguid string
- FIDO2 authenticator AAGUID
- refresh boolean | FM3RefreshOption
- if true force to fetch Metadata BLOB, if false depends on update date
- returns Promise<MdsPayloadEntry | null> MetadataBLOBPayloadEntry
Find Metadata about FIDO UAF authenticator with AAID.
- aaid string
- FIDO UAF authenticator AAID
- refresh boolean | FM3RefreshOption
- if true force to fetch Metadata BLOB, if false depends on update date
- returns Promise<MdsPayloadEntry | null> MetadataBLOBPayloadEntry
Find Metadata about FIDO U2F authenticator with AAID.
- aaid string
- FIDO U2F authenticator AAID
- refresh boolean | FM3RefreshOption
- if true force to fetch Metadata BLOB, if false depends on update date
- returns Promise<MdsPayloadEntry | null> MetadataBLOBPayloadEntry
Find Metadata about FIDO(FIDO2, FIDO UAF and FIDO U2F) authenticator by identifier(AAGUID, AAID or AttestationCertificateKeyIdentifier).
- identifier string
- FIDO authenticator's identifier
- refresh boolean | FM3RefreshOption
- if true force to fetch Metadata BLOB, if false depends on update date
- returns Promise<MdsPayloadEntry | null> MetadataBLOBPayloadEntry
Accessor class executes accessing to metadata service.
Set root certificate info.
- url URL
- root certificate's URL
Load metadata from metadata service endpoint URL.
- url URL
- metadata service endpoint URL
Return metadata payload in JSON format.
- returns JSONObject metadata payload
npm install fido-mds3