Skip to content

feat(webui): download OIDC provider icons for local next/image serving#530

Merged
maany merged 2 commits into
rucio:masterfrom
maany:feat/805-oidc-icon-download
Jul 22, 2026
Merged

feat(webui): download OIDC provider icons for local next/image serving#530
maany merged 2 commits into
rucio:masterfrom
maany:feat/805-oidc-icon-download

Conversation

@maany

@maany maany commented Jul 21, 2026

Copy link
Copy Markdown
Member

Related to rucio/webui#805 and the WebUI-side change in rucio/webui#806.

What

For every provider listed in RUCIO_WEBUI_OIDC_PROVIDERS that declares a
RUCIO_WEBUI_OIDC_PROVIDER_<NAME>_ICON_URL, we download the icon at container
start into public/oidc-icons/<NAME>.png (upper-cased name), mirroring the
existing community-logo handling. This lets the WebUI render provider icons with
next/image instead of a plain <img> pointing at an operator-supplied remote
host that cannot be allow-listed in next.config's images.remotePatterns.

How this differs from #529

This is an alternative to #529. Instead of rewriting the *_ICON_URL value in
the generated .env to the local path (and unsetting it on failure), we only
place the file. The WebUI gateway derives the served path from the provider name
and renders the icon only when the local file exists (see rucio/webui#806), so
the container does not need to touch .env or run before env generation, and a
failed download degrades to the default icon on its own.

Details:

  • Reads the RUCIO_WEBUI_-prefixed environment variables directly, the same
    source the community logo uses.
  • Uses wget (installed in the image; curl is build-time only) and removes the
    destination on failure so no 0-byte file is left behind.
  • Non-fatal under set -e: a bad or unreachable icon URL logs a warning and
    container startup continues.

Testing

Verified the download loop against sample env vars: a reachable icon lands at
public/oidc-icons/<NAME>.png, an unreachable one logs a warning and leaves no
file, and a provider without an icon URL is skipped, with the script exiting 0.

Comment thread webui/docker-entrypoint.sh Outdated
@maany
maany requested a review from bziemons July 22, 2026 11:44
@maany
maany merged commit 25ab113 into rucio:master Jul 22, 2026
1 check passed
@maany
maany deleted the feat/805-oidc-icon-download branch July 22, 2026 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants