How to perform Windows authentication from apache

Viewed 131

I need some help to configure Windows authentication from Apache. What I've done so far is:

  1. I create a new simple project (the default) of .net core from visual studio.

  2. I add this line: services.AddAuthentication(NegotiateDefaults.AuthenticationScheme).AddNegotiate(); to the Startup.ConfigureServices.

  3. Then I add this line: app.UseAuthentication(); to Startup.Configure.

  4. if I run the project from the IIS, I was able to see the user.

  5. if I run the project from Apache (CentOS), I get this:

    fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
       An unhandled exception has occurred while executing the request. System.PlatformNotSupportedException: Windows Principal functionality is not supported on this platform.
    at System.Security.Principal.WindowsIdentity.GetCurrent()
    
  6. The machine is joined to the domain.

I'm sure that there is other thing I need to configure (SPN, Service account) but I don't now the order and the steps.

0 Answers
Related