-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[release/8.0] Fix NegotiateStream connections between Linux clients and Windows servers #102216
Conversation
…vers (dotnet#99909) * Send the NegotiateSeal NTLM flag when client asked for ProtectionLevel.EncryptAndSign. Process the last handshake done message in NegotiateStream. In case of SPNEGO protocol it may contain message integrity check. Additionally, if the negotiated protocol is NTLM then we need to reset the encryption key after the message integrity check is verified. * Add test for the NegotiateSeal flag * Fix the test * Dummy commit * Fix the new _remoteOk logic in NegotiateStream to fire only when HandshakeComplete. If HandshakeComplete is not true, then the authentication blob will get processed with the normal flow. * Fix the value of NegotiateSeal in the final authentication message of Managed NTLM
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones |
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.
LGTM. Assuming this does not depend on any other 9.0 fixes.
cc: @filipnavara
This one is isolated. I would also like to backport the PR that fixed calculation of channel binding hash (#95898). |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g Test failure is #96407 |
… into 99909-release-8.0
approved via email on 6/7 |
Manual backport of #99909
Fixes #99227
Customer Impact
Reported by customer via official support channel - they need same behavior on Linux, which works also on Windows and on .NET Framework.
Customers were facing issues when connecting from Linux to Windows when using the
ProtectionLevel.EncryptAndSign
value asNegotiateAuthenticationClientOptions.RequiredProtectionLevel
. This scenario is common when connecting to WCF services hosted on Windows using WCF clients on Linux.The bug affects primarily Android clients -- that is where the Managed NTLM implementation is used. We also allow the Managed NTLM as opt-in on macOS and Linux which would be likewise affected if the developer chooses to enable the
System.Net.Security.UseManagedNtlm
app context switch (which is rare).Regression
No
Testing
Unit test was added. Validated by customer who reported the issue via official servicing channel.
Risk
Low; the modified code path is in platform specific code for a single authentication scheme. There is test coverage for the change.