Login timeouts if ldapserver is unavailable #582

Closed
opened 2021-12-23 23:28:06 +01:00 by tteichler · 7 comments
Owner

If ldap is configured but the ldap server is unreachable, the login hangs until the worker terminates.

If ldap is configured but the ldap server is unreachable, the login hangs until the worker terminates.
Owner

changed the description

changed the description
Owner

assigned to @nik

assigned to @nik
Owner

created merge request !2489 to address this issue

created merge request !2489 to address this issue
Owner

mentioned in merge request !2489

mentioned in merge request !2489
Owner

The bug is indeed reproducible by simply setting some imaginary LDAP server when running the dev server: poetry run env ALEKSIS_database__password=aleksis ALEKSIS_ldap__uri=ldap://8.8.8.8 ALEKSIS_ldap__users__search__base=dc=foo aleksis-admin runuwsgi.

The bug is indeed reproducible by simply setting some imaginary LDAP server when running the dev server: `poetry run env ALEKSIS_database__password=aleksis ALEKSIS_ldap__uri=ldap://8.8.8.8 ALEKSIS_ldap__users__search__base=dc=foo aleksis-admin runuwsgi`.
Owner

Hangs upon bind here:

 --- modulename: ldapobject, funcname: simple_bind_s
ldapobject.py(248):     msgid = self.simple_bind(who,cred,serverctrls,clientctrls)
 --- modulename: ldapobject, funcname: simple_bind
ldapobject.py(242):     return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls))
 --- modulename: __init__, funcname: RequestControlTuples
__init__.py(113):   if ldapControls is None:
__init__.py(114):     return None
 --- modulename: __init__, funcname: RequestControlTuples
__init__.py(113):   if ldapControls is None:
__init__.py(114):     return None
 --- modulename: ldapobject, funcname: _ldap_call
ldapobject.py(114):     self._ldap_object_lock.acquire()
 --- modulename: __init__, funcname: acquire
__init__.py(85):       if _trace_level>=self._min_trace_level:
__init__.py(87):     return self._lock.acquire()
ldapobject.py(116):       if self._trace_level>=1:
ldapobject.py(125):     diagnostic_message_success = None
ldapobject.py(126):     try:
ldapobject.py(127):       try:
ldapobject.py(128):         result = func(*args,**kwargs)
Hangs upon bind here: ```plain --- modulename: ldapobject, funcname: simple_bind_s ldapobject.py(248): msgid = self.simple_bind(who,cred,serverctrls,clientctrls) --- modulename: ldapobject, funcname: simple_bind ldapobject.py(242): return self._ldap_call(self._l.simple_bind,who,cred,RequestControlTuples(serverctrls),RequestControlTuples(clientctrls)) --- modulename: __init__, funcname: RequestControlTuples __init__.py(113): if ldapControls is None: __init__.py(114): return None --- modulename: __init__, funcname: RequestControlTuples __init__.py(113): if ldapControls is None: __init__.py(114): return None --- modulename: ldapobject, funcname: _ldap_call ldapobject.py(114): self._ldap_object_lock.acquire() --- modulename: __init__, funcname: acquire __init__.py(85): if _trace_level>=self._min_trace_level: __init__.py(87): return self._lock.acquire() ldapobject.py(116): if self._trace_level>=1: ldapobject.py(125): diagnostic_message_success = None ldapobject.py(126): try: ldapobject.py(127): try: ldapobject.py(128): result = func(*args,**kwargs) ```
nik closed this issue 2021-12-24 22:58:15 +01:00
Owner

mentioned in commit 74de127aa8

mentioned in commit 74de127aa8fe9e74934e0df96ffa3af80efb37cf
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aleksis/AlekSIS-Core#582
No description provided.