Repository navigation
Account for default Windows NTLM signing in NegotiateStream tests - #138129
Merged
Merged
Conversation
Allow optional signing with ProtectionLevel.None while retaining encryption and endpoint-consistency assertions. Require encryption in the protection mismatch test so default NTLM signing cannot satisfy the server requirement. Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
wfurt
approved these changes
Nov 23, 2026
This was referenced Nov 24, 2026
Member
Author
|
/ba-g Test failures are unrelated |
Member
Author
|
/backport to release/11.0 |
Member
Author
|
/backport to release/10.0 |
Contributor
|
Started backporting to |
Contributor
|
Started backporting to |
This was referenced Nov 24, 2026
lewing
pushed a commit
that referenced
this pull request
Nov 24, 2026
…tream tests (#138197) Backport of #138129 to release/11.0 /cc @rzikm Windows updates released on and after November 10, 2026 [offer NTLM signing by default](https://support.microsoft.com/en-us/servicing/os/windows/docs/2026/11/kb5135557-ntlm-signing-security-improvements), even when an application does not request integrity. This exposes two outdated assumptions in the Windows-only NegotiateStream tests: ProtectionLevel.None implies no signing, and a None-client/Sign-server handshake must fail. The failing assertions concern IsSigned, not IsEncrypted, and affect both CoreCLR and NativeAOT Windows CI. Allow optional signing for the None cases while retaining every encryption assertion, requiring signing for encrypted contexts, and checking that client and server signing agree. Change the negative test's server requirement to EncryptAndSign so default signing cannot satisfy the mismatch. No production code or test skips are changed. ## Customer Impact Test-only change ## Regression No regression in .NET. Caused by Windows update. ## Testing Tests in CI ## Risk Low, test-only change Co-authored-by: Radek Zikmund <[email protected]> Co-authored-by: Copilot App <[email protected]>
lewing
pushed a commit
that referenced
this pull request
Nov 24, 2026
…tream tests (#138198) Backport of #138129 to release/10.0 /cc @rzikm Windows updates released on and after November 10, 2026 [offer NTLM signing by default](https://support.microsoft.com/en-us/servicing/os/windows/docs/2026/11/kb5135557-ntlm-signing-security-improvements), even when an application does not request integrity. This exposes two outdated assumptions in the Windows-only NegotiateStream tests: ProtectionLevel.None implies no signing, and a None-client/Sign-server handshake must fail. The failing assertions concern IsSigned, not IsEncrypted, and affect both CoreCLR and NativeAOT Windows CI. Allow optional signing for the None cases while retaining every encryption assertion, requiring signing for encrypted contexts, and checking that client and server signing agree. Change the negative test's server requirement to EncryptAndSign so default signing cannot satisfy the mismatch. No production code or test skips are changed. ## Customer Impact Test-only change ## Regression No regression in .NET. Caused by Windows update. ## Testing Tests in CI ## Risk Low, test-only change Co-authored-by: Radek Zikmund <[email protected]> Co-authored-by: Copilot App <[email protected]>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Windows updates released on and after November 10, 2026 offer NTLM signing by default, even when an application does not request integrity. This exposes two outdated assumptions in the Windows-only NegotiateStream tests:
ProtectionLevel.Noneimplies no signing, and a None-client/Sign-server handshake must fail. The failing assertions concernIsSigned, notIsEncrypted, and affect both CoreCLR and NativeAOT Windows CI.Allow optional signing for the None cases while retaining every encryption assertion, requiring signing for encrypted contexts, and checking that client and server signing agree. Change the negative test's server requirement to
EncryptAndSignso default signing cannot satisfy the mismatch. No production code or test skips are changed.Validation
On Windows build 26100 with installed .NET 12, a standalone harness compiled the complete two test source files with real xUnit assertions and repository DelayStream, IdentityValidator and timeout helpers. It uses socket streams and standalone test-host adapters, not the repository testhost.
dotnet build .\source-tests.csproj --no-restore --verbosity quiet -p:SourceRoot=<exported-original-sources>followed bydotnet .\bin\Debug\net12.0\source-tests.dll: original sources reproduced the same seven failures; 33 passed, 7 failed.dotnet build .\source-tests.csproj --no-restore --verbosity quietfollowed bydotnet .\bin\Debug\net12.0\source-tests.dll: patched sources passed all 40 cases, covering authentication with delays 0/1 and target names across all 13 variants, plus the protection mismatch test.dotnet run --project .\negotiate-probe.csproj --verbosity quiet: 16 protocol cases passed across synchronous/asynchronous authentication, empty/named targets and four protection-level pairs. Successful cases checked data roundtrips; mismatches checked both AuthenticationExceptions and rejected writes.git diff --check: passed.Full repository build/test suite, NativeAOT execution and old/new Windows Server 2019 container replay were not run. Container-update timing supports the Windows hardening diagnosis but was not A/B tested.
Resolves #138073
Resolves #138074
Note
This PR description and code changes were generated with GitHub Copilot.