diff options
author | Matthew Miller <matthew@millerti.me> | 2020-07-04 17:24:15 -0700 |
---|---|---|
committer | Matthew Miller <matthew@millerti.me> | 2020-07-04 17:24:15 -0700 |
commit | 580e944f6377aa4d199ed0c177eff8774c3fb8ac (patch) | |
tree | 66947ce015579095385de09ffd48338fad9ec333 /packages/server/src | |
parent | a66ac33004d84deaee7c67f5c3bec7780fa0145b (diff) |
Add FIDO attestation type constants
Diffstat (limited to 'packages/server/src')
-rw-r--r-- | packages/server/src/helpers/constants.ts | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/packages/server/src/helpers/constants.ts b/packages/server/src/helpers/constants.ts index e4b3841..ac12bee 100644 --- a/packages/server/src/helpers/constants.ts +++ b/packages/server/src/helpers/constants.ts @@ -30,7 +30,8 @@ type COSEInfo = { * A mapping of ALG_SIGN hex values (as unsigned shorts) to COSE curve values. Keys should appear as * values in a metadata statement's `authenticationAlgorithm` property. * - * From https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-registry-v2.0-rd-20180702.html#authentication-algorithms + * From https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-registry-v2.0-rd-20180702.html + * FIDO Registry of Predefined Values - 3.6.1 Authentication Algorithms */ export const FIDO_METADATA_AUTH_ALG_TO_COSE: { [algKey: number]: COSEInfo } = { // ALG_SIGN_SECP256R1_ECDSA_SHA256_RAW @@ -58,3 +59,18 @@ export const FIDO_METADATA_AUTH_ALG_TO_COSE: { [algKey: number]: COSEInfo } = { // ALG_SIGN_SECP521R1_ECDSA_SHA512_RAW 18: { kty: 1, alg: -8, crv: 6 }, }; + +/** + * A map of ATTESTATION hex values (as unsigned shorts). Keys should + * appear as values in a metadata statement's `attestationTypes` property. + * + * From https://fidoalliance.org/specs/fido-v2.0-rd-20180702/fido-registry-v2.0-rd-20180702.html + * FIDO Registry of Predefined Values - 3.6.3 Authenticator Attestation Types + */ +export const FIDO_METADATA_ATTESTATION_TYPES: { [type: string]: string } = { + 15879: 'ATTESTATION_BASIC_FULL', + // Self attestation + 15880: 'ATTESTATION_BASIC_SURROGATE', + 15881: 'ATTESTATION_ECDAA', + 15882: 'ATTESTATION_ATTCA', +}; |