Bug 56329 - Bundle swagger web-ui dependencies instead of loading external resources
Summary: Bundle swagger web-ui dependencies instead of loading external resources
Status: CLOSED FIXED
Alias: None
Product: UCS@school
Classification: Unclassified
Component: ucsschool-id-connector
Version: UCS@school 5.0
Hardware: Other Linux
: P5 normal
Target Milestone: UCS@school 5.0 v5-errata
Assignee: Marius Meschter
QA Contact: Christian Castens
URL: https://git.knut.univention.de/univen...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-17 15:45 CEST by Jan-Luca Kiok
Modified: 2024-07-24 20:32 CEST (History)
5 users (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?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2023080721000141, 2024071821000101
Bug group (optional):
Customer ID: 141939
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan-Luca Kiok univentionstaff 2023-07-17 15:45:47 CEST
+++ This bug was initially created as a clone of Bug #56314 +++


The Swagger UI of Kelvin loads resources (JS and CSS) from external sources when opened, most notably

- https://cdn.jsdelivr.net/npm/swagger-ui-dist@4/swagger-ui-bundle.js
- https://cdn.jsdelivr.net/npm/swagger-ui-dist@4/swagger-ui.css
- https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js

It is possible to bundle this into the container instead:

https://fastapi.tiangolo.com/advanced/extending-openapi/?h=#self-hosting-javascript-and-css-for-docs
Comment 2 Christina Scheinig univentionstaff 2023-08-08 09:16:33 CEST
We had a support case, where the customer got an empty page, because cdn.jsdelivr.net was blocked by a proxy or firewall.
Comment 3 Christina Scheinig univentionstaff 2024-07-18 11:59:16 CEST
Requested again 2024071821000101
Comment 4 Christina Scheinig univentionstaff 2024-07-18 12:03:11 CEST
The customer needs this because it is not possible to release the externally loaded CSS and JS resources, as the terminal server used has no internet connection and therefore cannot download any resources. Access is limited exclusively to the UCS dashboards of our multi-server environment. For data protection reasons, it is necessary to prevent the retrieval of external resources from CDNs and to provide local provision instead.
Comment 5 Marius Meschter univentionstaff 2024-07-24 16:35:36 CEST
ucsschool-id-connector
5ce8614fb6369f51 | chore: serve swagger-ui-bundle directly instead of through CDN

released as ucsschool-id-connector 3.0.1
Comment 6 Christian Castens univentionstaff 2024-07-24 20:32:52 CEST
QA:
OK: serve Redoc and Swagger UI statically
OK: jenkins tests
OK: manual test
OK: app released