Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anonymous bind + user bind + password hash #188

Open
rmfrankch opened this issue Jun 19, 2019 · 2 comments
Open

anonymous bind + user bind + password hash #188

rmfrankch opened this issue Jun 19, 2019 · 2 comments

Comments

@rmfrankch
Copy link

Our openLdap server always requires binding with an account. It will fail with an anonymous bind. Thus, we have a technical user and password with which we bind and execute searches.

Our LDAP will not ever release a password (even as hash), thus I cannot use that field to verify the user's password. Instead, I have to bind to LDAP using the user's password ,

So, in order to verify a user's password, I need to:
connect
start TLS
bind with the technical user
fetch the user's record (we have special attributes with which we can search for either the shortname (uid) or the email address)
then use the cn of that record to rebind using the user's password.

If the last step succeeds, I have the correct password, otherwise not.

LDAP modules of other applications (i.e. RT4) offer this option, this one doesn't. Could this be implemented?
Implementing startTLS is easy, it only requires calling the ldap_start_tls function and checking for a true or false. (Of course there's more to it, but not on the programming side.) We'd need some configuration flag to use or not use TLS, though.

@whikloj
Copy link

whikloj commented Jun 9, 2020

I have (seemingly) the exact same use case. LDAP does not return a password (hashed or otherwise), instead for other uses we bind with the technical user find the correct user and try to bind as them.

@whikloj
Copy link

whikloj commented Jun 10, 2020

Never mind, the module works. I had used my LDAP account associated password for the admin user so I couldn't login because it Could not synchronize the following users in LDAP:.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants