Authenticate against Active Directory in .NET Core 1.0 application?

两盒软妹~` 提交于 2019-11-30 11:50:16

问题


With the recent release of .NET Core 1.0, we're in the process of migrating our RC1 applications to the final release. The only piece we can't seem to figure out is how to integrate Active Directory authentication.

Previously in the RC1 applications, we had used the System.DirectoryServices.AccountManagement library to handle the LDAP authorization queries. However, we can no longer mix this library with .NET Core v1.

Generally, what is the best way to integrate Active Directory authentication into our applications using the libraries available for use in the .NET Core framework? IdentityServer, some other third party service like Auth0 or something else?


回答1:


The Novell.LDAP library has been ported to .NET Core you can find it in NuGet. There are numerous samples available, including a verify password sample.




回答2:


Best is subjective, really there's only one way right now, given the missing DirectoryServices namespace (which is planning for 1.1) - federation.

You'd have to install ADFS, and expose it to the internet. Then you configure it to act as an OAuth2 endpoint, and use the generic OAuth middleware to redirect logins to your ADFS server. You could also install the latest ADFS beta, which needs the latest Windows Server beta, and use OpenID Connect, but that's a lot of beta risks you may not find acceptable.

Or, if you just want the latest MVC pieces, run it on .NET Desktop, where you have full access to the directory services namespace.




回答3:


The System.DirectoryServices namespace is currently being implemented in .NET Core, work is ongoing. https://github.com/dotnet/corefx/issues/2089




回答4:


Just want to say that they just issued a pre-release of the Microsoft.Windows.Compatibility which contains the System.DirectoryServices components needed to integrating with Active Directory

https://www.nuget.org/packages/Microsoft.Windows.Compatibility/2.0.0-preview1-25914-04



来源:https://stackoverflow.com/questions/38084421/authenticate-against-active-directory-in-net-core-1-0-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!