mTLS: Flow SNI HostName, add NegotiatedCipherSuite#9788
Merged
ReubenBond merged 2 commits intodotnet:mainfrom Nov 18, 2025
Merged
mTLS: Flow SNI HostName, add NegotiatedCipherSuite#9788ReubenBond merged 2 commits intodotnet:mainfrom
HostName, add NegotiatedCipherSuite#9788ReubenBond merged 2 commits intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
NegotiatedCipherSuiteandHostNameproperties toITlsHandshakeFeatureinterface andTlsConnectionFeatureimplementation, 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 |
src/Orleans.Connections.Security/Security/TlsConnectionFeature.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
OnAuthenticateAsClientcan be used to set the target host name for SNI viaTlsClientAuthenticationOptions.TargetHost.