yammer / dropwizard-auth-ldap

Dropwizard Authentication Module for LDAP using JNDI.
Apache License 2.0
36 stars 17 forks source link

DN lookup #19

Open fwPunsher opened 7 years ago

fwPunsher commented 7 years ago

Are there any plans to add a feature to lookup the userDN before trying the bind? In the current implementation the authentication will only work if all users trying to logon are placed in the same OU (namely the one specified via userFilter).

I would welcome something like something like: -making userFilter an actiual user (RFC compliant) LDAP Filter like eg "(objectClass=User)" -adding an option for a base dn for searches -adding an option for search Scope -adding an option for bindDN -adding an option for bindPW -replacing the toUserDN function with a function that searches for the user with the above options and returns the dn of the user if found. -using the returned dn for checking the password by opening another LDAP connection.

chrisgray commented 7 years ago

I agree it's pretty simple and restrictive at the moment. All your suggestions sound great!

mattharr commented 6 years ago

Hi,

I needed to authenticate against Active Directory, so had to do a bit of work to do user searching and lookup.

Would this be of interest if I try put together a pull request for this?

Cheers,

Matt