-
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] Do not throw PNSE exception from NegotiateAuthentication constructor #91753
[release/8.0] Do not throw PNSE exception from NegotiateAuthentication constructor #91753
Conversation
… report Unsupported status instead
Tagging subscribers to this area: @dotnet/ncl, @bartonjs, @vcsjones Issue DetailsFixes #91131. This is a stripped down version of PR #91160 with more targeted fix and same unit test. Unlike #91160 it doesn't try to fix which status code is reported and always reports [TBD: Fill in the template; this is currently a draft to get a CI run]
|
Failures are instances of known infra issue #91705 |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
@karelz I see you approved this, but then also self-assigned it. Do you want to do something additional with it, or can we add the |
@carlossanlop we are still waiting on E2E customer validation - see #91131 (comment) |
@artl93 another issue ready for your approval - regression against 7.0 - see context in the template. |
M2 Approved. |
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.
M2 approved.
Fix confirmed to work, see #91131 (comment) |
Fixes #91131
This is a stripped down version of 9.0 (main) PR #91160 with more targeted fix and same unit test.
Unlike #91160 it doesn't try to fix which status code is reported and always reports
Unsupported
. This is in line with the .NET 7 behavior.Customer Impact
Regression against 7.0.
Due to refactoring in the space, on Android and tvOS we started throwing
PlatformNotSupportedException
forCredentialCache.DefaultCredentials
instead of returningStatusCode
=HttpStatusCode.Unauthorized
(401) as we did in 7.0.For context:
PlatformNotSupportedException
for this case, but it was inconsistent across platforms - it sometimes threwWin32Exception
or even internalGssApiException
.HttpClient
to handle these exceptions and return 401 HTTP status code. How it should behave, depends if one looks at it from the low-level API perspective (NegotiateAuthentication
), or from higher-level API perspective (HttpClient
) - see discussion in Android NTLM: Empty Credentials now throws PlatformNotSupportedException #91131.Testing
Unit test is added to simulate the customer scenario. It fails without the fix and succeeds with it.
E2E validation by customer on private build of 8.0 branch - see #91131 (comment)
Risk
Low
Affects only managed NTLM implementation, which is used only on Android and tvOS. Changes only error handling, not main code path.