-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[release/8.0] AppContext for HttpSys CBT hardening #64296
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
base: release/8.0
Are you sure you want to change the base?
Conversation
|
Hi @@BrennanConroy. If this is not a tell-mode PR, please make sure to follow the instructions laid out in the servicing process document. |
There was a problem hiding this 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 PR introduces an opt-in AppContext switch to enable Channel Binding Token (CBT) hardening for HTTP.Sys applications, allowing partner teams to set hardened security for their HTTP.Sys endpoints.
- Adds new native interop types
HTTP_AUTHENTICATION_HARDENING_LEVELSenum andHTTP_CHANNEL_BIND_INFOstruct to support CBT hardening configuration - Implements AppContext switch
Microsoft.AspNetCore.Server.HttpSys.EnableCBTHardeningto conditionally apply medium-level authentication hardening during UrlGroup initialization - Removes unused using statements from HttpApiTypes.cs
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Shared/HttpSys/NativeInterop/HttpApiTypes.cs | Defines native interop types for CBT hardening (enum and struct) and removes unused using statements |
| src/Servers/HttpSys/src/NativeInterop/UrlGroup.cs | Implements opt-in CBT hardening in UrlGroup constructor via AppContext switch, sets HttpServerChannelBindProperty when enabled |
| var channelBindingSettings = new HTTP_CHANNEL_BIND_INFO | ||
| { | ||
| Hardening = HTTP_AUTHENTICATION_HARDENING_LEVELS.HttpAuthenticationHardeningMedium, | ||
| ServiceNames = IntPtr.Zero, | ||
| NumberOfServiceNames = 0, | ||
| }; |
Copilot
AI
Nov 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The HTTP_CHANNEL_BIND_INFO struct has a Flags field (see line 666 in HttpApiTypes.cs) that should be set, following the pattern used in other property setters in this class (e.g., SetDelegationProperty, AttachToQueue, SetMaxConnections). Consider setting Flags = (uint)HttpApiTypes.HTTP_FLAGS.HTTP_PROPERTY_FLAG_PRESENT to indicate the property is present.
AppContext for HttpSys CBT hardening
Description
Request from a partner team to allow setting hardened security for their HTTP.Sys applications.
Customer Impact
By default there is no impact, this change is opt-in. If the change is enabled then it sets hardened security for the endpoints exposed by the HTTP.Sys application.
Regression?
Risk
Purely opt-in change. We've also verified the change with the partner team.
Verification
Packaging changes reviewed?