Skip to content

harden Tinybird JWT limits and cache - #367

Merged
Makisuo merged 1 commit into
mainfrom
codex/harden-tinybird-jwt
Aug 8, 2026
Merged

harden Tinybird JWT limits and cache#367
Makisuo merged 1 commit into
mainfrom
codex/harden-tinybird-jwt

Conversation

@Makisuo

@Makisuo Makisuo commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add opt-in, per-org Tinybird JWT RPS limits
  • fail fast on partial JWT signing config and warn when runtime/admin tokens are shared
  • bound the per-isolate JWT cache with expiration and LRU eviction
  • document and deploy the new optional setting

Why

Tinybird rate limits are grouped by JWT name, so a shared name would let one org consume the entire allowance. The existing token cache was also unbounded, and partial signing configuration only failed on first use.

Impact

No auth or warehouse-routing changes. RPS limiting remains disabled unless TINYBIRD_RAW_SQL_JWT_RPS_LIMIT is configured.

Validation

  • 46 focused Vitest tests
  • bun run --cwd apps/api typecheck
  • bunx tsc --noEmit -p tsconfig.alchemy.json
  • Oxlint on changed TypeScript files

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@Makisuo
Makisuo marked this pull request as ready for review August 8, 2026 13:29
@Makisuo
Makisuo merged commit d9210db into main Aug 8, 2026
11 checks passed
@Makisuo
Makisuo deleted the codex/harden-tinybird-jwt branch August 8, 2026 16:13
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

🍁 Maple PR preview

Note

Preview resources were removed when this pull request closed.

Final commit 132d875 · View workflow run

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