Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Core Windows Authentication on Linux [closed]

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.

like image 712
Interloper Avatar asked Jan 26 '23 01:01

Interloper


1 Answers

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.

like image 160
Gabriel Luci Avatar answered Feb 01 '23 06:02

Gabriel Luci