Bug 50181 - [UDM HTTP API] Swagger UI cannot be used to search
[UDM HTTP API] Swagger UI cannot be used to search
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UDM - REST API
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Florian Best
Daniel Tröder
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-09-12 10:54 CEST by Daniel Tröder
Modified: 2019-10-02 16:06 CEST (History)
1 user (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):
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 2019-09-12 10:54:48 CEST
When opening for example "GET /shares/share", after clicking "Try it out" the fields are filled with useless data. Especially the property=username and [sort]by=username are wrong here.

But even when all fields are empty or only hidden=true no result can be retrieved. In the log I can see:

10.205.2.33 - - [12/Sep/2019:10:51:24 +0200] "GET /univention/udm/shares/share/ HTTP/1.1" 401 630 "http://10.200.3.66/univention/udm/schema/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"

10.205.2.33 - - [12/Sep/2019:10:50:57 +0200] "GET /univention/udm/shares/share/?hidden=true HTTP/1.1" 401 630 "http://10.200.3.66/univention/udm/schema/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36"
Comment 1 Florian Best univentionstaff 2019-09-17 16:11:15 CEST
Searching works now. Duplicate of Bug #50049.
It does not work btw. if you access the Swagger UI with http via the ipaddress but select https with the FQDN as server.
But when changing the server in the dropdown above the search works.
Comment 2 Daniel Tröder univentionstaff 2019-09-17 16:59:10 CEST
Almost there.

Works excellent in shares/share and users/user.

Fails in appcenter/app because a default superordinate of "cn=superordinate,dc=example,dc=net" is set:
"1 error(s) occurred:\nQuery string \"superordinate\": The ldap base is invalid. Use dc=uni,dc=dtr.\n"

Similar in PUT and PATCH: The field "If-Unmodified-Since" is prefilled with "Wed, 21 Oct 2015 07:28:00 GMT".
Comment 3 Florian Best univentionstaff 2019-09-22 15:10:30 CEST
(In reply to Daniel Tröder from comment #2)
> Almost there.
> 
> Works excellent in shares/share and users/user.
> 
> Fails in appcenter/app because a default superordinate of
> "cn=superordinate,dc=example,dc=net" is set:
> "1 error(s) occurred:\nQuery string \"superordinate\": The ldap base is
> invalid. Use dc=uni,dc=dtr.\n"
> 
> Similar in PUT and PATCH: The field "If-Unmodified-Since" is prefilled with
> "Wed, 21 Oct 2015 07:28:00 GMT".

Okay, I removed the examples from the schema.
Also removed superordinates from modules which don't have any.

univention-directory-manager-rest (9.0.15-8)
3837492676d3 | Bug #27816: Bug #50181: remove OpenAPI examples
Comment 4 Florian Best univentionstaff 2019-10-02 16:06:31 CEST
UCS 4.4-2 has been released:
 https://docs.software-univention.de/release-notes-4.4-2-en.html
 https://docs.software-univention.de/release-notes-4.4-2-de.html

If this error occurs again, please use "Clone This Bug".