vjeantet / ldapserver

Package ldapserver implements LDAP Server
MIT License
250 stars 93 forks source link

Usage examples? #31

Open jdkruzr opened 4 years ago

jdkruzr commented 4 years ago

Hi,

I can't tell from the "complex" code what search strings should return success or what bind user should work, and for that matter am a little confused as to where it is getting/storing its data. Can someone update the documentation with this?

Thanks!

ThomasWidmann commented 3 years ago

Hi,

don't know, if I can help you.

I am implementing a ldap connector for cidaas. I am implementing a ldap connector for cidaas. This allows software solutions that still authenticate their users based on LDAP to use a modern IAM via this connector.

This ldap service is very suitable for this. Thank you @vjeantet

You have to proceed as follows for the implementation:

  1. for an administrative bind (client authentication), implement a corresponding check against the BackEnd (in my case cidaas) in the bind function accordingly. This service does not want to mandate a database.

I then manage the client session in the connector so that I can manage the different client connections.

Then I offer the user bind (user authentication), whereby the previously authenticated client checks the user credentials.

Finally, I implement a search, because the user should actually be searched for first and then authentication should be performed with the DN.

I'm stuck at step 4 because I can't handle the filter(). With log.Printf("Request Filter=%s", r.Filter()) I see the correct filter, but I can't reach the content somehow. If I use the string func, then I have to parse everything myself. Isn't there something better? ;) @vjeantet, may be you can enlighten me. Thank you very much.