Skip to content

fix(chart): keep keys across upgrades and serve metrics from a dedicated listener - #1406

Merged
dunglas merged 3 commits into
mainfrom
fix/chart-hardening
Sep 24, 2026
Merged

dunglas merged 3 commits into
mainfrom
fix/chart-hardening

Conversation

@dunglas

@dunglas dunglas commented Sep 24, 2026

Copy link
Copy Markdown
Owner

Changes

  • Generated JWT keys are reused from the release Secret through lookup, so a helm upgrade no longer rotates them, invalidating every token. The checksum annotation hashes the Secret's inputs rather than its render.
  • The metrics Service targets a dedicated metrics listener (port 9180). It targeted the admin API, which only listens on localhost; making it work meant binding the admin API, with /load, /config and /stop, to the pod network.
  • New resourceIdentifier and publicUrls values pin the hub identity. With the chart's catch-all SERVER_NAME, the hub otherwise derives the token audience from the client's Host.

Notes

resourceIdentifier and publicUrls are opt-in: deriving them from the ingress hosts would make kubectl port-forward and NodePort access answer 421.

Every render generated new random keys, so each helm upgrade rotated them,
invalidating every token and breaking publishers. Reuse the keys stored in
the release Secret, and hash the Secret's inputs rather than its render.
The metrics Service targeted the admin API, which only listens on localhost:
making it work meant binding the admin API to the pod network, which exposes
/load, /config and /stop.
With the chart's catch-all SERVER_NAME, the hub derives the token audience
from the client's Host. resourceIdentifier and publicUrls pin it for hubs
reachable under any Host, such as several hubs trusting one issuer.
@dunglas
dunglas merged commit c000dc9 into main Sep 24, 2026
47 checks passed
@dunglas
dunglas deleted the fix/chart-hardening branch September 24, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant