Repository navigation
Reject a non-empty attStmt in the "none" attestation statement format - #538
Open
choksi2212 wants to merge 1 commit into
Open
choksi2212 wants to merge 1 commit into
choksi2212 wants to merge 1 commit into
Conversation
The "none" attestation statement format defined in WebAuthn Level 3, Section 8.7 requires the attStmt member to be an empty map. The verifier accepted any map, so a registration response with fmt "none" and a non-empty attStmt passed validation with the extra properties silently ignored. verifyAttestationSignature now throws IllegalArgumentException when the attStmt map has any properties, in line with how the other attestation statement verifiers reject malformed statements, which fails the registration ceremony in FinishRegistrationSteps.Step19. Partially addresses Yubico#526. Signed-off-by: choksi2212 <choksi2212@users.noreply.github.com>
Author
|
Quick note on the checks section: the workflow runs on this PR are sitting in the awaiting-approval state (first PR from this fork), so nothing has executed on CI yet. For what it is worth, the branch was verified locally before opening — |
This branch has not been deployed
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.
The
"none"attestation statement format defined in WebAuthn Level 3, Section 8.7 requires theattStmtmember to be an empty map:NoneAttestationStatementVerifierreturnedtrueunconditionally, so a registration response withfmt: "none"and a non-emptyattStmtmap passed Step 19 with the extra properties silently ignored, instead of being rejected as non-conforming. This is the (b) half of #526.The verifier now throws
IllegalArgumentExceptionwhen theattStmtmap has any properties, in line with how the other attestation statement verifiers reject malformed statements, which fails the registration ceremony inFinishRegistrationSteps.Step19. A newNoneAttestationStatementVerifierSpecpins both directions, run withTestWithEachProviderlike the other verifier specs: it accepts an empty attStmt and rejects an attStmt with properties.Before the fix, the new "rejects an attStmt with properties" test fails on every provider; with the fix the spec passes on every provider, the full
:webauthn-server-core:testsuite is green on JDK 21, andspotlessCheck(including scalafix) is clean.The (a) half of #526 (rejecting
crossOrigin: trueunless the Relying Party expects cross-origin use) needs a newRelyingPartysetting to express that expectation, so I've left it out of this PR rather than pick the shape of a public API on my own.Partially addresses #526.