Persist per-install JWT signing secret #3

Merged
Ghost merged 1 commit from blake/jwt-secret-persist into master 2026-08-31 23:57:55 +00: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.
Persist a per-install JWT signing secret instead of a compiled-in default.
All checks were successful
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 23:57:55 +00:00
Ghost deleted branch blake/jwt-secret-persist 2026-08-31 23:57:55 +00:00
Sign in to join this conversation.
No reviewers
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
s1d3sw1ped/helix-proxy!3
No description provided.