Better LDAP configuration testing
90% of the LDAP issues we see are configuration issues, either because someone missed something in the docs, or we weren't clear enough for what we're asking for.
I'd like us to implement a more useful LDAP configuration test. We currently check to see whether or not we can connect, etc, but I'd like to extend that out to test whether or not we can actually browse the OUs. I feel like this would solve a lot of our LDAP-related questions for users.
Maybe something like a multi-step wizard that tests along the way.
Looking at using http://www.jquery-steps.com/GettingStarted for the wizard. If we can integrate it well, we may want to replace the quick start with this interface as well.
Indeed. It's not so much connecting snipe to AD, I think that works very well. (maybe a clearer output) But managing the OU's / locations is a bit confusing. It would be nice to browse the parent OU and then select the nested ones as locations, hence having the correct users and therefore their assets assigned to that location. Also, what will happen if a user in that OU is disabled in AD and with assets assigned to him? And, what if that OU is moved or deleted?
The ldap support also needs some better error handling - especially in the autogenerate user on first login from ldap case (I had to throw exceptions in before the return false stages to figure out what was failing) and some better checking for ldap field names being correct and present
Also, it would be better if we can grab user attributes form AD how to get it any concerns
@auroraeosrose i agree with you, and thank you for providing an example! the LDAP-configuration process as well as the user-sync process could both benefit from a "redirection" of errors/warnings and other background-information to the end user. i really like @snipe's OU/ldap-browser "pre-sync" idea, mashed up maybe a little bit more of a guided LDAP process. your idea of adding depth to the user-sync process is terrific. With regard to the user-autogenerate-on-first-login - do you recall what the error was specifically that you trapped?
@thanukalpa - this is intriguing - can you please provide a use-case, or perhaps just sum up how your life would be made easier, with regard to user-attribute/concern-handling?
Thank you all for your feedback!
One thing to keep in mind:
improving the current Snipe-IT LDAP Features & User Syncing to include all those things we want is much more difficult than may appear, due to some of the differences between Active Directory and non-AD LDAP situations. On top of that, there is a 3rd level of unique issues that I have seen when connecting to cloud-based "directory" providers (onelogin, jumpcloud, etc.) In short, this can make moving forward difficult due to the amount of testing required.
If there is anything unique about your painful LDAP-experiences that falls under these categories:
- Nested AD OUs and/or problems with very large directories
- AD on Azure (or run on cloud-infrastructure Microsoft Domain Controllers)
- non-AD, on premise LDAP
- a SaaS/hosted non-AD LDAP Provider
- or another managed, hosted Active Directory provider
LDAP issues that fall under one of the above are tremendously helpful at this time! if you are currently having an issue with your Snipe-IT LDAP, or if you found a weird "gotcha" that fixed your situation, we want to hear about it!
TLDR: if your LDAP is NOT on premise Active Directory managed by you and your team (or heck, even if it is), if you did something unique to make it work, or if you think there might be a large-picture manner to approach these problems - let me know!
Thanks again :+1:
@HinchK I was trapping "user not found" even though the bind was successful - the code currently does a bind to check auth and then looks up user info to autogenerate a new user
The trap pointed out the casing issue from #6375 that's already been fixed - the user was properly authenticating but couldn't be found properly in ldap - but after that I was also trapping errors in user creation because the set field names for ldap didn't exist/were empty and the user creation was bombing
https://github.com/snipe/snipe-it/blob/master/app/Models/Ldap.php#L161 is where the mapper is, the default is just to show "empty" if that field doesn't exist... except that then fails when generating new users
I really think just testing to at least make sure the provided settings actually appear if you fetch an ldap entry would help. A simple isset check on each key when filling that info in, and blocking saving the settings if the directory doesn't even have those keys :)
@HinchK Thank you for a great reply. could you please help me to grab my ad user account departments such as other attributes? We are using on-Prem AD server and I also synced it to Snipe-IT. User loggings are working smoothly. User departments not synced User Locations recently synced from LDAP Search OU feature
@thanukalpa that is currently not possible; at this time only users can be pulled in from LDAP. We are evaluating possible expansions of the LDAP sync (such as Departments), however such a feature is not currently scheduled for any upcoming releases.
@auroraeosrose thank you for your notes and your direction ma'am! I would be happy to check out the utility of the isset, and am making a note for next week as we turn a corner in our development of the upcoming v5 release.
One thing I'd like to note regarding "user not found": this is a generic response from LDAP Servers for authentication failures. So when it says "user not found", that could also mean that a password is wrong. This is by design to thwart dictionary attacks. Probably not applicable to you @auroraeosrose, but it's something that I had to look up myself a few months ago.
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
This issue has been automatically closed because it has not had recent activity. If you believe this is still an issue, please confirm that this issue is still happening in the most recent version of Snipe-IT and reply to this thread to re-open it.
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!
Your LDAP group sync is also making massive assumptions.. that all your users reside in OUs based upon permissions. That’s not what active directory (or any other ldap standard is for). Memberships of security groups grant access time resources..
There is a very real and extremely valuable methodology to managing role based access models.. Called: IGDLA.
Remove the groupDN and add LDAP search Query to each group. Or better still, allow administrators the option to press-select AD groups and bind to them via the gui.
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
Am assuming this one can be closed now. With the v5 improvements, as long as the LDAP FILTER is a properly RCC compliant format, then yes I’d be more than happy to close.
On 25 Dec 2020, at 20:23, stale[bot] [email protected] wrote:
Is this still relevant? We haven't heard from anyone in a bit. If so, please comment with any updates or additional detail. This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Don't take it personally, we just need to keep a handle on things. Thank you for your contributions!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.
Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know!