Skip to content

NegotiateAuthentication failed authentication doesn't notify of TargetUnknown #126337

@mconnew

Description

@mconnew

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions