Justin.AspNetCore.LdapAuthentication icon indicating copy to clipboard operation
Justin.AspNetCore.LdapAuthentication copied to clipboard

What's needed to support signing in on Linux

Open mattisking opened this issue 5 years ago • 2 comments

I've got an application I'm supporting written in .Net Core 2.0 and upgraded to 2.1. The author used this whole UserStore stuff and a SQL Server database for security and role assignments and they used your package to replace some parts of it. I need to move this from a Windows host to a Linux vm and I've found that the use of System.DirectoryServices.AccountManagement in the actual auth call to be a non-starter in Linux. I'm not going to pretend to understand how this is done in .Net Core, only that logging in via that library makes the other code that hits the database and pulls in the user work because once they login the User object is federated with valid claims and all that. I thought maybe if I scraped the ldapusermanager out and used that to try to just call checkpassword that might work and I can certainly login this way, but the rest of the magic doesn't happen. The bits that set the User Identity doesn't happen. I honestly don't know what does that. What pieces would need to be fleshed out here? I'd rather add another class or two and keep things working in the pattern that already exists than scrape all that automation out and make each call myself.

It's been a while so I don't know if you monitor this or not but appreciate it either way.

mattisking avatar Aug 10 '20 21:08 mattisking

@mattisking This library does not use System.DirectoryServices.AccountManagement, so there shouldn't be any reason you can continue to use it on a Linux host. In fact, one of the reasons this even exists is because there was no System.DirectoryServices.AccountManagement when .NET Core 1.0 was released.

jusbuc2k avatar Aug 11 '20 12:08 jusbuc2k

Oh I know. I looked at the code. I had a login page for Windows I added in the React front end. In the controller (.Net Core) when I used System.Directory.AccountManagement for logging in all the rest of my controller calls just worked with the UserStore stuff with your library. I didn’t have to do anything. When I yanked out that library because of Linux I implemented the same login using the new Protocols library and then I tried using your LDAP library directly but the UserStore stuff is broken now. That AccountManagement library I used set something that made everything else work seamlessly. That’s what I’m trying to figure out.

Thank you for replying either way. This functionality was lifted from a Core MVC application using Razor. We took the controllers and all underlying functionality which was already working and moved it into a react-core templated application.

Matt

On Tue, Aug 11, 2020 at 8:35 AM Justin Buchanan [email protected] wrote:

@mattisking https://github.com/mattisking This library does not use System.DirectoryServices.AccountManagement, so there shouldn't be any reason you can continue to use it on a Linux host. In fact, one of the reasons this even exists is because there was no System.DirectoryServices.AccountManagement when .NET Core 1.0 was released.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jusbuc2k/Justin.AspNetCore.LdapAuthentication/issues/13#issuecomment-671919608, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADEUCHVBSZTODTDT2KVIEDSAE3JDANCNFSM4P2L73GQ .

mattisking avatar Aug 11 '20 14:08 mattisking