ldapsdk icon indicating copy to clipboard operation
ldapsdk copied to clipboard

Replace BindRequest for new connections in LDAPConnectionPool

Open chevaris opened this issue 6 years ago • 3 comments

Hi there,

We are using LDAP SDK to connect to an LDAP server, and periodically the password for the bindDN used in the pool to create new connections is enforced to be changed by the users administrators.

Today the bindDN and the password are config parameters of the application. WHen the password is changed in runtime, we are closing the actual pool and creating a new one on the fly, but I think could be interesting addind in the pool a method like "setNewBindRequestNewConnections(BindRequest request)" that is really doind the job.

Checking LDAPPoolCode I think should be enough to make bindRequest field as volatile and create new method as suggested.

DO you think is an interesting functionality to be added?

Thanks in advance

chevaris avatar May 18 '18 17:05 chevaris

This is a reasonable request. I also think it could be useful to update the server set on the fly. I'll look into updating the connection pool implementations to support this.

dirmgr avatar May 18 '18 21:05 dirmgr

I have updated the LDAPConnectionPool and LDAPThreadLocalConnectionPool classes to add new setBindRequest and setServerSet methods.

dirmgr avatar May 19 '18 06:05 dirmgr

Thanks a lot for accepting the suggestion.

I was checking the commit and it is really great how the code is documented and tested. Thanks again

chevaris avatar May 19 '18 07:05 chevaris