ldap3 icon indicating copy to clipboard operation
ldap3 copied to clipboard

serverPool and choices

Open catchthemonster opened this issue 2 years ago • 0 comments

Hi, Excellent library and it works. Now I have a specific issue and it seems that I can't find some elegant solution for this. I have 5 ldap domains, no referrals completely separate urls. workflow is supplying server and UID to method and method then chooses that server binds to it and does the search returns stuff and goes do another workflow. imperative here is to have all 5 connections open indefinitely, and reuse conns as workflows are coming... If I add 5 ldap servers to serverpool and do not have the ability to choose on conn which server to bind to...

conn = Connection(serverPool, user, passwd, ...) conn.bind() serverPool will choose for me and that is not good... I tried for fun to force it conn = Connection(serverPool.servers[0]....

but that times out... I don't want to make 5 conn objects and then use correct connection on the fly matching conn attributes to incoming server string ...

It would be much better to do this with help from ldap3 library or serverPool for that matter. I understand HA idea but is there an ability to connect to an LDAP server, sync or async, and among all of them pragmatically choose which to use for the specific search? I simply do not want to re-bind every single time (volume)

Thanks much and sorry for intruding ...

catchthemonster avatar Sep 12 '23 21:09 catchthemonster