feat: Align CTAP status values with CTAP 2.2#505
Merged
DennisDyallo merged 3 commits intoJun 29, 2026
Conversation
Collaborator
Author
|
@claude remove this, we dont need backwards compat: Keep obsolete PUVATH alias for source compatibility. |
|
Claude finished @DennisDyallo's task in 1m 12s —— View job Removed
|
Co-authored-by: Dennis Dyallo <DennisDyallo@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK’s CTAP status handling to align with CTAP 2.2 by adding the newer PUAT-required and PIN-token-expired status codes, then wiring those through exception messaging and WebAuthn error mapping.
Changes:
- Update
CtapStatus/CtapExceptionto usePuatRequired (0x36)and addPinTokenExpired (0x38)with descriptive exception messages. - Update WebAuthn client and PreviewSign extension to map the new statuses to
NotAllowed. - Add unit tests to assert CTAP 2.2 numeric values and message text; adjust integration test wording/expectations to reference
PuatRequired.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/WebAuthn/src/Extensions/PreviewSign/PreviewSignErrors.cs | Map CTAP 2.2 statuses (PuatRequired, PinTokenExpired) to PreviewSign client errors. |
| src/WebAuthn/src/Client/WebAuthnClient.cs | Treat PuatRequired/PinTokenExpired as NotAllowed in CTAP→WebAuthn error mapping. |
| src/Fido2/tests/Yubico.YubiKit.Fido2.UnitTests/CtapExceptionTests.cs | Add assertions for CTAP 2.2 status byte values and exception message text. |
| src/Fido2/tests/Yubico.YubiKit.Fido2.IntegrationTests/FidoMakeCredentialTests.cs | Update test name/docs/expectations to reference PuatRequired (and related firmware variants). |
| src/Fido2/src/Ctap/CtapStatus.cs | Introduce CTAP 2.2 statuses and update documentation links/comments. |
| src/Fido2/src/Ctap/CtapException.cs | Add CTAP 2.2 status message mappings for exception construction. |
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
Verification