test(golden): WebAuthn ceremony response-envelope parity fixtures#229
Open
rado0x54 wants to merge 1 commit into
Open
test(golden): WebAuthn ceremony response-envelope parity fixtures#229rado0x54 wants to merge 1 commit into
rado0x54 wants to merge 1 commit into
Conversation
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.
Summary
Extends the golden parity oracle (#227) to the WebAuthn ceremony response envelopes — the ShellWatch-owned bodies returned once the crypto verifies. This was the coverage explicitly deferred in #227 (the ceremonies weren't reproducible then); #162's fake authenticator unblocked it. Part of #225.
What's included
6 new golden fixtures / 5 cases (
golden-webauthn.test.ts), driving the real attestation/assertion crypto end-to-end:webauthn-self-register—POST /api/auth/register→{ verified, accountId, id, credentialId, label }webauthn-login-verify—POST /api/hydra/login/verify→{ redirectTo }webauthn-stepup-verify—POST /api/webauthn/stepup/verify→{ stepUpToken, expiresAt, action }webauthn-register—POST /api/webauthn/register→{ verified, credentialId, id, label, authorizedKeysEntry, sshdConfig }webauthn-invite-mint+webauthn-invite-redeem— invite{ token, createdAt, expiresAt }and{ status, label, fingerprint }Determinism without new normalizer rules. The fake authenticator gained
privateKeyPem+credentialIdoptions; the golden suite pins two fixed keys socredentialId/ the OpenSSHwebauthn-skline /fingerprintare stable. Everything else folds via the existing normalizer (challenge/token →<REDACTED>, timestamps →<TS>, account/credential-row UUIDs →<UUID>). No changes togolden.ts— so #227's audit/REST/MCP/WS fixtures are byte-for-byte untouched (verified).Scope note: the
/optionsbodies are@simplewebauthnpassthroughs (documented loosely inopenapi.yaml); this suite pins the response shapes ShellWatch itself constructs.Refactor: extracted the thin-app +
enroll/stepUphelpers intosrc/test/helpers/webauthn-app.ts, shared by the ceremony behavior test and this golden test (one source of truth; the ceremony test's 9 assertions are unchanged).Validation
pnpm test:golden26/26 (5 suites); stable across repeated runs (fixed keys → fully deterministic).pnpm test:integration158/158;pnpm typecheck✓;pnpm spdx:check✓.__goldens__/*unchanged on disk.Relates to #210, #225; builds on #227 and #162/#228.