Skip to content

feat(secrets): wire POD_TOKEN_SIGNING_SECRET for stateless pod tokens (client-runtime#79)#205

Merged
saadqbal merged 1 commit into
developfrom
feat/pod-token-signing-secret
Jun 4, 2026
Merged

feat(secrets): wire POD_TOKEN_SIGNING_SECRET for stateless pod tokens (client-runtime#79)#205
saadqbal merged 1 commit into
developfrom
feat/pod-token-signing-secret

Conversation

@saadqbal
Copy link
Copy Markdown
Contributor

@saadqbal saadqbal commented Jun 4, 2026

Chart side of client-runtime#79 (stateless signed pod-proxy tokens, code in client-runtime#89). Deploying the signing secret is what flips the runtime from the legacy pod_tokens table into stateless mode — the jobs-manager mints HMAC-signed tokens, the requests-proxy verifies them by signature+expiry, and the token-revoke-while-live race class (#52#58, #86) ceases to exist.

Changes

  • secrets.yaml — add POD_TOKEN_SIGNING_SECRET to the Opaque secret. Stable across upgrades via lookup: explicit .Values.podTokenSigningSecret > value already stored in the live Secret > freshly generated randAlphaNum 48. So a token minted before an upgrade still verifies after. Only added to the release-namespace secret (not the node-agents mirror, which exists solely for the resource-monitor's CLIENT_ID/PASSWORD).
  • jobs-manager-deployment.yaml — inject POD_TOKEN_SIGNING_SECRET (secretKeyRef) + POD_TOKEN_TTL_SECONDS (value).
  • requests-proxy-deployment.yaml — inject POD_TOKEN_SIGNING_SECRET (secretKeyRef), verify side.
  • values.yamlpodTokenSigningSecret: "" (auto-generate) + podTokenTtlSeconds: 604800.
  • Chart.yaml — 1.4.5 → 1.5.0.

Safety / rollout notes

  • The secret is never injected into training pods (untrusted code) — only the minted REQUESTS_PROXY_TOKEN reaches them.
  • Auto-generates by default; operators can pin or rotate via podTokenSigningSecret (rotation invalidates live tokens → pods respawn).
  • Set podTokenTtlSeconds to comfortably exceed the longest training-job duration (default 7d), else a long job 401s mid-run when its token expires.
  • helm template + helm lint pass.
  • Cutover: in-flight pods carrying old UUID tokens will 401 against a stateless proxy until replaced — brief, one-time.

Refs client-runtime#79, client-runtime#89. Closes #204.

🤖 Generated with Claude Code


Note

Medium Risk
Changes authentication wiring for the requests-proxy path and secret stability across upgrades; rollout can briefly break in-flight pods using legacy tokens.

Overview
Helm chart 1.5.0 deploys the shared HMAC secret that switches pod-proxy auth from the legacy pod_tokens table to stateless signed tokens (jobs-manager mints, requests-proxy verifies by signature + expiry).

secrets.yaml adds POD_TOKEN_SIGNING_SECRET with upgrade-stable resolution: explicit podTokenSigningSecret → existing Secret via lookuprandAlphaNum 48 on first install. The key is not copied to the node-agents secret mirror.

jobs-manager gets POD_TOKEN_SIGNING_SECRET and POD_TOKEN_TTL_SECONDS (default 7 days). requests-proxy gets the same signing secret env only.

values.yaml documents optional pin/rotation and TTL; mis-set TTL can 401 long-running jobs mid-run. In-flight pods with old UUID tokens may 401 until respawned after cutover.

Reviewed by Cursor Bugbot for commit d06e846. Bugbot is set up for automated code reviews on this repo. Configure here.

… (client-runtime#79)

Chart side of the stateless signed pod-proxy token work (client-runtime#89).
When the secret is present, the jobs-manager mints HMAC-signed tokens and the
requests-proxy verifies them statelessly — no pod_tokens table, eliminating
the token-revoke-while-live race class.

- secrets.yaml: add POD_TOKEN_SIGNING_SECRET to the Opaque secret. Stable
  across upgrades via lookup (explicit value > existing stored value >
  generated random) so a token minted before an upgrade still verifies after.
  Only in the release-namespace secret (not the node-agents mirror).
- jobs-manager-deployment.yaml: inject POD_TOKEN_SIGNING_SECRET (secretKeyRef)
  + POD_TOKEN_TTL_SECONDS (value, default 604800).
- requests-proxy-deployment.yaml: inject POD_TOKEN_SIGNING_SECRET (secretKeyRef).
- values.yaml: podTokenSigningSecret "" (auto-generate) + podTokenTtlSeconds.
- Chart version/appVersion 1.4.5 -> 1.5.0.

Secret is never injected into training pods. helm template + helm lint pass.

Refs client-runtime#79, client-runtime#89. Closes #204.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@LukasWodka
Copy link
Copy Markdown
Contributor

👋 Heads-up — Code review queue is at 16 / 8

Above the WIP limit. The team convention is to review existing PRs before opening new work.

Open PRs currently in Code review (oldest first):

Pull from review before opening new work. (This is a nudge from the kanban WIP check, not a block.)

@saadqbal saadqbal self-assigned this Jun 4, 2026
@saadqbal saadqbal merged commit 013a88b into develop Jun 4, 2026
17 checks passed
saadqbal added a commit that referenced this pull request Jun 4, 2026
…206)

feat(secrets): wire POD_TOKEN_SIGNING_SECRET for stateless pod tokens (client-runtime#79)
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.

3 participants