feat: openwebui_oauth_picture_links (Pocket ID pictures); release 0.1.0-dev.6 #7

Merged
john merged 1 commit from feat/oauth-picture-links into main 2026-11-27 04:00:00 +00:00
Owner

Draft. Fix for Pocket ID profile pictures never reaching Open WebUI. Needs your review before merge (it bumps VERSION, so merging signs and publishes 0.1.0-dev.6).

Why pictures don't sync

Open WebUI is configured correctly (OAUTH_UPDATE_PICTURE_ON_LOGIN=true, claim picture), and Pocket ID sends picture = https://auth.yawn.dev/api/users/<sub>/profile-picture.png. The link works: both Pocket ID users get HTTP 200, PNG.

At sign-in Open WebUI downloads that URL to store a copy, but first runs it through its web-fetch guard (validate_url). With ENABLE_LOCAL_WEB_FETCH off it refuses any host that resolves to a non-global address. On the LAN, Technitium answers every *.yawn.dev name with Caddy's 192.168.1.172, so the fetch is refused, _process_picture_url returns /user.png, and Open WebUI stores the default picture at every sign-in. Live state matches: both OIDC users have /user.png; the five local users have their own uploaded pictures.

Fix

New openwebui_oauth_picture_links:

  • sets each OAuth user's profile_image_url to the Pocket ID link (url_template with {sub}), and
  • turns off OAUTH_UPDATE_PICTURE_ON_LOGIN, which would otherwise reset it at the next sign-in.

Open WebUI serves a link picture by redirect (ENABLE_PROFILE_IMAGE_URL_FORWARDING, default on), so the browser loads it from Pocket ID and changes in Pocket ID show up at once; Open WebUI fetches nothing. Only OAuth users' picture and that one setting are written; name/email/role are checked unchanged; local users are untouched; a primary-admin 403 is reported.

Read-only plan against live Open WebUI: 1 to import, 1 to change, users_out_of_sync 3 -> 0 (2 users + copy-on-login).

Alternatives not taken

  • ENABLE_LOCAL_WEB_FETCH=true on CT105: one line, but opens every Open WebUI URL fetch (RAG, images, tools) to the LAN, and /root/.env isn't managed in Git.
  • Technitium answering auth.yawn.dev with the WAN address for CT105 only: not supported by the pinned provider (no APP records), and it adds a hairpin dependency to sign-in.

Consumer: john/ai draft PR (adds the resource to openwebui.tf).

**Draft.** Fix for Pocket ID profile pictures never reaching Open WebUI. Needs your review before merge (it bumps VERSION, so merging signs and publishes 0.1.0-dev.6). ## Why pictures don't sync Open WebUI is configured correctly (`OAUTH_UPDATE_PICTURE_ON_LOGIN=true`, claim `picture`), and Pocket ID sends `picture = https://auth.yawn.dev/api/users/<sub>/profile-picture.png`. The link works: both Pocket ID users get HTTP 200, PNG. At sign-in Open WebUI downloads that URL to store a copy, but first runs it through its web-fetch guard (`validate_url`). With `ENABLE_LOCAL_WEB_FETCH` off it **refuses any host that resolves to a non-global address**. On the LAN, Technitium answers every `*.yawn.dev` name with Caddy's `192.168.1.172`, so the fetch is refused, `_process_picture_url` returns `/user.png`, and Open WebUI **stores the default picture at every sign-in**. Live state matches: both OIDC users have `/user.png`; the five local users have their own uploaded pictures. ## Fix New `openwebui_oauth_picture_links`: - sets each OAuth user's `profile_image_url` to the Pocket ID link (`url_template` with `{sub}`), and - turns off `OAUTH_UPDATE_PICTURE_ON_LOGIN`, which would otherwise reset it at the next sign-in. Open WebUI serves a link picture by redirect (`ENABLE_PROFILE_IMAGE_URL_FORWARDING`, default on), so the browser loads it from Pocket ID and **changes in Pocket ID show up at once**; Open WebUI fetches nothing. Only OAuth users' picture and that one setting are written; name/email/role are checked unchanged; local users are untouched; a primary-admin 403 is reported. Read-only plan against live Open WebUI: `1 to import, 1 to change`, `users_out_of_sync 3 -> 0` (2 users + copy-on-login). ## Alternatives not taken - `ENABLE_LOCAL_WEB_FETCH=true` on CT105: one line, but opens every Open WebUI URL fetch (RAG, images, tools) to the LAN, and `/root/.env` isn't managed in Git. - Technitium answering `auth.yawn.dev` with the WAN address for CT105 only: not supported by the pinned provider (no APP records), and it adds a hairpin dependency to sign-in. Consumer: john/ai draft PR (adds the resource to `openwebui.tf`).
feat: openwebui_oauth_picture_links; release 0.1.0-dev.6
All checks were successful
CI / release-check-1 (pull_request) Successful in 13s
CI / release-check (pull_request) Successful in 0s
Security / scan (pull_request) Successful in 31s
Security / security (pull_request) Successful in 0s
CI / check (pull_request) Successful in 4m47s
3ae9865eca
Open WebUI copies the OIDC picture claim at sign-in only after validating
the URL with its web-fetch guard. When the identity provider resolves to a
private address from Open WebUI (LAN split-horizon DNS), the copy is refused
and /user.png is stored at every sign-in, overwriting any picture.

The resource stores each OAuth user's picture as a link
(url_template with {sub}) and turns off OAUTH_UPDATE_PICTURE_ON_LOGIN; the
browser loads the picture by redirect, so it stays current with nothing
fetched server-side. Writes only OAuth users' profile_image_url and that one
setting, verifies nothing else moved, reports a primary-admin 403.
john changed title from WIP: feat: openwebui_oauth_picture_links (Pocket ID pictures); release 0.1.0-dev.6 to feat: openwebui_oauth_picture_links (Pocket ID pictures); release 0.1.0-dev.6 2026-11-27 03:58:21 +00:00
john merged commit e95f9adf69 into main 2026-11-27 04:00:00 +00:00
john deleted branch feat/oauth-picture-links 2026-11-27 04:00:00 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
john/tofu-provider-openwebui!7
No description provided.