You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem:
We are using multiple LDAP servers. A problem that arises is that all connections go to the server first LDAP server.
In order to avoid that, we want to use DNS SRV records with both servers, but the Python module responsible for the LDAP connection does not seem to support LDAP-URLs regarding RFC 4516[1].
When using ldapsearch to verify that the URL is well formed, it works as expected:
[root@ospd-stage ~]# ldapsearch -H ldaps:///dc%3Dbioquant%2Cdc%3Duni%2Dheidelberg%2Cdc%3Dde -x -b ou=people,DC=bioquant,DC=uni-heidelberg,DC=de| head # extended LDIF # # LDAPv3 # base <ou=people,DC=bioquant,DC=uni-heidelberg,DC=de> with scope subtree # filter: (objectclass=*) # requesting: ALL #
# People, bioquant.uni-heidelberg.de
dn: ou=People, dc=bioquant,dc=uni-heidelberg,dc=de
If we try the same syntax for the URL in the keystone/domains/*conf, the module tries to connect to that URL directly.
It fails , instead of asking the DNS for A (or AAAA) records for _ldap._tcp.bioquant.uni-heidelberg.de:
python-ldap is just a thin wrapper around OpenLDAP's libldap. libldap doesn't support SRV record lookups. I'd rather not implement a solution in python-ldap directly. Therefore I see two possible solutions for the problem:
Make a feature request on the OpenLDAP tracker and request to add a SRV lookup feature to libldap directly. That way, other consumers of libldap also benefit from a solution.
Add a custom solution on top of python-ldap. You can pass in multiple LDAP URIs and libldap will pick one server from the list of URIs. In theory you should be able to construct a list of URIs from a list of resolved, sorted SRV records. In praxis I don't know in which order libldap opens connections.
Description of the problem:
We are using multiple LDAP servers. A problem that arises is that all connections go to the server first LDAP server.
In order to avoid that, we want to use DNS SRV records with both servers, but the Python module responsible for the LDAP connection does not seem to support LDAP-URLs regarding RFC 4516[1].
When using ldapsearch to verify that the URL is well formed, it works as expected:
If we try the same syntax for the URL in the keystone/domains/*conf, the module tries to connect to that URL directly.
It fails , instead of asking the DNS for A (or AAAA) records for _ldap._tcp.bioquant.uni-heidelberg.de:
Version-Release number of selected component (if applicable):
[1] https://tools.ietf.org/html/rfc4516
The text was updated successfully, but these errors were encountered: