Display a readable profile name for OIDC users instead of the internal identity key #3

Closed
opened 2026-10-24 13:24:52 +00:00 by jchapman · 4 comments
Owner

After OIDC sign-in, the visible account identifier is an opaque oidc: hash. Users and administrators need a recognizable name.

Acceptance criteria:

  • Display a suitable provider name or preferred username, with a clear fallback when claims are missing.
  • Keep issuer plus subject as the stable internal identity boundary. Do not merge users by email, username or display name.
  • Preserve verified-email handling and ordinary-user defaults; display claims must not grant administrator access.
  • Escape and bound provider-supplied text.
  • Test duplicate display names, changed names, absent claims and identities from different issuers.
After OIDC sign-in, the visible account identifier is an opaque oidc: hash. Users and administrators need a recognizable name. Acceptance criteria: - Display a suitable provider name or preferred username, with a clear fallback when claims are missing. - Keep issuer plus subject as the stable internal identity boundary. Do not merge users by email, username or display name. - Preserve verified-email handling and ordinary-user defaults; display claims must not grant administrator access. - Escape and bound provider-supplied text. - Test duplicate display names, changed names, absent claims and identities from different issuers.
Author
Owner

Starting owner-requested work on #1 and #3 after reading #14, both issue descriptions/all comments, and the merged #2 authentication handoff. Scope for #3: bounded readable names from verified OIDC profile claims, refreshed on sign-in with a clear fallback, displayed for account/admin views while preserving issuer+subject identity, verified-email rules and ordinary-user defaults. Regression coverage will include duplicate/changed/missing names and distinct issuers. Work is isolated from current main; no deployment or active-task interruption is planned.

Starting owner-requested work on #1 and #3 after reading #14, both issue descriptions/all comments, and the merged #2 authentication handoff. Scope for #3: bounded readable names from verified OIDC profile claims, refreshed on sign-in with a clear fallback, displayed for account/admin views while preserving issuer+subject identity, verified-email rules and ordinary-user defaults. Regression coverage will include duplicate/changed/missing names and distinct issuers. Work is isolated from current main; no deployment or active-task interruption is planned.
Author
Owner

Implementation decision: store display_name separately from the unchanged internal username and issuer+subject identity. Use verified ID-token name, then preferred_username, then SSO user; normalize whitespace/control characters and limit names to 128 Unicode characters. Refresh on successful provider sign-in without changing roles or verified-email rules. The session header, administrator list/manage view and audit labels show readable names; stable account IDs distinguish duplicates. Signed-token and initial browser/backend checks passed for changed/duplicate/malformed/missing names and separate issuers. Final race/integration checks are in progress; no deployment has occurred.

Implementation decision: store display_name separately from the unchanged internal username and issuer+subject identity. Use verified ID-token name, then preferred_username, then SSO user; normalize whitespace/control characters and limit names to 128 Unicode characters. Refresh on successful provider sign-in without changing roles or verified-email rules. The session header, administrator list/manage view and audit labels show readable names; stable account IDs distinguish duplicates. Signed-token and initial browser/backend checks passed for changed/duplicate/malformed/missing names and separate issuers. Final race/integration checks are in progress; no deployment has occurred.
Author
Owner

Implementation/local validation complete in commit 2ff357ea691e88047bede8943b47cedffdb7899b, branch codex/issues-1-3-sso-profile, published with #1 as draft PR #22.

OIDC display_name is separate from the unchanged internal username and issuer+subject key. Verified ID-token name takes precedence over preferred_username, with SSO user as the fallback. Text is normalized/bounded to 128 Unicode characters and rendered as text. Names refresh at successful provider sign-in; legacy accounts use the fallback until then. Session header, administrator list/manage view and audit labels display readable names. Stable account IDs distinguish duplicate names and remain the targets for administrator actions. Display/email/role claims cannot merge accounts or grant administrator access; verified-email processing and ordinary-user defaults remain intact.

