feat(webui): download OIDC provider icons for local serving#529
Closed
Soap2G wants to merge 1 commit into
Closed
Conversation
The WebUI renders OIDC provider icons with next/image (rucio/webui#805), which rejects remote hosts that are not allow-listed in next.config's images.remotePatterns. Operator-supplied icon URLs can point anywhere, so they cannot be allow-listed. Mirror the existing community-logo handling: for each provider listed in RUCIO_WEBUI_OIDC_PROVIDERS that declares an *_ICON_URL, download the icon into public/oidc-icons/<name>.png and repoint the env var at that local path. A failed download unsets the variable so the WebUI falls back to its default icon rather than a broken image. Unlike the community logo, this runs before env generation: the logo's local path is hard-coded in the WebUI, whereas a provider icon's path is carried in the *_ICON_URL value the env generator writes to .env, so the value must be rewritten first.
Member
|
Closing in favor of #530, which takes a download-only approach: the entrypoint just places the icon file and the WebUI gateway derives the served path and existence-checks it, so the container doesn't rewrite the generated .env. Thanks @Soap2G for the original implementation here. Continuing the icon work in #530 (paired with rucio/webui#806). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to rucio/webui#805
The WebUI renders OIDC provider icons with next/image, which rejects remote hosts that are not allow-listed in next.config's images.remotePatterns. Operator-supplied icon URLs can point anywhere, so they cannot be allow-listed.
Mirror the existing community-logo handling: for each provider listed in RUCIO_WEBUI_OIDC_PROVIDERS that declares an *_ICON_URL, download the icon into public/oidc-icons/.png and repoint the env var at that local path. A failed download unsets the variable so the WebUI falls back to its default icon rather than a broken image.
Unlike the community logo, this runs before env generation: the logo's local path is hard-coded in the WebUI, whereas a provider icon's path is carried in the *_ICON_URL value the env generator writes to .env, so the value must be rewritten first.