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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With