Signed-token regressions cover duplicate and changed names, absent/blank/malformed claims, Unicode bounds, HTML/control text, different issuers with the same subject, matching local usernames/emails and unchanged privileges/email-verification rules. API/browser regressions verify safe serialization/rendering, legacy/local fallbacks, readable session/admin views and independent management of duplicate-name accounts. OIDC guide and administration/testing/deployment guidance describe refresh, fallback, identity boundaries and remaining provider checks.

Checks actually run and passed:

  • Linux AMD64 full backend suite and Go vet with the pinned real importer; focused API race suite, complete authentication/configuration/diagnostics/notification race packages and runner race suite through the Docker backend-race-tests target.
  • UI lint/build and dependency audit (zero reported vulnerabilities); all four focused Playwright suites (new SSO/profile plus existing availability, task activity and task email).
  • Disposable full browser/queue/SQLite/upload-recovery/settings walkthrough using the freshly built app and unchanged merged runner/processor images. Verified live label, local session name and encrypted label persistence across a disposable app replacement; all disposable containers/networks/volumes were removed.
  • Nine CI policy tests, source/document/workflow contracts, diff checks, redacted full-history and staged-source secret scans with no findings. The first system-Python policy run lacked PyYAML; rerunning with the repository's hash-pinned dependency passed. Existing UI bundle-size advisory remains.

State: implemented, committed, locally tested and published for review; not merged, release-image-published or deployed. Forgejo run 19 for this commit is waiting. Native AMD64/ARM64 release gates and actual-provider/deployed checks remain outstanding; no gate waiver is claimed. No pilot service or active upload/task was restarted or interrupted; no real library, provider or email delivery was used. Held #12/PR #19 and its checkout remain unchanged.

Next handoff: review draft PR #22 against main, complete required native validation, then coordinate an idle installation and run the documented provider/desktop/mobile checks. This issue remains open for review and merge.

Implementation/local validation complete in commit `2ff357ea691e88047bede8943b47cedffdb7899b`, branch `codex/issues-1-3-sso-profile`, published with #1 as [draft PR #22](https://git.sharedroot.net/jchapman/Immich-Bridge/pulls/22). OIDC display_name is separate from the unchanged internal username and issuer+subject key. Verified ID-token name takes precedence over preferred_username, with SSO user as the fallback. Text is normalized/bounded to 128 Unicode characters and rendered as text. Names refresh at successful provider sign-in; legacy accounts use the fallback until then. Session header, administrator list/manage view and audit labels display readable names. Stable account IDs distinguish duplicate names and remain the targets for administrator actions. Display/email/role claims cannot merge accounts or grant administrator access; verified-email processing and ordinary-user defaults remain intact. Signed-token regressions cover duplicate and changed names, absent/blank/malformed claims, Unicode bounds, HTML/control text, different issuers with the same subject, matching local usernames/emails and unchanged privileges/email-verification rules. API/browser regressions verify safe serialization/rendering, legacy/local fallbacks, readable session/admin views and independent management of duplicate-name accounts. [OIDC guide](https://git.sharedroot.net/jchapman/Immich-Bridge/src/commit/2ff357ea691e88047bede8943b47cedffdb7899b/docs/oidc.md) and administration/testing/deployment guidance describe refresh, fallback, identity boundaries and remaining provider checks. Checks actually run and passed: - Linux AMD64 full backend suite and Go vet with the pinned real importer; focused API race suite, complete authentication/configuration/diagnostics/notification race packages and runner race suite through the Docker backend-race-tests target. - UI lint/build and dependency audit (zero reported vulnerabilities); all four focused Playwright suites (new SSO/profile plus existing availability, task activity and task email). - Disposable full browser/queue/SQLite/upload-recovery/settings walkthrough using the freshly built app and unchanged merged runner/processor images. Verified live label, local session name and encrypted label persistence across a disposable app replacement; all disposable containers/networks/volumes were removed. - Nine CI policy tests, source/document/workflow contracts, diff checks, redacted full-history and staged-source secret scans with no findings. The first system-Python policy run lacked PyYAML; rerunning with the repository's hash-pinned dependency passed. Existing UI bundle-size advisory remains. State: implemented, committed, locally tested and published for review; not merged, release-image-published or deployed. [Forgejo run 19](https://git.sharedroot.net/jchapman/Immich-Bridge/actions/runs/19) for this commit is waiting. Native AMD64/ARM64 release gates and actual-provider/deployed checks remain outstanding; no gate waiver is claimed. No pilot service or active upload/task was restarted or interrupted; no real library, provider or email delivery was used. Held #12/PR #19 and its checkout remain unchanged. Next handoff: review draft PR #22 against main, complete required native validation, then coordinate an idle installation and run the documented provider/desktop/mobile checks. This issue remains open for review and merge.
Author
Owner

