-
Notifications
You must be signed in to change notification settings - Fork 5.2k
NegotiateAuthentication: Implement additional API surface #71777
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
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsUpdated unit tests Contributes to #70909
|
b2ca130 to
d6f8157
Compare
Updated unit tests Migrate System.Net.Mail to use NegotiateAuthentication API
…otiateAuthentication
d6f8157 to
fed4d67
Compare
|
Rebased to resolve conflicts. |
| // is negotiated. | ||
| if (OperatingSystem.IsLinux()) | ||
| { | ||
| protectionLevel = ProtectionLevel.EncryptAndSign; |
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.
Is there harm of doing it also on Windows/macOS?
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.
(FWIW: this is not a new check in this PR, it is just re-indented existing one)
In theory it would be fine on all systems but I don't have sufficient data to confirm. The negotiated protocol can end up being either Kerberos or NTLM. If it's Kerberos on Linux/macOS we get forced confidentiality anyway. For all other scenarios it could result in unilaterally bumped security requirements from the client side. If the server is Exchange then it would work. If the server is something running on an embedded device with Cyrus SASL backend I would not be so sure that everything would still work (notably the NTLM implementation in Cyrus is not even interoperable with Windows 11 in default configuration).
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.
Short version: It's mostly just being cautious.
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.
That is fine. I was nice to see less platform specific code through this PR and if we could avoid one more platform check I would be happy. But even with it it seems like great improvement.
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.
thanks for big cleanup in SMTP @filipnavara
|
Thanks for review! I'm very happy that we managed to get the API in at the last minute :-) |
Best reviewed commit by commit.
Fixes #70909