You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
/// Creates a credential reusing a relying party from an existing credential with a locally generated challenge.
17
28
/// </summary>
18
29
19
30
// Imports
@@ -23,6 +34,7 @@
23
34
usingpowershellYK.support;
24
35
usingYubico.YubiKey.Cryptography;
25
36
usingpowershellYK.FIDO2;
37
+
usingpowershellYK.support.FIDO2;
26
38
27
39
namespacepowershellYK.Cmdlets.Fido
28
40
{
@@ -32,10 +44,12 @@ public class NewYubikeyFIDO2CredentialCmdlet : PSCmdlet
32
44
// Parameters for relying party information
33
45
[Parameter(Mandatory=true,ValueFromPipeline=false,HelpMessage="Specify which relayingParty (site) this credential is regards to.",ParameterSetName="UserData-HostData")]
34
46
[Parameter(Mandatory=true,ValueFromPipeline=false,HelpMessage="Specify which relayingParty (site) this credential is regards to.",ParameterSetName="UserEntity-HostData")]
47
+
[Parameter(Mandatory=true,ValueFromPipeline=false,HelpMessage="Relying party ID (domain) for the credential.",ParameterSetName="Synthetic")]
[Parameter(Mandatory=false,ValueFromPipeline=false,HelpMessage="Friendlyname for the relayingParty.",ParameterSetName="UserData-HostData")]
38
51
[Parameter(Mandatory=false,ValueFromPipeline=false,HelpMessage="Friendlyname for the relayingParty.",ParameterSetName="UserEntity-HostData")]
52
+
[Parameter(Mandatory=false,ValueFromPipeline=false,HelpMessage="Friendly name for the relying party. Defaults to RelyingPartyID.",ParameterSetName="Synthetic")]
0 commit comments