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

Allow secondary LDAP servers #190

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bloodeagle40234
Copy link

Currently, ldapauthenticator supports only one LDAP server url. That means, when the
server failed down, jupyterhub cannot authenticate any incoming requests.

This pull request adds the new configurations "secondary_uri" and "connect_timeout"
to support secondary LDAP servers. secondary_uri takes comma separated "server:port"
style string that can be candidates when the primary server configured by legacy "server_address"
and "server_port" options. "connect_timeout" is the timeout that ldapauthenticator can give
up the attempt connection, and then redirect to the secondaries.

This change doesn't break any backward compatibilities on server_address/server_port
configuration. When operators want to use secondaries, just adding the new secondary_uri
options is enough.

This is another approach from #184

@welcome
Copy link

welcome bot commented Jan 12, 2021

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@bloodeagle40234
Copy link
Author

OK. I'll try to fix those gate failures.

@bloodeagle40234 bloodeagle40234 force-pushed the server-redirects branch 2 times, most recently from 2590689 to 93f6834 Compare January 12, 2021 09:08
@bloodeagle40234
Copy link
Author

bloodeagle40234 commented Jan 12, 2021

Hmm... I may be missing something on Github actions testing configuration. In my local ubuntu, I can pass the tests with ci/docker-ldap.sh example LDAP server but it seems to get failed within CI. Even the existing tests, they got something troubled with it.

@bloodeagle40234
Copy link
Author

Ah.. I may get my mistake into this patch. Let me fix those...

@bloodeagle40234 bloodeagle40234 force-pushed the server-redirects branch 4 times, most recently from 0d2076f to a4709e8 Compare April 20, 2021 08:17
Kota Tsuyuzaki added 2 commits April 20, 2021 17:21
When a server set in server_address is unavailable,
currently no way to try to connect other available
servers even system provides HA ldap servers.

This patch allows users to set such HA servers as
secondary_uri, then, ldap client will access to
them if the primary is not available.
That option will enable the LDAP client to give up
to connect to the server in the specific seconds.
@bloodeagle40234
Copy link
Author

Thanks @manics for merging /pull/192 . I rebased and cleanup this patch to address to current master. Could you have time to review this too?

@consideRatio
Copy link
Member

Quickly looking at this PR and #184, it seems like the other approach relies on ldap3 to do the work overall - that makes it seem favorable to me.

I hope to find time review this and #184 further, but I'm still onboarding myself to this project and are triaging various issues/prs.

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

Successfully merging this pull request may close these issues.

2 participants