Skip to content

mTLS: Flow SNI HostName, add NegotiatedCipherSuite#9788

Merged
ReubenBond merged 2 commits intodotnet:mainfrom
ReubenBond:feature/tls-sni
Nov 18, 2025
Merged

mTLS: Flow SNI HostName, add NegotiatedCipherSuite#9788
ReubenBond merged 2 commits intodotnet:mainfrom
ReubenBond:feature/tls-sni

Conversation

@ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Nov 18, 2025

This pull request enhances the TLS connection feature set by introducing support for negotiated cipher suites and SNI (Server Name Indication) host name retrieval.

Updated XML documentation to clarify that OnAuthenticateAsClient can be used to set the target host name for SNI via TlsClientAuthenticationOptions.TargetHost.

Copilot AI review requested due to automatic review settings November 18, 2025 00:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request enhances TLS connection features in Orleans by adding support for negotiated cipher suites and SNI (Server Name Indication) hostname retrieval, while also preparing the codebase for .NET 10.0+ by marking legacy cryptographic properties as obsolete.

Key Changes:

  • Introduced NegotiatedCipherSuite and HostName properties to ITlsHandshakeFeature interface and TlsConnectionFeature implementation, enabling applications to access TLS negotiation details
  • Updated middleware to capture SNI hostname from client hello messages on the server side, even when using fixed certificates
  • Marked legacy cryptographic properties (CipherAlgorithm, HashAlgorithm, etc.) as obsolete for .NET 10.0+ with appropriate pragma directives

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Orleans.Connections.Security/Security/ITlsHandshakeFeature.cs Added NegotiatedCipherSuite and HostName properties to the interface with default implementations; marked legacy crypto properties as obsolete for .NET 10.0+
src/Orleans.Connections.Security/Security/TlsConnectionFeature.cs Implemented new NegotiatedCipherSuite and HostName properties; added pragma directives to suppress obsolete warnings for legacy properties on .NET 10.0+
src/Orleans.Connections.Security/Security/TlsServerConnectionMiddleware.cs Enhanced server certificate selection to capture SNI hostname in all scenarios; populated NegotiatedCipherSuite from SslStream post-handshake
src/Orleans.Connections.Security/Security/TlsClientConnectionMiddleware.cs Populated NegotiatedCipherSuite property from SslStream after successful client authentication
src/Orleans.Connections.Security/Security/TlsOptions.cs Enhanced XML documentation to clarify that OnAuthenticateAsClient can be used to configure SNI via TlsClientAuthenticationOptions.TargetHost

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@ReubenBond ReubenBond enabled auto-merge November 18, 2025 00:58
@ReubenBond ReubenBond added this pull request to the merge queue Nov 18, 2025
Merged via the queue into dotnet:main with commit b741a7a Nov 18, 2025
29 checks passed
@ReubenBond ReubenBond deleted the feature/tls-sni branch November 18, 2025 01:51
@github-actions github-actions bot locked and limited conversation to collaborators Dec 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments