Skip to content

feat(trakrf-backend): per-env JWT access-token TTL → 900 (preview + prod) (TRA-843) - #134

Merged
mikestankavich merged 2 commits into
mainfrom
worktree-miks2u+tra-843-preview-jwt-ttl-900
May 30, 2026
Merged

feat(trakrf-backend): per-env JWT access-token TTL → 900 (preview + prod) (TRA-843)#134
mikestankavich merged 2 commits into
mainfrom
worktree-miks2u+tra-843-preview-jwt-ttl-900

Conversation

@mikestankavich

@mikestankavich mikestankavich commented May 30, 2026

Copy link
Copy Markdown
Contributor

What

Promote jwtExpirationSeconds (→ backend JWT_EXPIRATION) to a per-env value in the root chart, and set the short access-token TTL on both envs:

  • PREVIEW: jwtExpirationSeconds: "900" (15 min)
  • PROD: jwtExpirationSeconds: "900" (15 min) — added per Mike's call during the 2026-05-30 cutover window.

Why per-env

jwtExpirationSeconds previously lived only in the chart base (helm/trakrf-backend/values.yaml: "3600"); the root envs map didn't carry it. Promoting it to the per-env map (same values-addition-only pattern as appEnv/environmentLabel/imageTag) makes each env's TTL an independent one-line value.

Changes

  • argocd/root/values.yamljwtExpirationSeconds per env (preview="900", prod="900"), plus doc comment.
  • argocd/root/templates/trakrf-backend.yaml — emit it into the backend config: inlineValues, appended before the top-level image: key. Empty falls back to the chart default.

Safe on preview

Refresh-token rotation (POST /api/v1/auth/refresh, trakrf/platform #416) is live + verified on preview. 3h preview soak (PEAK_VUS=10, STAGE_S=3600, scenario #442): biz_ok 99.99% (219,704/219,706), 21 token refreshes, 0 auth 401s — vs the 2026-05-26 baseline of 11.87%.

⚠️ Prod caveat — read before merge

Prod is now "900" too. This assumes PR #416's /auth/refresh is on the running :prod image (currently floating :prodsha-c372f81, the TRA-853 ServeSPA image — refresh presence not independently verified). If that image lacks the refresh endpoint, prod users hit 15-min re-logins with no refresh path. This was a deliberate call by Mike given the 2026-05-30 cutover / pre-prod dry-run state.

The change is inert until the next scripts/apply-root-app.sh against the live cluster — that apply is the real safety checkpoint.

⚠️ Apply note

Root-chart template edits don't auto-sync. After merge, re-run scripts/apply-root-app.sh <cluster> for the live cluster (GKE) to materialize the new inlineValues.

Verification

helm template argocd/root renders:

  • trakrf-backend-previewconfig.jwtExpirationSeconds: "900"
  • trakrf-backend-prodconfig.jwtExpirationSeconds: "900"

Refs: TRA-843; trakrf/platform #416 (refresh endpoint), #442 (soak scenario).

🤖 Generated with Claude Code

Mike Stankavich and others added 2 commits May 30, 2026 06:43
…843)

Promote jwtExpirationSeconds (backend JWT_EXPIRATION) to a per-env value in
the root chart so the short-access-token half of the refresh design can land
on preview ahead of prod.

Previously this lived only in the chart base (helm/trakrf-backend/values.yaml:
"3600") and the root envs map didn't carry it — a base flip would have hit
preview AND prod at once, forcing 15-min re-logins on real prod users before
refresh ships there.

- argocd/root/values.yaml: add jwtExpirationSeconds per env
  (preview="900", prod="3600" held).
- argocd/root/templates/trakrf-backend.yaml: emit it into config inlineValues,
  appended before the top-level image: key; empty falls back to chart default.

Preview is safe now: refresh-token rotation (POST /api/v1/auth/refresh) is live
and soaked — 3h preview soak biz_ok 99.99% (219,704/219,706), 21 refreshes, 0
auth 401s, vs 11.87% baseline (2026-05-26).

Prod stays at "3600" — gated on PR #416's refresh endpoint being on the :prod
image AND the 06-01 launch-readiness window. Flipping prod later is a one-line
value edit + scripts/apply-root-app.sh re-apply (root-template edits don't
auto-sync).

Refs: trakrf/platform #416 (refresh), #442 (soak scenario).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per Mike's call during the 2026-05-30 cutover window, realize the short
access-token TTL on prod as well, not just preview.

- argocd/root/values.yaml: prod jwtExpirationSeconds "3600" → "900".

Caveat (carried in the value's inline comment + PR body): this assumes PR #416's
refresh endpoint (POST /api/v1/auth/refresh) is on the running :prod image
(currently floating :prod → sha-c372f81, TRA-853 ServeSPA). If it is not, prod
users hit 15-min re-logins with no refresh path. Change is inert until the next
scripts/apply-root-app.sh against the live cluster — that apply is the real
safety checkpoint.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikestankavich mikestankavich changed the title feat(trakrf-backend): per-env JWT access-token TTL; preview→900 (TRA-843) feat(trakrf-backend): per-env JWT access-token TTL → 900 (preview + prod) (TRA-843) May 30, 2026
@mikestankavich
mikestankavich merged commit 35d3015 into main May 30, 2026
39 of 40 checks passed
@mikestankavich
mikestankavich deleted the worktree-miks2u+tra-843-preview-jwt-ttl-900 branch May 30, 2026 11:54
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