Merged at the owner's explicit request after their review: PR #22, main merge 09085fa7b7bdaf46be48b34cd8ac3068f315320e, preserving feature commit 2ff357ea691e88047bede8943b47cedffdb7899b.

Merge verification: no conflicts; current main was the original base. The merged Git tree a01dfdd638f7a61996d8b401c9115852418daa79 exactly matches the previously validated feature source. Feature ancestry, clean worktree and diff checks passed. No implementation edits or repeated application suites were needed for this unchanged source. The prior handoff records passing backend/vet/race, all four focused browser suites, full disposable application/settings/restart walkthrough, UI lint/build/audit, nine CI policy tests, documentation contracts and secret scans.

Closing this completed development issue at the owner's explicit request. Readable verified OIDC profile names now appear in session/admin views, with bounded plain-text rendering and a clear fallback. Issuer+subject identity, ordinary-user defaults and verified-email rules are preserved; administrator actions use stable IDs. Acceptance regressions include changed/duplicate/absent/malformed names, different issuers, local-account separation and escaping. Legacy names refresh at the next provider sign-in.

Source is merged, not deployed or release-image-published. Native Forgejo AMD64/ARM64 checks and the aggregate release gate remain outstanding; run 20 is waiting. Closing this issue does not waive release or installation checks. Next: complete native validation, coordinate an idle installation, and verify the actual provider plus desktop/mobile behavior using the installation checklist and OIDC guide. No pilot service or active upload/task was restarted or interrupted. Held #12/PR #19 remain untouched.

Merged at the owner's explicit request after their review: [PR #22](https://git.sharedroot.net/jchapman/Immich-Bridge/pulls/22), main merge `09085fa7b7bdaf46be48b34cd8ac3068f315320e`, preserving feature commit `2ff357ea691e88047bede8943b47cedffdb7899b`. Merge verification: no conflicts; current main was the original base. The merged Git tree `a01dfdd638f7a61996d8b401c9115852418daa79` exactly matches the previously validated feature source. Feature ancestry, clean worktree and diff checks passed. No implementation edits or repeated application suites were needed for this unchanged source. The prior handoff records passing backend/vet/race, all four focused browser suites, full disposable application/settings/restart walkthrough, UI lint/build/audit, nine CI policy tests, documentation contracts and secret scans. Closing this completed development issue at the owner's explicit request. Readable verified OIDC profile names now appear in session/admin views, with bounded plain-text rendering and a clear fallback. Issuer+subject identity, ordinary-user defaults and verified-email rules are preserved; administrator actions use stable IDs. Acceptance regressions include changed/duplicate/absent/malformed names, different issuers, local-account separation and escaping. Legacy names refresh at the next provider sign-in. Source is merged, not deployed or release-image-published. Native Forgejo AMD64/ARM64 checks and the aggregate release gate remain outstanding; [run 20](https://git.sharedroot.net/jchapman/Immich-Bridge/actions/runs/20) is waiting. Closing this issue does not waive release or installation checks. Next: complete native validation, coordinate an idle installation, and verify the actual provider plus desktop/mobile behavior using the [installation checklist](https://git.sharedroot.net/jchapman/Immich-Bridge/src/branch/main/docs/deployment.md) and [OIDC guide](https://git.sharedroot.net/jchapman/Immich-Bridge/src/branch/main/docs/oidc.md). No pilot service or active upload/task was restarted or interrupted. Held #12/PR #19 remain untouched.
Sign in to join this conversation.
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
jchapman/Immich-Bridge#3
No description provided.