feat(auth): Pocket ID sign-in via oauth2-proxy sidecar #3

Merged
nick merged 2 commits from feature/oauth2-proxy-pocketid into main 2026-11-04 13:38:51 +01:00
Owner

Public sign-in for agent.barbara8.de moves from the app username/password login to an oauth2-proxy sidecar authenticating against Pocket ID (auth.barbara8.de, passkey-first OIDC).

  • compose: oauth2-proxy v7.15.5 sidecar (OIDC discovery, PKCE S256, /ping public, trusted Caddy hop); ingress target 100.96.0.81:18125; app port no longer published; precheck requires the 3 OAUTH2_PROXY_* vars
  • app: gate() trusts proxy X-Auth-Request-* headers; legacy UI_PASSWORD login = optional escape hatch (disabled + notice when unseeded); sign-out via proxy /sign_out?rd=/login
  • CI: docker-oauth2-proxy mirror job (quay.io -> code.schwanke.it, SHA+latest); deploy sends OAUTH2_PROXY_IMAGE
  • secrets: OAUTH2_PROXY_CLIENT_ID/SECRET + COOKIE_SECRET are isSecret:true Dockhand stack secrets seeded once out-of-band, never re-sent by CI (already seeded into the stack)
  • verified locally against the live IdP: discovery, 302 to auth.barbara8.de/authorize (PKCE), /ping OK; 262 tests pass
Public sign-in for agent.barbara8.de moves from the app username/password login to an oauth2-proxy sidecar authenticating against Pocket ID (auth.barbara8.de, passkey-first OIDC). - compose: oauth2-proxy v7.15.5 sidecar (OIDC discovery, PKCE S256, /ping public, trusted Caddy hop); ingress target 100.96.0.81:18125; app port no longer published; precheck requires the 3 OAUTH2_PROXY_* vars - app: gate() trusts proxy X-Auth-Request-* headers; legacy UI_PASSWORD login = optional escape hatch (disabled + notice when unseeded); sign-out via proxy /sign_out?rd=/login - CI: docker-oauth2-proxy mirror job (quay.io -> code.schwanke.it, SHA+latest); deploy sends OAUTH2_PROXY_IMAGE - secrets: OAUTH2_PROXY_CLIENT_ID/SECRET + COOKIE_SECRET are isSecret:true Dockhand stack secrets seeded once out-of-band, never re-sent by CI (already seeded into the stack) - verified locally against the live IdP: discovery, 302 to auth.barbara8.de/authorize (PKCE), /ping OK; 262 tests pass
Public sign-in for agent.barbara8.de moves from the app's own
username/password login to an oauth2-proxy sidecar authenticating
against Pocket ID (auth.barbara8.de, passkey-first OIDC).

- compose: new oauth2-proxy service (v7.15.5, CLI config, OIDC
  discovery at boot, PKCE S256, /ping public, 100.113.11.77 trusted
  proxy hop); ingress target moves app 18123 -> proxy 18125; the app
  port is no longer host-published; precheck now requires the three
  OAUTH2_PROXY_* vars
- app: gate() trusts the proxy's X-Auth-Request-* headers (primary
  path); legacy UI_PASSWORD login kept as an optional escape hatch,
  disabled with a notice page when unseeded; /logout returns the
  proxy /sign_out?rd=/login target; dashboard + calendar sign-out
  follow it
- CI: new docker-oauth2-proxy job mirrors quay.io/oauth2-proxy to
  code.schwanke.it/home/agent/oauth2-proxy (SHA + latest); deploy
  job sends OAUTH2_PROXY_IMAGE (non-secret) — the three proxy
  credentials stay isSecret:true Dockhand stack secrets seeded once
  out-of-band (bootstrap/seed-oauth2-proxy.sh) and never re-sent
- docs: spec + .env.example updated; auth-gate.test.ts covers the
  header trust, legacy fallback, logout contract, and disabled page

Verified locally against the live IdP: discovery, unauthenticated
302 to auth.barbara8.de/authorize (PKCE), /ping 200.
docs: fix cookie-secret length (openssl rand -hex 16 = 16 bytes)
All checks were successful
CI/CD / Typecheck & test (pull_request) Successful in 1m56s
CI/CD / Build & push app image (pull_request) Has been skipped
CI/CD / Build & push oauth2-proxy image (pull_request) Has been skipped
CI/CD / Deploy to Dockhand (pull_request) Has been skipped
9062245e9c
nick merged commit 709f3134a3 into main 2026-11-04 13:38:51 +01:00
nick deleted branch feature/oauth2-proxy-pocketid 2026-11-04 13:38:51 +01: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
home/agent!3
No description provided.