Hi, I am trying to enable LDAP on jupyterhub on k8s deployed through helm.
I have deployes jhub v 0.10.6.
I set these parameter in config.yaml:
auth:
type: ldap
ldap:
server:
address: 111.11.111.11
ssl: false
dn:
lookup: true
search:
filter: '({login_attr}={login})'
user: 'XXXX'
password: 'XXXX'
templates:
- '{username}'
user:
searchBase: 'OU=People,DC=xxxx,DC=it'
escape: false
attribute: 'sAMAccountName'
dnAttribute: 'userPrincipalName'
I receive internal erro when I execute authentication and I get this error in hub pod:
[E 2021-02-05 10:03:49.081 JupyterHub web:1789] Uncaught exception POST /hub/login?next=%2Fhub%2F (172.20.254.219)
HTTPServerRequest(protocol='http', host='jhub.gstp.k8s.altecspace.it', method='POST', uri='/hub/login?next=%2Fhub%2F', version='HTTP/1.1', remote_ip='172.20.254.219')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1704, in _execute
result = await result
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/login.py", line 144, in post
user = await self.login_user(data)
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/handlers/base.py", line 747, in login_user
authenticated = await self.authenticate(data)
File "/usr/local/lib/python3.8/dist-packages/jupyterhub/auth.py", line 459, in get_authenticated_user
authenticated = await maybe_future(self.authenticate(handler, data))
File "/usr/local/lib/python3.8/dist-packages/ldapauthenticator/ldapauthenticator.py", line 361, in authenticate
username, resolved_dn = self.resolve_username(username)
File "/usr/local/lib/python3.8/dist-packages/ldapauthenticator/ldapauthenticator.py", line 236, in resolve_username
conn = self.get_connection(
File "/usr/local/lib/python3.8/dist-packages/ldapauthenticator/ldapauthenticator.py", line 314, in get_connection
conn = ldap3.Connection(
File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 356, in __init__
self._do_auto_bind()
File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 384, in _do_auto_bind
if self.start_tls(read_server_info=False):
File "/usr/local/lib/python3.8/dist-packages/ldap3/core/connection.py", line 1307, in start_tls
if self.server.tls.start_tls(self) and self.strategy.sync: # for asynchronous connections _start_tls is run by the strategy
File "/usr/local/lib/python3.8/dist-packages/ldap3/core/tls.py", line 277, in start_tls
raise LDAPStartTLSError(connection.last_error)
ldap3.core.exceptions.LDAPStartTLSError: startTLS failed - unavailable
Can anyone help me?
Thanks