veo-labs / ldap-server-mock

Really simple basic mock for LDAP server
GNU Affero General Public License v3.0
66 stars 26 forks source link

Can we search by multiple criteria #20

Closed Unit111 closed 2 years ago

Unit111 commented 2 years ago

We are using the mock server for a few months now and everything is great. The system we test used to use the attribute "sAMAccountName" to search for users so our config looked like that: { "port": 3004, "userLoginAttribute": "sAMAccountName", "searchBase": "DC=hedgeservtest,DC=com", "searchFilter": "(sAMAccountName={{user}})" } The problem is that due to recent changes we now have to search by email in some cases. So we changed the config { "port": 3004, "userLoginAttribute": "mail", "searchBase": "DC=hedgeservtest,DC=com", "searchFilter": "(mail={{user}})" } But I am not sure how to combine both of those so we can search by both. I tried to change the filter like that "|("(mail={{user}})"(mail={{user}}))" but I've no idea what to do with "userLoginAttribute". Is this use case even possible with this server?

maxime-beguin commented 2 years ago

Hi!

Sorry it is actually not possible to search by multiple criterias using this mock server. I keep that in mind to add it in a future release.

Thank you for your feedback.