Skip to content

Conversation

@wfurt
Copy link
Member

@wfurt wfurt commented Jan 9, 2026

... and use our own managed implementation instead.

fixes #111639
contributes to #122371

@wfurt wfurt requested review from a team and Copilot January 9, 2026 23:22
@wfurt wfurt self-assigned this Jan 9, 2026
@wfurt wfurt added this to the 11.0.0 milestone Jan 9, 2026
@dotnet-policy-service
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
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes NTLM authentication tests on platforms with broken GSSAPI implementations (specifically Ubuntu 24) by enabling the managed NTLM implementation for those platforms instead of relying on the native GSSAPI. This allows previously failing or skipped tests to run successfully.

Key changes:

  • Introduces a platform-specific flag to enable managed NTLM implementation on Ubuntu 24
  • Removes the ActiveIssue attribute that was previously skipping the test on Ubuntu 24+
  • Modifies NTLM availability detection to include the managed implementation case

public class NegotiateAuthenticationTests
{
private static bool IsNtlmAvailable => Capability.IsNtlmInstalled() || OperatingSystem.IsAndroid() || OperatingSystem.IsTvOS();
private static bool UseManagedNtlm = PlatformDetection.IsUbuntu24;
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The static field UseManagedNtlm does not follow the naming convention for private static fields. According to the .editorconfig, private static fields should be prefixed with s_ and use camelCase. This field should be renamed to s_useManagedNtlm.

Copilot uses AI. Check for mistakes.
public class NegotiateAuthenticationTests
{
private static bool IsNtlmAvailable => Capability.IsNtlmInstalled() || OperatingSystem.IsAndroid() || OperatingSystem.IsTvOS();
private static bool UseManagedNtlm = PlatformDetection.IsUbuntu24;
Copy link

Copilot AI Jan 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider using PlatformDetection.IsUbuntu24OrHigher instead of PlatformDetection.IsUbuntu24. The current implementation only targets Ubuntu 24.x specifically, but the GSSAPI issue mentioned in the PR description likely affects Ubuntu 25 and future versions as well. Using IsUbuntu24OrHigher would ensure the managed NTLM implementation is also used on newer Ubuntu versions where the same GSSAPI issue exists.

Suggested change
private static bool UseManagedNtlm = PlatformDetection.IsUbuntu24;
private static bool UseManagedNtlm = PlatformDetection.IsUbuntu24OrHigher;

Copilot uses AI. Check for mistakes.
@richlander
Copy link
Member

Can you test with runtime-extra-platforms as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Net.Security.Tests.NegotiateAuthenticationTests.Package_Unsupported_NTLM fails on Ubuntu 24 arm64

3 participants