Persist per-install JWT signing secret #3

Merged
Ghost merged 1 commits from blake/jwt-secret-persist into master 2026-08-31 18:57:55 -05:00

Fixes #1

Stop signing admin JWTs with a compiled-in fallback secret. run now uses JWT_SECRET when set, otherwise a random per-install key in data/.jwt_secret (0600). Empty NewJWTManager("") uses a random in-memory secret so two processes no longer share a well-known key.

Not merged. Please review and merge if this looks right.

Fixes https://git.s1d3sw1ped.com/s1d3sw1ped/helix-proxy/issues/1 Stop signing admin JWTs with a compiled-in fallback secret. `run` now uses `JWT_SECRET` when set, otherwise a random per-install key in `data/.jwt_secret` (0600). Empty `NewJWTManager("")` uses a random in-memory secret so two processes no longer share a well-known key. Not merged. Please review and merge if this looks right.
Ghost added 1 commit 2026-08-31 18:55:41 -05:00
Persist a per-install JWT signing secret instead of a compiled-in default.
Format / gofmt (push) Successful in 8s
Format / gofmt (pull_request) Successful in 9s
CI / Build (push) Successful in 24s
CI / Build (pull_request) Successful in 25s
CI / Go Tests (pull_request) Successful in 39s
CI / Go Tests (push) Successful in 40s
22844a2a67
Admin tokens were forgeable whenever JWT_SECRET was unset. Prefer the env var, otherwise write a random key to data/.jwt_secret.
Ghost merged commit a43217b459 into master 2026-08-31 18:57:55 -05:00
Ghost deleted branch blake/jwt-secret-persist 2026-08-31 18:57:55 -05:00
Sign in to join this conversation.