-
Notifications
You must be signed in to change notification settings - Fork 5.4k
NegotiateAuthentication failed authentication doesn't notify of TargetUnknown #126337
Description
Description
When attempting to initialize the security context, on Windows, if the native error code returned is SecurityStatusPalErrorCode.TargetUnknown, this is currently mapped to NegotiateAuthenticationStatusCode.GenericFailure. On unix, the equivalent error(s) would be the major error code is GSS_S_FAILURE, the minor error code is KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN. This also gets mapped to GenericFailure.
Reproduction Steps
No minimal repro possible as requires server/client infrastructure in a domain
Expected behavior
If a non-existent SPN is specified as the target, the NegotiateAuthenticationStatusCode statusCode should be TargetUnknown (value 14).
Actual behavior
You will get NegotiateAuthenticationStatusCode.GenericFailure returned
Regression?
No, just an omission in the original implementation.
Known Workarounds
No response
Configuration
No response
Other information
No response