Hi,
I’m new to jupyterhub and i installed jupyterhub through helm on my open source kubernetes cluster. I’m trying to integrate ads authentication for my jupyterhub login.
It say’s invalid CA public key file. I have a adsldap-combined.pem file in /etc/openldap/certs directory. The same file is working for rancher ads authentication and vault authetication with proper ads details.
But the same thing is failing for jupyterhub authentication. Below is the error.
[E 2025-05-12 15:51:00.264 JupyterHub web:1875] Uncaught exception POST /hub/login?next=%2Fhub%2F (::ffff:10.245.26.192)
HTTPServerRequest(protocol='http', host='aeamxpv600:8273', method='POST', uri='/hub/login?next=%2Fhub%2F', version='HTTP/1.1', remote_ip='::ffff:10.245.26.192')
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/tornado/web.py", line 1790, in _execute
result = await result
^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/jupyterhub/handlers/login.py", line 164, in post
user = await self.login_user(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/jupyterhub/handlers/base.py", line 964, in login_user
authenticated = await self.authenticate(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/jupyterhub/auth.py", line 688, in get_authenticated_user
authenticated = await maybe_future(self.authenticate(handler, data))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ldapauthenticator/ldapauthenticator.py", line 613, in authenticate
resolved_username, resolved_dn = self.resolve_username(login_username)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ldapauthenticator/ldapauthenticator.py", line 425, in resolve_username
conn = self.get_connection(
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ldapauthenticator/ldapauthenticator.py", line 524, in get_connection
tls = Tls(**self.tls_kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/ldap3/core/tls.py", line 97, in __init__
raise LDAPSSLConfigurationError('invalid CA public key file')
ldap3.core.exceptions.LDAPSSLConfigurationError: invalid CA public key file
type or paste code here
ADS configuration details:
hub:
revisionHistoryLimit:
config:
JupyterHub:
# admin_access: true
authenticator_class: ldapauthenticator.LDAPAuthenticator
LDAPAuthenticator:
bind_dn_template:
- CN=xx-system,OU=ServiceAccounts,OU=Process,DC=ads,DC=abc,DC=com
escape_userdn: false
lookup_dn: true
tls_strategy: on_connect
lookup_dn_search_filter: ({login_attr}={login})
lookup_dn_search_password: <password>
server_address: ldaps://adserver.com
server_port: 636
user_attribute: sAMAccountName
user_search_base: dc=ads,dc=abc,dc=com
user_search_filter: '({login_attr}={login})'
group_search_filter: dc=ads,dc=abc,dc=com
use_ssl: true
tls_kwargs: {
"ca_certs_file": "/etc/openldap/certs/adsldap-combined.pem"
}