fix(conformance): load the metadata the tools ship, echo only requested extensions - #253
Merged
Merged
Conversation
…ed extensions The first real FIDO2 conformance runs surfaced three defects, all confined to FIDO_CONFORMANCE_MODE, which is refused under a production NODE_ENV. The tools' metadata archive unzips to a nested metadataStatements/ directory and the loader only read the top level, so it silently loaded nothing. With requireKnownAuthenticator set the metadata service runs strict, so every conformance authenticator was refused as unlisted and every registration failed. That cascaded into the tests which depend on a registration having succeeded, rather than showing up as a metadata failure. The directory is now read recursively, so the archive can be dropped in unedited as the docs already said. The tools sign their Apple, Android Key and SafetyNet statements with their own test roots, so validating those against the real vendor roots could never succeed. Those preset roots are now cleared in conformance mode, which lets the roots carried in the metadata statement apply instead. Android Key attestation verifies for the first time as a result. generateRegistrationOptions always appends its own credProps, and the tools compare the echoed extensions against the requested set for exact equality, so every options request carrying extensions failed. The requested set is now echoed verbatim over the library's answer. The authentication options path was already correct, since the library passes extensions through there unchanged. A conformance run now reports zero failures.
This was referenced Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #172.
The FIDO2 conformance test tools were run against a local instance for the first
time. The first run reported 15 failures. This fixes the three defects behind
them, and a run now reports zero failures.
All three are confined to
FIDO_CONFORMANCE_MODE, which is refused under aproduction
NODE_ENV, so no deployed behaviour changes.Metadata statements were never loaded
The tools' "DOWNLOAD SERVER METADATA" archive unzips to a nested
metadataStatements/directory, and the loader only read JSON files at the toplevel of
FIDO_CONFORMANCE_METADATA_DIR. It silently found none.With
requireKnownAuthenticatorset, the metadata service runs in strict mode,so every conformance authenticator was refused as unlisted and every
registration failed. That cascaded into the tests which depend on a registration
having already succeeded, so the failures pointed away from the actual cause.
Confirmed directly against the library before and after:
The directory is now read recursively, so the archive can be dropped in unedited
as the documentation already promised.
Vendor attestation roots blocked their own tests
The tools sign their Apple, Android Key and SafetyNet statements with their own
test roots, so validating those against the real vendor roots could never
succeed. Those preset roots are now cleared in conformance mode, which lets the
roots carried in the metadata statement apply instead. Android Key attestation
verifies for the first time as a result.
Registration options advertised an extension nobody asked for
generateRegistrationOptionsalways appends its owncredProps, and the toolscompare the echoed extensions against the requested set for exact equality:
The requested set is now echoed verbatim over the library's answer. The
authentication options path was already correct, since the library passes
extensions through there unchanged.
Verification
Three conformance runs, 347 captured requests in the last one. Every options
call answered
ok, no ceremony was lost, and every remaining refusal is anegative test the tools intend to fail: corrupted attestation internals, bad
origins, unsupported formats.
Attestation formats verified end to end during a run: packed, tpm, fido-u2f,
android-key and none. Android SafetyNet is never exercised by the tools even
with every test group selected, which is worth confirming before closing #210.
Full suite green: 1219 passed, 1 skipped. Lint, typecheck, format and coverage
thresholds all clean.