Skip to content

Rate limiting per credential, failed-key throttle, one-worker guard - #112

Merged
warheart1984-ctrl merged 1 commit into
mainfrom
feat/rate-limit-per-credential
Oct 17, 2026
Merged

warheart1984-ctrl merged 1 commit into
mainfrom
feat/rate-limit-per-credential

Conversation

@warheart1984-ctrl

Copy link
Copy Markdown
Owner

RFC appendix items 17 and 21 (studies of mcp-gateway, mcp-zero, mcp-multitenant-gateway).

  • /mcp rate limit is charged to the authenticated credential (key id / OAuth subject / operator), the client address only when nobody authenticated; idle buckets evicted, table capped.
  • Failed tenant-key attempts counted per (client address, key id); past JARVIS_KEY_FAIL_LIMIT_PER_MINUTE (20) a 429 is returned before any HMAC or database work. Per address as well, so a stranger cannot lock the owner out.
  • More than one worker refuses to start unless JARVIS_RATE_LIMIT_SHARED_BACKEND is set. The box runs one worker: no change.
  • Docs: RFC items 17/21, tenant_keys.md, README + deploy/mint/README + POSTGRES.md say main is schema v10 and the box is still v9 (not deployed).

Tests: tests/test_rate_limit_credential.py (7), four mutants each caught. Local: full default-backend suite 2930 passed, 13 skipped. The full Postgres-backend pass was too slow to finish locally (stopped by my timeout at ~58%, no failures before that); the related Postgres suites (rate limit, key auth, tenant keys, public security) pass, and CI's test-postgres job runs the rest.

🤖 Generated with Claude Code

…schema v10 docs (RFC items 17, 21)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d7fa835e77

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread app/public_security.py
Comment thread app/auth.py
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-17T02:19:34.173204Z d7fa835 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@warheart1984-ctrl
warheart1984-ctrl merged commit 1cdbb09 into main Oct 17, 2026
4 checks passed
@warheart1984-ctrl
warheart1984-ctrl deleted the feat/rate-limit-per-credential branch October 17, 2026 03:13
warheart1984-ctrl added a commit that referenced this pull request Oct 17, 2026
…newest (Codex on #112)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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