Bug 52368 - Kelvin API: 'firstname' shouldn't be mandatory attribute
Summary: Kelvin API: 'firstname' shouldn't be mandatory attribute
Status: RESOLVED 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:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-16 12:10 CET by Daniel Tröder
Modified: 2021-01-21 10:41 CET (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.069
Enterprise Customer affected?:
School Customer affected?: Yes
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-11-16 12:10:39 CET
In UDM the 'lastname' is a mandatory attribute, but 'firstname' isn't.
In the Kelvin API 'firstname' is mandatory, which leads to a validation error when loading users from LDAP (UDM REST API) which do not have a 'firstname' → internal error → HTTP 500.
Comment 1 Florian Best univentionstaff 2020-11-16 12:22:10 CET
Why is firstname mandatory in the Kelvin API?
Comment 2 Daniel Tröder univentionstaff 2020-11-16 14:09:26 CET
(In reply to Florian Best from comment #1)
> Why is firstname mandatory in the Kelvin API?
That's the bug to be fixed: it shouldn't be.
Comment 3 Daniel Tröder univentionstaff 2021-01-14 17:33:12 CET
"firstname" is not required anymore:

[feature/kelvin] 0d22ab994 Bug #52368: firstname is not a required attribute
[feature/kelvin] b5a37c173 Bug #52368: allow empty firstname also in import config, fix test

Test cleanup:

[feature/kelvin] 083ede8ec Bug #52368: use 'exclude' argument to .dict() and .json() calls instead of deleting from the result

A new image has not yet been created, as that will soon be done for Bug 52659 anyway.
Comment 4 Daniel Tröder univentionstaff 2021-01-15 14:31:51 CET
Full reverse: The "firstname" attribute is kept as 'required'. The Kelvin API has been modified to provide a helpful error message in the HTTP 500 response in case a user is loaded from LDAP that has no firstname.

the git branch was force pushed to remove previous commits. the only commit for this bug is now:

[feature/kelvin] 81331a51d Bug #52368: add error details to HTTP 500 response in case of ValidationErrors
Comment 5 Ole Schwiegert univentionstaff 2021-01-19 07:14:04 CET
* It is now possible to chage the roles of users. See manual section `Changing a users roles <https://docs.software-univention.de/ucsschool-kelvin-rest-api/resource-users.html#changing-a-users-roles>`_ for details (Bug #52659).

There is a typo in the changelog. Can you also move this line to a commit for the relevant bug?

Otherwise it works fine for me. Can be build and prepared for the next Kelvin Release
Comment 6 Daniel Tröder univentionstaff 2021-01-21 10:41:03 CET
New app version and image build will be done for Bug 52659 soon, so saving the time to do it here.