Skip to content

Preserve security key signature blobs#902

Merged
tomaswolf merged 1 commit into
apache:masterfrom
nataphon-ktsystems:codex/sk-agent-signature-blob
Jun 21, 2026
Merged

Preserve security key signature blobs#902
tomaswolf merged 1 commit into
apache:masterfrom
nataphon-ktsystems:codex/sk-agent-signature-blob

Conversation

@nataphon-ktsystems

Copy link
Copy Markdown
Contributor

Security-key (sk-*) signatures carry a structured OpenSSH signature blob: algorithm, raw signature, flags, and counter. The client-side auth path and OpenSSH agent proxy path were treating those like ordinary two-field signatures, which dropped or double-wrapped the trailing security-key fields.

This change preserves the full security-key signature blob when reading OpenSSH agent responses, forwarding local agent responses, and appending the final userauth signature. Ordinary key types keep the existing algorithm-plus-signature wrapping.

Tests cover both sides of the client path:

  • AgentUnitTest.securityKeySignatureBlob verifies a security-key signature blob survives the agent protocol path with flags and counter intact.
  • UserAuthPublicKeySkTest.securityKeySignatureBlobIsNotWrapped verifies the client userauth packet writes the security-key signature blob directly instead of wrapping it again.

Validation:

./mvnw -pl sshd-core -am -Dtest=AgentUnitTest,UserAuthPublicKeySkTest -Dsurefire.failIfNoSpecifiedTests=false test

@nataphon-ktsystems nataphon-ktsystems marked this pull request as ready for review June 19, 2026 14:28
Comment thread sshd-core/src/main/java/org/apache/sshd/agent/common/AbstractAgentProxy.java Outdated
@nataphon-ktsystems nataphon-ktsystems force-pushed the codex/sk-agent-signature-blob branch from 303a134 to f463789 Compare June 20, 2026 13:31
@tomaswolf tomaswolf merged commit f463789 into apache:master Jun 21, 2026
7 checks passed
@tomaswolf

Copy link
Copy Markdown
Member

Thanks a lot. I've added an integration test in a follow-up commit.

@nataphon-ktsystems

Copy link
Copy Markdown
Contributor Author

Glad it helps! Thanks for such a responsive review. Looking forward to be the part of Apache community.

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