Skip to content

Share signature verification across public-key and host-based auth paths - #161

Merged
David Obando (DavidObando) merged 1 commit into
microsoft:mainfrom
DavidObando:fix/auth-signature-verification
Aug 24, 2026
Merged

Share signature verification across public-key and host-based auth paths#161
David Obando (DavidObando) merged 1 commit into
microsoft:mainfrom
DavidObando:fix/auth-signature-verification

Conversation

@DavidObando

Copy link
Copy Markdown
Member

Consolidate signature verification for public-key and host-based authentication requests in the C# and TypeScript servers into a single helper with an explicit contract: when verification does not succeed, the failure is reported and the caller returns immediately without raising the Authenticating event. This aligns both servers with the Go implementation, which already handled the two paths this way.

Also correct host-based deserialization in the TypeScript PublicKeyRequestMessage, which read the public-key wire format regardless of method name, and populate PayloadWithoutSignature on the C# host-based read path so the verified transcript is correct if that path is enabled.

Adds negative-path test coverage in both languages for authentication requests whose signature does not match the presented public key, across ECDSA P-256/P-384 and RSA SHA-256/SHA-512.

Consolidate signature verification for public-key and host-based
authentication requests in the C# and TypeScript servers into a single
helper with an explicit contract: when verification does not succeed, the
failure is reported and the caller returns immediately without raising the
Authenticating event. This aligns both servers with the Go implementation,
which already handled the two paths this way.

Also correct host-based deserialization in the TypeScript
PublicKeyRequestMessage, which read the public-key wire format regardless
of method name, and populate PayloadWithoutSignature on the C# host-based
read path so the verified transcript is correct if that path is enabled.

Adds negative-path test coverage in both languages for authentication
requests whose signature does not match the presented public key, across
ECDSA P-256/P-384 and RSA SHA-256/SHA-512.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DavidObando
David Obando (DavidObando) merged commit e65278d into microsoft:main Aug 24, 2026
1 of 3 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.

3 participants