8

I run ASP.NET Core web application in a Linux container. I need to provide Windows authentication for my application. How can this be implemented?

I assume that the problem can be solved using a reverse proxy server that can authenticate via Kerberos.

Interloper
  • 790
  • 7
  • 20

1 Answers1

13

Starting with ASP.NET Core 3.0, it is now possible to use Windows Authentication on Linux and MacOS by adding the Microsoft.AspNetCore.Authentication.Negotiate NuGet package, and using this in your Startup.ConfigureServices method:

services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
   .AddNegotiate();

And this in Startup.Configure:

app.UseAuthentication();

And some additional configuration that's described in the documentation.

Gabriel Luci
  • 38,328
  • 4
  • 55
  • 84