question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improved Active Directory and LDAP Integration

See original GitHub issue

Currently the practices in place for the Active Directory/LDAP authentication integrations are not very flexible and make it difficult to work with on a platform running an advanced AD or LDAP implementation.

It is common for larger organizations to leverage many branched out organizational units to effectively handle the management of users within the organization. The existing implementation of ldap.user-bind-pattern for initial bind and user authentication dramatically limits the method of organizing users within an organization and would even block the ability to implement PrestoDB authentication with many larger organizations.

What I would recommend is making a change regarding how these processes are implemented. Creating a new ldap.binddn and ldap.bindpassword configuration property which would be used by the application to connect to the LDAP/AD servers for purposes of doing searches. You would be able to remove the ldap.user-bind-pattern and leverage everything off of the existing ldap.group-auth-pattern for purposes of identifying who a user is and if they should be able to log in.

For example, if you set the following configuration with the above changes:

password-authenticator.name=ldap
ldap.url=ldaps://ldap-server:636
ldap.binddn=CN=User Name,OU=CITY_OU,OU=STATE_OU,DC=domain,DC=domain_root
ldap.bindpassword=password1234
ldap.group-auth-pattern=(&(objectClass=user)(|(sAMAccountName=${USER}))(!(UserAccountControl:1.2.840.113556.1.4.803:=2))(|(memberOf=CN=users,OU=Groups,DC=domain,DC=domain_root)(memberOf=CN=admins,OU=Groups,DC=domain,DC=domain_root)(memberOf=CN=secops,OU=Groups,DC=domain,DC=domain_root)(memberOf=CN=operations,OU=Groups,DC=domain,DC=domain_root)))

You gain the ability to have users organized in whatever fashion you wish them to be within LDAP/AD. They are not locked into a specific organization path, as they currently are. In addition, this specific search will only return results for the user if the are in one of the listed groups, and are an Active account in Active Directory.

The idea is to leverage the power behind Active Directory or LDAP searches for controlling authentication, instead of trying to codify an implementation around a well developed platform. The new process would be to use the ldap.binddn and ldap.bindpassword to look up the users DN in LDAP/AD and then use the provided user provided password to authenticate once the validation of access has already been confirmed using the ldap.binddn user.

In addition, you can potentially have an ldap.bind.anonymous=<bool> option and set it to false so that the ldap.group-auth-pattern is just run against the LDAP/AD server without trying to auth. This is a configuration supported by ldap and can be configured in AD. Though I would suggest that would be a really low priority setup as most people I expect would have the system requiring a ldap.binddn/ldap.bindpassword.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:13
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

5reactions
tomSmidacommented, Feb 5, 2020

Hello,

are there any plans to review/feedback the prePR? Or maybe @theesen would you mind to open the PR, so the momentum would take off a bit? We would appreciate to have this in upstream, since we are facing these exact issues and this would solve it completely. 🙏

4reactions
theesencommented, Jan 12, 2020

Hello,

we had the same issue on our side and started to implement a solution that works for us. But I would love to contribute this back to the project. It would be great to get some feedback on the implementation before doing a PR (especially since I have not done this a lot yet). My fork is still WIP and I have not applied all the implementation ideas yet. But since this is open for a long time already I thought it can’t hurt to kick it off somewhere 😃 Sample Pull Request

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting Up LDAP Integration with Active Directory - Parallels
Integrating LDAP and AD can help you streamline IAM operations in your organization by allowing users to authenticate themselves to on-premises ...
Read more >
Integrating AD with LDAP - Windows Active Directory
Steps to integrate LDAP with AD: · Login to Active Directory using an administrator account. · Scroll down to the LDAP Support section...
Read more >
2020 LDAP channel binding and LDAP signing requirements ...
LDAP channel binding and LDAP signing provide ways to increase the security for communications between LDAP clients and Active Directory domain controllers.
Read more >
Active Directory and LDAP Authentication Guide - DNSstuff
This guide will define LDAP in the context of Active Directory, explain the importance of both for security, and set out best practices...
Read more >
Active Directory Integration with LDAP - YouTube
Do you want to simplify your user management by using Windows domain accounts? When you add LDAP integration to your system, you can:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found