Skip to content

Add "synthetic"/ "mock" FIDO2 credential creation. - #200

Merged
virot merged 1 commit into
masterfrom
synthetic-fido2-credential
Jul 22, 2026
Merged

Add "synthetic"/ "mock" FIDO2 credential creation.#200
virot merged 1 commit into
masterfrom
synthetic-fido2-credential

Conversation

@JMarkstrom

Copy link
Copy Markdown
Collaborator

Add support for synthetic (mock) FIDO2 credential creation

Add support for “synthetic” (locally generated) FIDO2 credential creation and rename FakeChallange to CreateSyntheticChallenge.

Introduce a Synthetic parameter set on New-YubiKeyFIDO2Credential that:

  • Generates challenge, user ID, and user entity locally
  • Requires only -RelyingPartyID and -Username
  • Eliminates the need for an external IdP

Goal: Enable standalone FIDO2 credential creation and simplify workflows for large blob and PRT scenarios by allowing credentials to be created on demand.

Details

  • Challenge.cs: Add CreateSyntheticChallenge (32 random bytes); deprecate FakeChallange as an [Obsolete] wrapper for backward compatibility
  • SyntheticCredentialHelper.cs (new): GenerateUserID returns 32 cryptographically secure random bytes for WebAuthn user.id
  • NewFIDO2Credential.cs:
    • Add Synthetic parameter set
    • Default UserDisplayName to Username
    • Populate synthetic values in ProcessRecord
    • Add “Touch the YubiKey…” prompt and WriteInformation confirmation
    • Update XML documentation and examples
  • CredentialData.cs: Add PublicKey and CredentialId convenience properties
  • 310-FIDO2.tests.ps1: Add Pester tests for the synthetic parameter set

@virot
virot merged commit 029dfb4 into master Jul 22, 2026
4 checks passed
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.

2 participants