Bug 50252 - UDM should allow to specify "+" operational attributes in object lookup()
UDM should allow to specify "+" operational attributes in object lookup()
Status: NEW
Product: UCS
Classification: Unclassified
Component: UDM - REST API
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: UMC maintainers
UMC maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-23 17:59 CEST by Florian Best
Modified: 2022-10-18 16:58 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Development Internal
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:
Bug group (optional): API change
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-09-23 17:59:28 CEST
The UDM REST API needs the ldap operational attributes (+) and makes a second search after opening each object.

There should be a way in UDM e.g. in lookup() or univention.admin.objects.get() to support this.
This way should be used in the UDM REST API instead.
Comment 1 Florian Best univentionstaff 2019-09-25 13:10:39 CEST
The S4-Connector also needs this feature.
Comment 2 Florian Best univentionstaff 2019-09-25 13:11:09 CEST
And Bug #20235 as well.
Comment 6 Florian Best univentionstaff 2022-01-17 09:29:49 CET
Changing this might require an API change.
Currently every UDM module itself defines a lookup() method instead with fixed parameters.
We either need to add a parameter which allows to specify further arguments or always fetch this argument.
So every existing UDM module including third party modules needs to be touched.
While we are at this point we should focus on getting rid of a own implementation of lookup and always use the generic one ("lookup = object.lookup").

Alternatively we can add a hack/workaround that another LDAP search is done in the __init__ constructor but this would be very very inefficient.
Comment 7 Florian Best univentionstaff 2022-10-18 16:58:06 CEST
Since Bug #20235 It's possible to do:
univention.admin.handlers.simpleLdap._static_ldap_attributes.update({'entryCSN', 'modifyTimestamp'})

The branch git:fbest/50252-use-operational-attributes contains some performance improvements for S4-Connector and UDM REST API.