Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

feature request: support multiple servers (list) #13

Open
johnarnold opened this issue Jul 10, 2017 · 4 comments
Open

feature request: support multiple servers (list) #13

johnarnold opened this issue Jul 10, 2017 · 4 comments

Comments

@johnarnold
Copy link

E.g. if one server/uri is not available, use the next one.

I guess the simplest way to implement would be a loop in authenticate() that just tries each one in the list until one will bind. Comments/thoughts on this approach?

@jmwaldrip
Copy link

bump, this would be a great addition.

@LindsayHill
Copy link
Contributor

@jmwaldrip this plugin is community-written & supported. PRs are welcome if you want to add those features.

@jmwaldrip
Copy link

@LindsayHill Thanks for the information. As I have time, I will look at getting a PR submitted.

@mtatsuma
Copy link

mtatsuma commented Feb 13, 2020

ldap.initialize() func. in python-ldap can accept the list of urls as documented in https://www.python-ldap.org/en/python-ldap-3.2.0/reference/ldap.html#ldap.initialize

The uri parameter may be a comma- or whitespace-separated list of URIs containing only the schema, the host, and the port fields. Note that when using multiple URIs you cannot determine to which URI your client gets connected.

Then, we can configure for the multiple servers as

backend_kwargs = { "ldap_uri": "ldap://ldap1.example.com,ldap://ldap2.example.com,ldap://ldap3.example.com" ... }

I confirmed it works well even when the some of the listed ldap servers are down.
We can improve the document, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants