mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-06 15:12:30 +09:00
The WebSocket auth path (agent_gateway.on_auth) throttles auth attempts per-IP via _check_auth_rate_limit, but the REST long-poll equivalent, POST /api/v1/agent/connect, did full HMAC auth with no throttle. That left an unthrottled credential-stuffing surface against agent auth while the WS path stayed protected. connect() now calls the same shared limiter before verify_agent_auth and returns 429 when the per-IP window is exhausted. Adds a regression test that drives the real endpoint through the limit. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>