Bug 51154 - add fallback of uldap_docker.py in Kelvin API to UCR
Summary: add fallback of uldap_docker.py in Kelvin API to UCR
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
Version: UCS@school 4.4
Hardware: Other Linux
: P5 normal
Target Milestone: ---
Assignee: Daniel Tröder
QA Contact: Ole Schwiegert
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-22 22:44 CEST by Daniel Tröder
Modified: 2020-11-13 10:05 CET (History)
1 user (show)

See Also:
What kind of report is it?: Feature Request
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):
Customer ID:
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Tröder univentionstaff 2020-04-22 22:44:55 CEST
The 'uldap' implementation in the Kelvin API [1] uses the environment variables LDAP_MASTER, LDAP_MASTER_PORT, LDAP_HOSTDN etc for connecting to an LDAP server. It does not use the settings found in the local UCR database, if available.

Add fallback code to use UCR values in case the environment variables are not available.

This will simplify testing the Kelvin API and Kelvin API clients, because manipulating the UCR database before starting the Kelvin App Docker container is simpler than setting the appropriate environment variables.


[1] univention-directory-manager-modules-slim/univention/admin/uldap_docker.py
Comment 1 Daniel Tröder univentionstaff 2020-04-22 22:47:29 CEST
Added code to be tested in a branch dtroeder/feature_kelvin_uldap_docker_fallback_to_ucr:

[dtroeder/feature_kelvin_uldap_docker_fallback_to_ucr fb93a4b8e] Bug #51154: add fallback to UCR if environment variables are not available
Comment 2 Daniel Tröder univentionstaff 2020-09-25 09:59:49 CEST
The code change has been merged into feature/kelvin:

[6e37f5160] Bug #51154: add fallback to UCR if environment variables are not available

It allowes code to use getMachineConnection() and getAdminConnection() with both connection settings from the environment as well as from UCR.
Comment 3 Ole Schwiegert univentionstaff 2020-09-28 22:52:02 CEST
Are LDAP_MASTER_PORT and LDAP_SERVER_PORT *always* identical? You removed the distinction of these ports between master and not master system.
Comment 4 Daniel Tröder univentionstaff 2020-09-29 08:25:13 CEST
(In reply to Ole Schwiegert from comment #3)
> Are LDAP_MASTER_PORT and LDAP_SERVER_PORT *always* identical? You removed
> the distinction of these ports between master and not master system.
No - that was an oversight. Fixed:

[feature/kelvin d7a183ee0] Bug #51154: fix ldap port
Comment 5 Daniel Tröder univentionstaff 2020-09-29 10:59:31 CEST
Changelog entries for the updates since the last release were added:

[feature/kelvin 67c713d02] Bug #51154: add changelog entry
Comment 6 Ole Schwiegert univentionstaff 2020-09-29 11:08:59 CEST
Code Review: OK
Changelog entry: OK
Test: OK
Comment 7 Daniel Tröder univentionstaff 2020-11-13 10:05:27 CET
Version 2.0.0 has been released.