feat(config): add tokenUrl, clientId, clientSecret to auth config #17

Merged
rock merged 1 commits from feat/p3.7-auth-config into main 2026-09-08 23:43:32 +00:00
Member

Closes homelab#12 (P3.7)

Changes

  • AuthConfig: added TokenURL, ClientID, ClientSecret fields
  • loader.go: reads tokenUrl/clientId from YAML, ClientSecret from AUTH_CLIENT_SECRET env
  • deployment.yaml: AUTH_CLIENT_SECRET from api-gw-client-secret Secret (optional)
  • gateway-config-secret.enc.yaml + configmap.yaml: added tokenUrl and clientId

Secret never in YAML

clientSecret deliberately omitted from YAML struct. Loaded from env only.

Tests

3 tests: full config load, env-only secret, backward compat (missing fields = zero).

Closes homelab#12 (P3.7) ## Changes - `AuthConfig`: added `TokenURL`, `ClientID`, `ClientSecret` fields - `loader.go`: reads `tokenUrl`/`clientId` from YAML, `ClientSecret` from `AUTH_CLIENT_SECRET` env - `deployment.yaml`: `AUTH_CLIENT_SECRET` from `api-gw-client-secret` Secret (optional) - `gateway-config-secret.enc.yaml` + `configmap.yaml`: added `tokenUrl` and `clientId` ## Secret never in YAML `clientSecret` deliberately omitted from YAML struct. Loaded from env only. ## Tests 3 tests: full config load, env-only secret, backward compat (missing fields = zero).
poimen added 1 commit 2026-09-08 23:25:56 +00:00
Wire token exchange config for /auth/token and /auth/refresh endpoints.
clientSecret loaded from AUTH_CLIENT_SECRET env var (never from YAML).
Backward compatible — missing fields default to zero values.

3 new tests covering: full config, env-only secret, backward compat.

Closes homelab#12

Co-authored-by: poimen <[email protected]>
rock merged commit ddee0f2dc9 into main 2026-09-08 23:43:32 +00:00
rock deleted branch feat/p3.7-auth-config 2026-09-08 23:44:01 +00:00
Sign in to join this conversation.