Skip to content
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

Merged
merged 4 commits into from
Jun 7, 2024

Conversation

rzikm
Copy link
Member

@rzikm rzikm commented May 14, 2024

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 as NegotiateAuthenticationClientOptions.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.

filipnavara and others added 2 commits May 14, 2024 20:34
…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
Copy link
Contributor

Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones
See info in area-owners.md if you want to be subscribed.

Copy link
Member

@wfurt wfurt left a 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

@filipnavara
Copy link
Member

filipnavara commented May 14, 2024

This one is isolated. I would also like to backport the PR that fixed calculation of channel binding hash (#95898).

@rzikm
Copy link
Member Author

rzikm commented Jun 6, 2024

/azp run runtime

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rzikm
Copy link
Member Author

rzikm commented Jun 6, 2024

/ba-g Test failure is #96407

@wfurt wfurt added the Servicing-approved Approved for servicing release label Jun 7, 2024
@wfurt
Copy link
Member

wfurt commented Jun 7, 2024

approved via email on 6/7

@wfurt wfurt merged commit b040b7a into dotnet:release/8.0-staging Jun 7, 2024
109 of 110 checks passed
@karelz karelz modified the milestones: 8.0.x, 8.0.7 Jun 25, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants