Bug 56385 - ldap.INVALID_CREDENTIALS: KeyError in %PY3%/univention/management/console/ldap.py
ldap.INVALID_CREDENTIALS: KeyError in %PY3%/univention/management/console/lda...
Status: NEW
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2023-08-01 11:30 CEST by Mika Westphal
Modified: 2023-08-01 11:31 CEST (History)
0 users

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023071321000121
Bug group (optional): Error handling, External feedback
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mika Westphal univentionstaff 2023-08-01 11:30:23 CEST
Traceback (most recent call last):
  File "%PY3%/univention/management/console/ldap.py", line 188, in getter
    raise KeyError()
KeyError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "%PY3%/tornado/web.py", line 1595, in _execute
    result = yield result
  File "%PY3%/tornado/gen.py", line 1133, in run
    value = future.result()
  File "%PY3%/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "%PY3%/univention/management/console/resources.py", line 457, in post
    result = yield session.authenticate(self.request.body_arguments)
  File "%PY3%/tornado/gen.py", line 1133, in run
    value = future.result()
  File "%PY3%/tornado/gen.py", line 1147, in run
    yielded = self.gen.send(value)
  File "%PY3%/univention/management/console/session.py", line 148, in authenticate
    self.set_credentials(**result.credentials)
  File "%PY3%/univention/management/console/session.py", line 172, in set_credentials
    self._search_user_dn()
  File "%PY3%/univention/management/console/session.py", line 183, in _search_user_dn
    lo = get_machine_connection(write=False)[0]
  File "%PY3%/univention/management/console/ldap.py", line 144, in get_machine_connection
    return connection()
  File "%PY3%/univention/management/console/ldap.py", line 200, in _decorated
    kwargs[loarg], kwargs[poarg] = lo, po = getter()
  File "%PY3%/univention/management/console/ldap.py", line 190, in getter
    conn = connection()
  File "%PY3%/univention/management/console/ldap.py", line 101, in connection
    return _getMachineConnection(**kwargs)
  File "%PY3%/univention/admin/uldap.py", line 178, in getMachineConnection
    lo = univention.uldap.getMachineConnection(start_tls, decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
  File "%PY3%/univention/uldap.py", line 196, in getMachineConnection
    return access(host=server, port=port, base=ucr['ldap/base'], binddn=ucr['ldap/hostdn'], bindpw=bindpw, start_tls=start_tls, decode_ignorelist=decode_ignorelist, reconnect=reconnect)
  File "%PY3%/univention/uldap.py", line 292, in __init__
    self.__open(ca_certfile)
  File "%PY3%/univention/uldap.py", line 371, in __open
    self.bind(self.binddn, self.bindpw)
  File "%PY3%/univention/uldap.py", line 212, in _decorated
    return func(self, *args, **kwargs)
  File "%PY3%/univention/uldap.py", line 306, in bind
    self.lo.simple_bind_s(self.binddn, self.bindpw)
  File "%PY3%/ldap/ldapobject.py", line 1215, in simple_bind_s
    res = self._apply_method_s(SimpleLDAPObject.simple_bind_s,*args,**kwargs)
  File "%PY3%/ldap/ldapobject.py", line 1197, in _apply_method_s
    return func(self,*args,**kwargs)
  File "%PY3%/ldap/ldapobject.py", line 444, in simple_bind_s
    resp_type, resp_data, resp_msgid, resp_ctrls = self.result3(msgid,all=1,timeout=self.timeout)
  File "%PY3%/ldap/ldapobject.py", line 749, in result3
    resp_ctrl_classes=resp_ctrl_classes
  File "%PY3%/ldap/ldapobject.py", line 756, in result4
    ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
  File "%PY3%/ldap/ldapobject.py", line 329, in _ldap_call
    reraise(exc_type, exc_value, exc_traceback)
  File "%PY3%/ldap/compat.py", line 44, in reraise
    raise exc_value
  File "%PY3%/ldap/ldapobject.py", line 313, in _ldap_call
    result = func(*args,**kwargs)
ldap.INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}
Comment 1 Mika Westphal univentionstaff 2023-08-01 11:31:23 CEST
5.0-4 errata0 - UCS@school 5.0 v3

