Commit Graph
11 Commits
Author SHA1 Message Date
Archibold f266bc5104 Add container image: two-stage uv build, non-root user, data volume 2026-11-07 15:02:24 +11:00
Archibold a39da9e615 Ignore local scratch and the secrets-carrying start.sh 2026-11-07 14:44:10 +11:00
Archibold b9a92fc482 Handle encrypted/HS256 id_tokens and let an admin claim promote on login 2026-11-07 14:42:56 +11:00
Archibold 27677215bd Handle encrypted and HS256 id_tokens in the OIDC callback
Authlib's parse_id_token only reads a 3-segment JWS, so sign-in 500s
against providers that encrypt the id_token (Authentik with an
Encryption Key issues a 5-segment RSA-OAEP-256/A256CBC-HS512 JWE) or
that sign it with the client secret (Authentik with no Signing Key
issues HS256, which the RS256-only JWKS rejects).

OIDCClient subclasses the starlette OAuth2 client and, when the
standard parse fails on a format problem, falls back to an HS256
decode with the client secret, then to the issuer's
userinfo_endpoint. Claim-level failures (bad nonce, expiry, audience,
issuer) are raised as OAuthError so /auth/callback redirects to
/auth/login?error=... instead of blowing up. /auth/authorize likewise
catches provider/network errors and redirects to the login page.
2026-11-05 16:24:22 +11:00
Archibold 3187b8cf05 Add opt-in OIDC sign-in with session cookie and roles
Auth is enabled only when issuer, client id and client secret are all set;
otherwise the dashboard stays an open LAN dashboard. Provider endpoints are
discovered from <issuer>/.well-known/openid-configuration via Authlib, so no
provider-specific code is needed.

- auth.py: /auth/login, /auth/authorize, /auth/callback, /auth/logout (RP-initiated
  logout when the issuer advertises end_session_endpoint)
- users.py: atomic, lock-guarded data/users.json keyed by the OIDC sub
- role resolution: admin claim wins, else first user bootstraps as admin, else viewer
- api.py/app.py: session middleware and require_login/require_admin gating on every
  route except /health, /auth/* and /static
- config.py/main.py: UWUDASH_OIDC_* / UWUDASH_SESSION_* env vars plus --oidc-issuer
  and --public-url flags
- templates/login.html, static app.js/styles.css: sign-in page and settings UI
2026-10-31 10:36:39 +11:00
Archibold 2e78143812 Add README with usage, proxy mapping and limitations 2026-10-28 21:44:52 +11:00
Archibold 85bad1d0e8 Add dashboard frontend: sidebar, iframe viewer and settings page 2026-10-28 21:44:52 +11:00
Archibold 73315a939e Add service CRUD API, app factory and CLI entrypoint 2026-10-28 21:44:52 +11:00
Archibold 9e6e7745d0 Add reverse proxy: origin mapping, HTML/redirect rewriting, frame-option stripping 2026-10-28 21:44:52 +11:00
Archibold 137d528ad2 Add env-driven config, service models and atomic JSON store 2026-10-28 21:44:52 +11:00
Archibold fc6ee0d748 Add uv project scaffolding and dependency lock 2026-10-28 21:44:52 +11:00