npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fido-mds3

v0.4.0-20221022

Published

Module to help access to FIDO Alliance Metadata Service v3.

Downloads

98

Readme

fido-mds3

Node module for FIDO Alliance Metadata Service v3

Description

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).

Alternatives

Usage

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);
});

Async

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);
})();

API

Introduce some important APIs.

Class: Builder

Builder class builds Client class which finds authenticator's information, following config.

Builder([config])

  • config FidoMds3Config

build()

  • returns Client

This method returns the instance of Client class which does not load authenticator's info yet.

buildAsync()

  • returns Promise

This method returns the instance of Client class which already loads authenticator's info.

Class: Client

Client class finds authenticator information from metadata service by authenticator model identifier(AAGUID etc.).

findByAAGUID(aaguid [, refresh])

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

findByAAID(aaid [, refresh])

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

findByAttestationCertificateKeyIdentifier(attestationCertificateKeyIdentifier [, refresh])

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

findMetadata(identifier [, refresh])

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

Class: Accessor

Accessor class executes accessing to metadata service.

setRootCertUrl(url)

Set root certificate info.

  • url URL
    • root certificate's URL

fromUrl(url)

Load metadata from metadata service endpoint URL.

  • url URL
    • metadata service endpoint URL

toJsonObject()

Return metadata payload in JSON format.

  • returns JSONObject metadata payload

Install

npm install fido-mds3

Licence

MIT

Author

s1r-J