Bug 57235 - AD Connector fails when syncuser cannot access toplevel infos
AD Connector fails when syncuser cannot access toplevel infos
Status: NEW
Product: UCS
Classification: Unclassified
Component: AD Connector
UCS 5.0
Other Mac OS X 10.1
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
https://git.knut.univention.de/groups...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-24 16:25 CEST by Ingo Jürgensmann
Modified: 2024-04-25 13:16 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 1: Nuisance – not a big deal but noticeable
User Pain: 0.023
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Jürgensmann univentionstaff 2024-04-24 16:25:58 CEST
In a customer test setup the sync user for the AD Connector was configured (via CLI) on AD forrest side that way, that the user was within the to-sync OU and has been limited by deny rules to only access the subtree/basedn it was configured to. 

--- connect failed, failure was: ---
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/univention/connector/ad/main.py", line 247, in main
    connect(options)
  File "/usr/lib/python3/dist-packages/univention/connector/ad/main.py", line 119, in connect
    ad.init_ldap_connections()
  File "/usr/lib/python3/dist-packages/univention/connector/ad/__init__.py", line 544, in init_ldap_connections
    self.ad_sid = decode_sid(self.ad_search_ext_s(self.ad_ldap_base, ldap.SCOPE_BASE, 'objectclass=domain', ['objectSid'])[0][1]['objectSid'][0])
IndexError: list index out of range

Most likely the sync user couldn't access needed data from the toplevel tree. 
AD Connector should give a (better) errormessage that gives a clue what is going wrong. 

After the customer removed the toplevel deny rule the sync worked.
Comment 2 Arvid Requate univentionstaff 2024-04-25 13:12:20 CEST
I git blamed the line back to it's original inclusion into connector/ad/__init__.py
and that was moved into the main AD-C while addressing Bug 47901.
Maybe we can avoid it for non-AD-Member setups.

Or we try to make nicer error messages.

Bugs like this are exactly what we expected to pop up when limiting the access rights
for the sync user. I guess we need to iterate over the requirements of different use
cases here to improve usability for each case while not adding regressions to the others.