Skip to content

Log negotiated TLS groups for HKEX adoption - #8454

Merged
Amaury Chamayou (achamayou) merged 7 commits into
microsoft:mainfrom
PallabPaul:ppaul/log_hkex
Sep 29, 2026
Merged

Amaury Chamayou (achamayou) merged 7 commits into
microsoft:mainfrom
PallabPaul:ppaul/log_hkex

Conversation

@PallabPaul

Copy link
Copy Markdown
Member

Summary

  • log the negotiated TLS group at INFO after each successful inbound TLS handshake
  • include a machine-readable hybrid_key_exchange classification for adoption queries
  • retain the connection ID for correlation with nearby transport logs

Validation

  • syntax-compiled src/tls/openssl_server.h with Clang 18 and CCF warnings-as-errors flags
  • git diff --check
  • ASCII, copyright, and include-policy checks

Full test execution was not available because the WSL environment does not have Cargo installed.

@PallabPaul
Pallab Paul (PallabPaul) requested a review from a team as a code owner September 25, 2026 17:52
Copilot AI lite review requested due to automatic review settings September 25, 2026 17:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Add test coverage verifying the emitted hybrid_key_exchange telemetry.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Adds INFO-level inbound TLS handshake telemetry for negotiated groups, hybrid key exchange classification, and connection correlation.

Changes:

  • Logs the negotiated TLS group and connection ID.
  • Adds machine-readable hybrid_key_exchange status.
  • Retains fallback handling for unknown groups.
File Summary
src/​tls/​openssl_server.h Logs negotiated TLS metadata after successful handshakes.

The new telemetry lacks test assertions for hybrid and classical classifications.


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/tls/openssl_server.h Outdated
Comment thread src/tls/test/openssl_server_test.cpp Outdated
@achamayou

Copy link
Copy Markdown
Member

The code needs formatting

Comment thread src/tls/openssl_server.h Outdated
Comment thread src/tls/openssl_server.h Outdated
@achamayou

Copy link
Copy Markdown
Member

A problem with doing this on handshake every time is that it's a log line even if the handshake fails, and so a client doing lots of failed handshakes for whatever reason will spam the log.

Comment thread src/tls/test/openssl_server_test.cpp Outdated
@PallabPaul

Copy link
Copy Markdown
Member Author

A problem with doing this on handshake every time is that it's a log line even if the handshake fails, and so a client doing lots of failed handshakes for whatever reason will spam the log.

The changes added only logs at INFO when SSL_accept() returns 1, so failed handshakes and retries won’t emit it. One issue still remains where a lot of successful connections can still generate log volume.

Comment thread src/tls/openssl_server.h Outdated
Comment thread src/tls/openssl_server.h Outdated
@achamayou
Amaury Chamayou (achamayou) merged commit 9e32fc1 into microsoft:main Sep 29, 2026
12 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