4

I'm planning to use identityserver4 with an LDAP scenario. Is it a possible and reasonable attempt ? :) I thought I should implement a LoginService like QuickStart.UI's InMemoryUserLoginService.

And When IS4 will be released officially? Any info about that?

Thanks and regards.

3 Answers3

15

I know it's an old question, but I worked recently on the Ldap (Active Directory or OpenLdap) + IdentityServer4. I created a nuget package and on the github repository you can find an implementation sample.

Here's the Nuget: https://www.nuget.org/packages/IdentityServer.LdapExtension/

I hope it can helps

Nordes
  • 2,493
  • 2
  • 21
  • 30
  • 1
    Thanks i have viewed the nuget can we use individual user login and LDAP togather.... – Muhammad Nasir Mar 21 '21 at 00:01
  • It's up to you regarding the implementation. But what someone pushed as a change was to use multiple LDAP directory depending on a regex (something like that). So we can look in AD 1, then 2... or based on regex (user starts with A go in AD 1). For different type of system, you have to implement it yourself. Even ad is supposed to be implemented by yourself. My package was at first a PoC, but it's good enough for some people in their organisation. – Nordes Apr 15 '21 at 21:40
2

It's possible and reasonable, it's something you will have to implement on your own which follows the same principle as many other things related to IdentityServer.

We have successfully connected our IdSrv4 to Active Directory using the System.DirectoryServices and System.DirectoryServices.AccountManagement namespaces. Sadly this requires us to run IdSrv4 using full .NET framework since these namespaces haven't been implemented in .NET Core yet.

Reminder: Lookup the area "LDAP injections" before launching your solution, to be on the safe side.

Pang
  • 9,564
  • 146
  • 81
  • 122
Jonas
  • 3,155
  • 5
  • 35
  • 55
  • I implemented LDAP authentication with an ASP.Net Core .NET Framework IdentityServer Project and tested it with an ASP.Net Core Framework MVC Client. – ozgurozkanakdemirci Dec 30 '16 at 18:34
  • Using the System.DirectoryServices and/or System.DirectoryServices.AccountManagement? – Jonas Dec 30 '16 at 18:45
  • I implemented LDAP authentication with an ASP.Net Core.NET Framework IdentityServer Project and tested it with an ASP.Net Core Framework MVC Client. As an Web Api Project I added ASP.NET 4.5.2 Web Api Project and now trying to add IdentityServer4 support to the webapi project. I remembered your reply stating "full .NET framework implementation". Is it possible to add Core Framework implemented IS4 to a 4.5.2 web api project. do you have any experience? I got fears about using ASP.NET Core regarding to such differences and possible compatibility issues.(System.DirectoryServices and Accountmana) – ozgurozkanakdemirci Dec 30 '16 at 18:54
  • System.DirectoryServices and System.DirectoryServices.AccountManagement – ozgurozkanakdemirci Dec 30 '16 at 19:03
  • There is a nuget package for your webapi project which enables accesstoken validation. Using that nuget package you will be able to connect your web api to your IdSrv4 which is hosted using ASP.NET Core but with dependency towards full .net framework since you currently are using System.DirectoryServices and System.DirectoryServices.AccountManagement. – Jonas Dec 30 '16 at 19:22
  • Thanks. Is the nuget applicable for a pure 4.5.2 web api project? not for an asp.net core framework project. really appreciate... :) – ozgurozkanakdemirci Dec 30 '16 at 19:37
  • The access token validation middleware nuget package for idsrv4 (listed here https://identityserver4.readthedocs.io/en/release/intro/packaging.html) is for asp.net core projects, but I see no issue using the equivalent access token validation middleware nuget package for identityserver3 (listed here https://identityserver.github.io/Documentation/docsv2/overview/packaging.html) in a old webapi asp.net project. Im currently trying to get a mvc client in .net 4.6 work towards idSrv4 so mixing idsrv versions seems to be no issue really. – Jonas Dec 30 '16 at 19:44
0

IdentityServer4 1.0.0 was released to NuGet on December 22, 2016: https://www.nuget.org/packages/IdentityServer4/1.0.0

Brock Allen
  • 7,385
  • 19
  • 24