Add passkey tests verifying WebAuthn conformance #62441
Open
+3,468
−4
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.
Add passkey tests verifying WebAuthn conformance
Adds tests to verify that the ASP.NET Core Identity passkey implementation conforms to the WebAuthn standard.
Description
We have an existing sample project in this repo (
IdentitySample.PasskeyConformance
) that can be run against the official FIDO Conformance Testing tools to verify that our implementation of passkeys is conformant with the WebAuthn specification. However, it's currently not possible to run this tool in CI, as the tool is not open source nor does it have a CLI interface.This PR adds CI-compatible tests that verify conformance with the WebAuthn specification, at least to the degree that we currently support (e.g., there are no attestation statement verification tests). Instead of validating passkey functionality in an E2E manner like the conformance testing tool (we already have some coverage in existing E2E tests), these tests directly validate the
DefaultPasskeyHandler
implementation in-memory. This is a simpler approach that gives us full control over test input data that would normally be generated by the browser and allows us to validate implementation-specific behavior that the official conformance testing tool cannot.This PR also extends existing functional tests to cover passkey functionality:
SignInManager
testsUserManager
testsFixes #62440