-
Notifications
You must be signed in to change notification settings - Fork 178
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
Add auto_bind
config option
#179
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Currently, the code reads like this
In the above code, if use_ssl is false, then auto_bind becomes |
How about something like:
|
Well, I would argue that even in an intranet encryption is desirable as in most cases we should not trust all participants of the intranet to the full extent. If you believe that your suggestion is looking good, I guess you can create a pull request? |
Having the same issue - has this solution been merge or any workaround? |
Same here all internal networking and I really don't need encryption between the AD and jupyterhub. So for now I patched the auto_bind in the code but that is far from a solution. I really hope this will be addressed in the future. |
@nylocx this is an open source project so anybody is free to create pull requests. |
@1kastner Yeah I know, and after rereading my comment it may sound way harsher than intended (Not a native speaker) I really love the project and the work that is done on it. Just my current "patch" is nothing that will benefit the community, it's just getting our internal hub back to work before my colleagues start complaining :). I always have to get a signed permission to contribute to open source during working hours and with my current workload it will be hard to squeeze it in. I see the benefits in the solution provided by @gramakri, but I think a more elegant solution might be to try to connect with the STARTTLS stuff and catch the exception to than retry with |
@nylocx I support your idea that security is always context-dependent. However, even in an internal network it seems wrong to me to transfer credentials in plaintext. If such an option is included, it should be obvious to anybody that this is not the go-to solution. |
Unfortunately one problem with this repo is it's very difficult to do a full test without a real LDAP system, though there are some CI tests which certainly help! To help with review it's helpful if tests can be added for any change, and ideally if you could solicit reviews from existing users (feel free to |
Totally agree on that and I have already field a request to our admin team to enable TLS encrypted LDAP on our Active Directory Server. But I would have liked to get a big red warning in the logs and a note that it will stop working in the next major release. To give me the time to update my infrastructure before running into trouble with a no longer working server. |
Well, the version number of the ldap3 dependency was usually not pinned in this project. Previously, that library was very forgiving (many try/catches) which they stopped after one of their updates. This project shortly pinned the ldap3 version to a lower number as an intermediate solution before we reworked the |
@nylocx We definitely didn't intend to introduce any breaking changes, sorry if it caused you problems. Regardless of whether the change was due to an upstream change or a change in this repo, the general problem is a lack of testing as I mentioned in my previous comment. A lack of tests for this configuration, coupled with a lack of people able/willing to test PRs, unfortunately led to this. If anyone is able to contribute more tests, or is wiling to help review future PRs, that would be great! Note that anyone on GitHub can review PRs and help out on issues, you don't have to be a maintainer! |
I should really work on my written social skills ;) I wasn't under the impression that you actively broke something to state the point that I should fix my infrastructure (which I really should do, so I'm thankful for that too ;)). The point above was just meant as another argument for the try except + logging a warning solution until the next major release instead of introducing another configuration variable. But the more I think about it the best solution in my opinion would be to do both, add "old" default behavior by catching the exception and falling back to a non encrypted communication (which might be fine if both servers live on the same machine and communicate via the loopback interface) and stating in the warning that the user can silence this warning if he is sure that he wants an unencrypted connection by setting If someone else finds the time to fix this before I do I would be happy to review and test it. |
Bug description
Make ldap3 library
auto_bind
config settable.Expected behaviour
Currently, if
use_ssl
is set toFalse
,auto_bind
becomesldap3.AUTO_BIND_TLS_BEFORE_BIND
. This means that the ldap server must support ssl or starttls. There is no way to use a ldap server which doesn't have either. This is the case for a local LDAP server i.e runs in the same server as jupyterhub and communicates via the internal network.Actual behaviour
Add a new config variable
auto_bind
to match upstream ldap3 library configuration.I opened this as a bug because it used to because this was the behavior in 1.3.0 but it seems behavior changed because of the discussion in #171
The text was updated successfully, but these errors were encountered: