Skip to content

fix(ctap2): decode unsignedExtensionOutputs at GetAssertion 0x08#244

Merged
AlfioEmanueleFresta merged 1 commit into
masterfrom
fix/get-assertion-unsigned-extension-outputs
Jun 7, 2026
Merged

fix(ctap2): decode unsignedExtensionOutputs at GetAssertion 0x08#244
AlfioEmanueleFresta merged 1 commit into
masterfrom
fix/get-assertion-unsigned-extension-outputs

Conversation

@AlfioEmanueleFresta

Copy link
Copy Markdown
Member

The assertion response mapped entry 0x08 to a value it should not have, while the protocol defines 0x08 as the unsigned extension outputs map. An authenticator that returns that map caused the whole assertion response to fail to decode, breaking the ceremony. This becomes more likely as newer authenticators emit unsigned extension outputs.

This decodes entry 0x08 as the unsigned extension outputs map and removes two response fields that were never populated with valid data.

Scope: this fixes the decode failure. The unsigned outputs are kept on the decoded response but are not yet merged into the caller-facing extension results, since arbitrary CBOR maps do not map cleanly to the typed JSON outputs. That can be a follow-up. The change also drops two unused fields from the public assertion type, a minor change for a pre-1.0 crate.

Includes a regression test that decodes a response carrying the map and confirms it parses.

GetAssertion response index 0x08 is unsignedExtensionOutputs, a CBOR map, not enterprise attestation. Decoding it as Option<bool> made the whole response fail to parse. Decode it as an optional map and remove the speculative enterprise_attestation and attestation_statement fields, which no spec defines for GetAssertion.
@AlfioEmanueleFresta AlfioEmanueleFresta force-pushed the fix/get-assertion-unsigned-extension-outputs branch from fc34cda to d285dc0 Compare June 7, 2026 15:48
@AlfioEmanueleFresta AlfioEmanueleFresta merged commit 76512c4 into master Jun 7, 2026
2 checks passed
@AlfioEmanueleFresta AlfioEmanueleFresta deleted the fix/get-assertion-unsigned-extension-outputs branch June 7, 2026 15:48
AlfioEmanueleFresta added a commit that referenced this pull request Jun 10, 2026
…nt extension results

PR #244 decoded the unsigned extension outputs map at the getAssertion response but kept it on the protocol response without surfacing it. This maps each entry into the client extension results as a top-level member keyed by extension identifier, the same shape WebAuthn uses for client extension results.

The map has no fixed schema, so values are converted to JSON-safe types, with byte strings encoded as base64url. An empty or absent map adds nothing, and ids that would clash with a typed output are skipped. Includes an end-to-end test from the encoded response through to the JSON output.
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.

1 participant