Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore servers in pool with invalid credentials #1142

Open
flixman opened this issue May 1, 2024 · 0 comments
Open

Ignore servers in pool with invalid credentials #1142

flixman opened this issue May 1, 2024 · 0 comments

Comments

@flixman
Copy link

flixman commented May 1, 2024

I am creating a pool with a list of servers that I get from my company's DNS, I am getting some servers for which my credentials are not valid. Is there any way I can instruct ldap3 to not raise and exception for this situation and just exclude the servers from the pool? This is the code that is failing:

    with contextlib.ExitStack() as stack:
        server_pools = {domain: ServerPool(servers, ROUND_ROBIN, active=True, exhaust=True) for domain, servers in SERVERS.items()}
        conns = {domain: stack.enter_context(Connection(pool, authentication=SASL, sasl_mechanism=KERBEROS)) for domain, pool in server_pools.items()}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant