Skip to main content
← Back to list
01Issue
FeatureOpenSwamp CLIPublic
AssigneesNone

Relationships

#5090 serve: sign in through a generic OIDC provider (or a trusted proxy header)

Opened by ascandroli · 11/25/2026

Summary

Let swamp serve sign people in through a standard OpenID Connect provider (Authelia, Keycloak, Authentik, Dex, Zitadel, Okta, Entra ID…), or failing that, accept an authenticated user from a trusted reverse-proxy header.

Why

Self-hosters often already run an OIDC provider in front of their internal tools. Today --auth-mode oauth speaks swamp-club's own API (/api/auth/device/code, /api/auth/device/token, /api/auth/oauth2/userinfo, /api/v1/serve/instances, /api/auth/resolve-user), so --oauth-provider can point only at a swamp-club deployment (#1893), not at a generic IdP. That leaves --auth-mode token. Put behind a forward-auth proxy, token mode means two sign-ins: the IdP's for the page, then a swamp server token for the dashboard. It also means minting and handing out tokens per person by hand, and the identity swamp records on a run is the token's name, not the person the IdP signed in.

Swamp apps make this matter more: they are a natural UI for a homelab or small team, and the people using them are already in the house IdP.

Proposal (either would do)

  1. --auth-mode oidc: standard authorization-code + PKCE against an issuer's discovery document (--oidc-issuer, --oidc-client-id, --oidc-client-secret-file), with the subject or a chosen claim as the principal (user:<claim>), and groups from a configurable claim as idp-group:<name> subjects for grants. Device flow for the CLI where the IdP supports it.
  2. Trusted proxy header: --auth-mode proxy --proxy-user-header Remote-User --proxy-groups-header Remote-Groups, honoured only from --trusted-proxies <CIDRs>. That is the shape Grafana, Gitea/Forgejo and many others offer for forward-auth setups.

The grant model already has idp-group: subjects, so either one would plug into existing grants unchanged.

Today's workaround

--auth-mode token behind a forward-auth proxy, with per-person server tokens, and two sign-ins.

02Bog Flow
◉OPEN○TRIAGED○IN PROGRESS○SHIPPED

Open

11/25/2026, 10:43:03 AM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.