-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose SNI hostname via a feature #34525
Comments
Is it available on http.sys or IIS? |
@alanwest @cijothomas Y'all might be interested in this for open-telemetry/opentelemetry-dotnet#2159 if you wish to add the |
@Tratcher Is there somewhere else I should be looking? aspnetcore/src/Shared/HttpSys/NativeInterop/HttpApiTypes.cs Lines 261 to 272 in 640b77f
|
Thanks for contacting us. We're moving this issue to the |
Microsoft.Extensions.Features targets
|
What are you trying to modify in Microsoft.Extensions.Features? I thought the features you needed to change were in Microsoft.AspNetCore.Http.Features? |
Oops. I meant Line 5 in 23b7049
|
Ah. I guess we'll have to put it on ITlsConnectionFeature instead.
|
This comment has been minimized.
This comment has been minimized.
We think it's better to add an additional feature interface to Connection.Abstractions rather than adding this to namespace Microsoft.AspNetCore.Connection.Abstractions
{
+ public interface ITlsServerNameFeature
+ {
+ string? ServerName { get; }
+ }
} |
Related: #35123 |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Blocked on dotnet/runtime#57105 |
Un-backlogging since we're no longer blocked on runtime |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Triage: |
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
Thanks for contacting us. We're moving this issue to the |
namespace Microsoft.AspNetCore.Connections.Features;
public interface ITlsHandshakeFeature
{
+ #if NETCOREAPP
+ /// <summary>
+ /// Gets the host name from the "sever_name" extension of the client hello if present.
+ /// See <see href="https://www.rfc-editor.org/rfc/rfc6066#section-3">RFC 6066</see>.
+ /// </summary>
+ string? HostName => null;
+ #endif
} Note: We already do a similar aspnetcore/src/Servers/Connections.Abstractions/src/Features/ITlsHandshakeFeature.cs Lines 22 to 27 in 6470682
|
API Review Notes:
API Approved! namespace Microsoft.AspNetCore.Connections.Features;
public interface ITlsHandshakeFeature
{
+ #if NETCOREAPP
+ /// <summary>
+ /// Gets the host name from the "sever_name" extension of the client hello if present.
+ /// See <see href="https://www.rfc-editor.org/rfc/rfc6066#section-3">RFC 6066</see>.
+ /// </summary>
+ string? HostName => null;
+ #endif
} |
We decided that there was no reason to distinguish between the client sending an empty host name using SNI, the client not using SNI, and a server that doesn't support this feature in the PR. The reason the SNI host name is unavailable should not change how it's handled. This means it should be simpler to make Here's the updated API proposal: namespace Microsoft.AspNetCore.Connections.Features;
public interface ITlsHandshakeFeature
{
+ #if NETCOREAPP
+ /// <summary>
+ /// Gets the host name from the "sever_name" extension of the client hello if present.
+ /// See <see href="https://www.rfc-editor.org/rfc/rfc6066#section-3">RFC 6066</see>.
+ /// </summary>
+ string HostName => string.Empty;
+ #endif
} |
Thank you for submitting this for API review. This will be reviewed by @dotnet/aspnet-api-review at the next meeting of the ASP.NET Core API Review group. Please ensure you take a look at the API review process documentation and ensure that:
|
API Review Notes:
API Approved as merged! namespace Microsoft.AspNetCore.Connections.Features;
public interface ITlsHandshakeFeature
{
+ #if NETCOREAPP
+ /// <summary>
+ /// Gets the host name from the "sever_name" extension of the client hello if present.
+ /// See <see href="https://www.rfc-editor.org/rfc/rfc6066#section-3">RFC 6066</see>.
+ /// </summary>
+ string HostName => string.Empty;
+ #endif
} |
We currently do not expose the SNI hostname via a feature interface
aspnetcore/src/Servers/Kestrel/Core/src/Internal/TlsConnectionFeature.cs
Lines 52 to 53 in 640b77f
namespace Microsoft.AspNetCore.Http.Features { public interface ITlsHandshakeFeature { + string? HostName { get; } } }
Given that it's already a property on the
TlsConnectionFeature
we can trivially expose it.The text was updated successfully, but these errors were encountered: