Skip to content

feat(sso): vendor icons, provider presets, callback URL and Dex config snippet - #433

Merged
M0Rf30 merged 1 commit into
mainfrom
feat/sso-vendor-ui
Nov 8, 2026
Merged

M0Rf30 merged 1 commit into
mainfrom
feat/sso-vendor-ui

Conversation

@M0Rf30

@M0Rf30 M0Rf30 commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #431: the SSO admin UI and login page get vendor icons, presets, the callback URL and a generated Dex config.

What changed

  1. Stored icon, resolved on the server.
    • Migration 018_sso_provider_icon.sql adds auth_sso_providers.icon (NOT NULL DEFAULT '', additive). The table is not journaled, so the recovery registry needs nothing.
    • Allowed keys: "" (automatic), google, github, gitlab, okta, auth0, keycloak, authentik, gitea, bitbucket, atlassian, openshift, openstack, openid, ldap, saml, key. An unknown key on create or PATCH is a 400 validation_failed; PATCH is column-wise, "" returns to automatic.
    • One pure resolver, auth.ResolveSSOIcon, with the precedence: explicit icon, GitHub type, Dex connector id naming a vendor, issuer or SAML metadata host/path, else openid/saml.
    • The public provider list gains icon (never empty). The admin API gains icon, resolved_icon and callback_url (OIDC redirect URI or SAML ACS, built from BASE_URL; the URL builders are shared with the OIDC/SAML loaders).
    • Declarative SSOProvider accepts icon. OpenAPI, generated web types and API docs regenerated.
  2. Icons in the web UI. SsoIcon draws simple-icons glyphs (and heroicons for ldap/saml/key) in currentColor. The login page uses provider.icon from the API (slug guessing removed); the provider card shows the icon and a vendor label ("GitHub via Dex" for a Dex-pinned provider); the form has an icon picker. Microsoft Entra, Ping, OneLogin, JumpCloud, Duo and Dex have no simple-icons glyph and fall back to the generic key; no logos are drawn.
  3. Vendor presets (UI only, nothing preset-related is stored): Google, Microsoft Entra, Okta, Keycloak, Auth0, Authentik, GitHub, generic OIDC, generic OAuth2 and Dex with a connector-type select. Issuer patterns are placeholders and hints, never saved values (only Google's fixed issuer is prefilled). Editing an existing provider infers the preset from stored data only.
  4. Callback URL and Dex snippet. The form shows callback_url with the shared copy button (before the first save: the browsing origin plus the fixed route, with a hint). A Dex provider shows a generated staticClients entry (secretEnv, no secret printed) and a skeleton of the chosen connector, with a link to the Dex docs.

New strings are translated in all 11 locales. docs/security/sso.md has a new section on presets, icons (and the brand limitation), the callback URL and the Dex snippet; docs/getting-started/upgrading.md notes migration 018 (additive, no action).

Verification

  • make lint, make deadcode, make dup, go mod tidy -diff, make generate / make docs-gen / bun run generate-api (no drift), reuse lint, make docs-check.
  • Go: internal/api, internal/auth, internal/declarative, internal/backup, cmd/docgen, tests/ (including the new resolver table test, create/PATCH validation and public list tests).
  • Integration (-tags integration, Postgres 18): the SSO provider icon column round trip, audit name resolution, migrator tests, internal/recovery registry/schema tests, internal/backup.
  • Web: bun run typecheck, bun test (2374 pass), bun run i18n:check, bun run build.

Not run: a browser smoke test and the full Go test suites.

…et in the SSO admin UI

Providers get an optional icon (migration 018, default automatic). One server
side resolver (explicit icon, GitHub type, Dex connector id, issuer or metadata
host, else openid/saml) feeds the public provider list (icon) and the admin API
(icon, resolved_icon, callback_url). The login page and provider card draw the
icon from simple-icons or heroicons; vendors without a glyph fall back to the
generic key.

The provider form starts from a vendor preset (Google, Entra, Okta, Keycloak,
Auth0, Authentik, GitHub, OIDC, OAuth2, Dex), has an icon picker, shows the
callback URL with a copy button and, for Dex, a generated staticClients and
connector snippet.
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Coverage

Coverage vs main
Go, unit + integration 83.4% ±0.0
Go, unit tests only 69.9% ±0.0
Go, integration tests only 54.6% ±0.0
Web, lines 91.2% +0.4
Web, functions 84.8% +0.2
Go by area
Area Coverage vs main
cmd/docgen 80.3% ±0.0
cmd/genformats 90.8% ±0.0
cmd/oa 0.0% ±0.0
cmd/resetpw 0.0% ±0.0
cmd/server 70.7% ±0.0
internal/ai 85.6% ±0.0
internal/api 76.7% ±0.0
internal/apkkeys 77.1% ±0.0
internal/artifactpath 100.0% ±0.0
internal/attest 85.6% ±0.0
internal/audit 97.6% ±0.0
internal/auth 91.3% +0.2
internal/backup 72.1% ±0.0
internal/bgtask 96.8% ±0.0
internal/branding 93.5% ±0.0
internal/clientsetup 93.6% ±0.0
internal/config 96.4% ±0.0
internal/cron 90.0% ±0.0
internal/crypto 91.0% ±0.0
internal/curation 99.0% ±0.0
internal/database 78.0% ±0.0
internal/declarative 83.5% ±0.0
internal/dtrack 85.3% ±0.0
internal/exploit 94.1% ±0.0
internal/federation 81.1% ±0.0
internal/format 80.9% ±0.0
internal/formats 87.9% ±0.0
internal/gpgkeys 87.1% +0.3
internal/group 89.5% ±0.0
internal/httpcache 100.0% ±0.0
internal/httpcompress 93.3% ±0.0
internal/httpx 85.7% ±0.0
internal/importmeta 93.3% ±0.0
internal/iocopy 100.0% ±0.0
internal/itempath 98.3% ±0.0
internal/lazyre 100.0% ±0.0
internal/license 98.5% ±0.0
internal/licensemeta 87.5% ±0.0
internal/licensepolicy 92.6% ±0.0
internal/limitio 92.9% ±0.0
internal/mcp 89.5% ±0.0
internal/metrics 96.2% ±0.0
internal/middleware 94.0% ±0.0
internal/netutil 93.1% ±0.0
internal/nixkeys 79.6% ±0.0
internal/oacli 84.8% ±0.0
internal/ocimanifest 100.0% ±0.0
internal/ocipath 100.0% ±0.0
internal/osv 88.5% ±0.0
internal/passwd 93.3% ±0.0
internal/pathseg 100.0% ±0.0
internal/pglock 79.0% ±0.0
internal/pkgdeps 88.1% ±0.0
internal/presign 99.2% ±0.0
internal/promote 85.1% ±0.0
internal/proxy 86.5% ±0.0
internal/publicurl 96.8% ±0.0
internal/pypisimple 97.9% ±0.0
internal/quarantine 100.0% ±0.0
internal/quota 88.4% ±0.0
internal/recovery 85.5% -0.1
internal/registry 100.0% ±0.0
internal/replication 78.2% -0.1
internal/repodispatch 84.8% ±0.0
internal/repotype 97.0% ±0.0
internal/sbom 90.6% ±0.0
internal/scanexport 96.4% ±0.0
internal/search 90.7% ±0.0
internal/secrets 91.4% ±0.0
internal/storage 84.8% ±0.0
internal/telemetry 92.2% ±0.0
internal/tiering 83.5% ±0.0
internal/trash 96.7% ±0.0
internal/urlparams 100.0% ±0.0
internal/vuln 89.4% -0.1
internal/webhook 84.1% ±0.0
internal/worker 82.6% ±0.0
internal/workq 79.5% ±0.0
pkg/ansible 89.8% ±0.0
pkg/apk 96.0% ±0.0
pkg/cargo 95.6% ±0.0
pkg/compactindex 97.8% ±0.0
pkg/composer 94.5% ±0.0
pkg/conan 99.2% ±0.0
pkg/conda 94.8% ±0.0
pkg/deb 80.2% ±0.0
pkg/delta 71.4% ±0.0
pkg/gemversion 100.0% ±0.0
pkg/gpg 86.7% ±0.0
pkg/helm 97.0% ±0.0
pkg/logger 93.8% ±0.0
pkg/maven 96.7% ±0.0
pkg/nix 99.1% ±0.0
pkg/npm 88.0% ±0.0
pkg/nuget 97.6% ±0.0
pkg/pacman 90.4% ±0.0
pkg/pyversion 100.0% ±0.0
pkg/rpm 92.3% ±0.0
pkg/rpmsign 90.5% ±0.0
pkg/rubymarshal 87.1% ±0.0
pkg/xzlimit 63.3% ±0.0
tests/integration 78.8% ±0.0
web 93.7% ±0.0
Web by area (lines)
Area Coverage vs main
src 24.2% ±0.0
src/api 91.5% ±0.0
src/components 89.4% ±0.0
src/composables 92.3% ±0.0
src/i18n 98.4% ±0.0
src/lib 99.2% +0.4
src/pages 91.9% +1.2
src/pwa 97.6% ±0.0
src/router 99.7% ±0.0
src/stores 99.0% ±0.0
src/telemetry 90.9% ±0.0

Full report (HTML, merged profile) in the CI run artifacts

@M0Rf30
M0Rf30 merged commit b2eb093 into main Nov 8, 2026
25 checks passed
@M0Rf30
M0Rf30 deleted the feat/sso-vendor-ui branch November 8, 2026 11:50
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.

1 participant