(In reply to Mika Westphal from comment #0)
> Traceback (most recent call last):
>   File "%PY3%/univention/management/console/ldap.py", line 188, in getter
>     raise KeyError()
> KeyError
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "%PY3%/tornado/web.py", line 1595, in _execute
>     result = yield result
>   File "%PY3%/tornado/gen.py", line 1133, in run
>     value = future.result()
>   File "%PY3%/tornado/gen.py", line 1141, in run
>     yielded = self.gen.throw(*exc_info)
>   File "%PY3%/univention/management/console/resources.py", line 457, in post
>     result = yield session.authenticate(self.request.body_arguments)
>   File "%PY3%/tornado/gen.py", line 1133, in run
>     value = future.result()
>   File "%PY3%/tornado/gen.py", line 1147, in run
>     yielded = self.gen.send(value)
>   File "%PY3%/univention/management/console/session.py", line 148, in
> authenticate
>     self.set_credentials(**result.credentials)
>   File "%PY3%/univention/management/console/session.py", line 172, in
> set_credentials
>     self._search_user_dn()
>   File "%PY3%/univention/management/console/session.py", line 183, in
> _search_user_dn
>     lo = get_machine_connection(write=False)[0]
>   File "%PY3%/univention/management/console/ldap.py", line 144, in
> get_machine_connection
>     return connection()
>   File "%PY3%/univention/management/console/ldap.py", line 200, in _decorated
>     kwargs[loarg], kwargs[poarg] = lo, po = getter()
>   File "%PY3%/univention/management/console/ldap.py", line 190, in getter
>     conn = connection()
>   File "%PY3%/univention/management/console/ldap.py", line 101, in connection
>     return _getMachineConnection(**kwargs)
>   File "%PY3%/univention/admin/uldap.py", line 178, in getMachineConnection
>     lo = univention.uldap.getMachineConnection(start_tls,
> decode_ignorelist=decode_ignorelist, ldap_master=ldap_master)
>   File "%PY3%/univention/uldap.py", line 196, in getMachineConnection
>     return access(host=server, port=port, base=ucr['ldap/base'],
> binddn=ucr['ldap/hostdn'], bindpw=bindpw, start_tls=start_tls,
> decode_ignorelist=decode_ignorelist, reconnect=reconnect)
>   File "%PY3%/univention/uldap.py", line 292, in __init__
>     self.__open(ca_certfile)
>   File "%PY3%/univention/uldap.py", line 371, in __open
>     self.bind(self.binddn, self.bindpw)
>   File "%PY3%/univention/uldap.py", line 212, in _decorated
>     return func(self, *args, **kwargs)
>   File "%PY3%/univention/uldap.py", line 306, in bind
>     self.lo.simple_bind_s(self.binddn, self.bindpw)
>   File "%PY3%/ldap/ldapobject.py", line 1215, in simple_bind_s
>     res = self._apply_method_s(SimpleLDAPObject.simple_bind_s,*args,**kwargs)
>   File "%PY3%/ldap/ldapobject.py", line 1197, in _apply_method_s
>     return func(self,*args,**kwargs)
>   File "%PY3%/ldap/ldapobject.py", line 444, in simple_bind_s
>     resp_type, resp_data, resp_msgid, resp_ctrls =
> self.result3(msgid,all=1,timeout=self.timeout)
>   File "%PY3%/ldap/ldapobject.py", line 749, in result3
>     resp_ctrl_classes=resp_ctrl_classes
>   File "%PY3%/ldap/ldapobject.py", line 756, in result4
>     ldap_result =
> self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,
> add_intermediates,add_extop)
>   File "%PY3%/ldap/ldapobject.py", line 329, in _ldap_call
>     reraise(exc_type, exc_value, exc_traceback)
>   File "%PY3%/ldap/compat.py", line 44, in reraise
>     raise exc_value
>   File "%PY3%/ldap/ldapobject.py", line 313, in _ldap_call
>     result = func(*args,**kwargs)
> ldap.INVALID_CREDENTIALS: {'desc': 'Invalid credentials'}