Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MetadataStatement to include friendly names #544

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

joegoldman2
Copy link
Contributor

@joegoldman2 joegoldman2 commented Sep 10, 2024

FIDO Metadata Statement version 3 is currently used by default:

client.BaseAddress = new Uri("https://mds3.fidoalliance.org/");

The version 3 includes a new field friendlyNames which contains the description in alternative language. For example:

"metadataStatement": {
    "legalHeader": "Submission of this statement and retrieval and use of this statement indicates acceptance of the appropriate agreement located at https://fidoalliance.org/metadata/metadata-legal-terms/.",
    "attestationCertificateKeyIdentifiers": [
        "bab1487181fa4b7f6064b7f6bba6cff9efdfd71e"
    ],
    "friendlyNames": {
        "en-US": "Security Key NFC by Yubico"
    },
    "description": "Security Key NFC by Yubico",
    "authenticatorVersion": 328707,
    "protocolFamily": "u2f",
    // rest omitted for brevity
}

Spec: https://fidoalliance.org/specs/mds/fido-metadata-statement-v3.0-ps-20210518.html#alternativedescriptions-dictionary

This PR adds the field friendlyNames to MetadataStatement model.

Some authenticators still have the field alternativeDescriptions but the model for deserialization was not correct. For example:

{
    "legalHeader": "Submission of this statement and retrieval and use of this statement indicates acceptance of the appropriate agreement located at https://fidoalliance.org/metadata/metadata-legal-terms/.",
    "aaguid": "0076631b-d4a0-427f-5773-0ec71c9e0279",
    "friendlyNames": {
        "en-US": "HYPR FIDO2 Authenticator"
    },
    "description": "HYPR FIDO2 Authenticator",
    "alternativeDescriptions": {
        "en-US": "HYPR FIDO2 Authenticator"
    },
    "authenticatorVersion": 2,
    "protocolFamily": "fido2"
     // rest omitted for brevity
}

This PR fixes that too.

@codecov-commenter
Copy link

codecov-commenter commented Sep 10, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.99%. Comparing base (cb71a15) to head (7c0fd5c).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #544      +/-   ##
==========================================
+ Coverage   73.95%   73.99%   +0.03%     
==========================================
  Files          98       97       -1     
  Lines        2638     2638              
  Branches      446      446              
==========================================
+ Hits         1951     1952       +1     
+ Misses        586      585       -1     
  Partials      101      101              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@joegoldman2
Copy link
Contributor Author

@abergs any chance you can review this PR please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants