【发布时间】:2019-07-25 08:30:49
【问题描述】:
我在 Linux 容器中运行 ASP.NET Core Web 应用程序。我需要为我的应用程序提供 Windows 身份验证。如何实现?
我假设可以使用可以通过 Kerberos 进行身份验证的反向代理服务器来解决问题。
【问题讨论】:
标签: linux asp.net-core active-directory kerberos
我在 Linux 容器中运行 ASP.NET Core Web 应用程序。我需要为我的应用程序提供 Windows 身份验证。如何实现?
我假设可以使用可以通过 Kerberos 进行身份验证的反向代理服务器来解决问题。
【问题讨论】:
标签: linux asp.net-core active-directory kerberos
从 ASP.NET Core 3.0 开始,现在可以通过添加 Microsoft.AspNetCore.Authentication.Negotiate NuGet 包并在 Startup.ConfigureServices 方法中使用它来在 Linux 和 MacOS 上使用 Windows 身份验证:
services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
.AddNegotiate();
这个在Startup.Configure:
app.UseAuthentication();
还有一些在the documentation 中描述的额外配置。
【讨论】: