Files
harukaandClaude Opus 5.5 ee71c7f379 fix(backend): harden management MCP per review
- Reject JSON-RPC batches and non-object bodies before the SDK; return each
  tool result once as text and bound the encoded payload (H1).
- Enable MCP only when MCP_PUBLIC_URL is set; drop the frontend URL fallback
  and expose a read-only mcp_enabled public setting (M1).
- Expire never-authorized clients after 24h, cap pending registrations
  globally, aggregate MCP IP limits by IPv6 /64, and limit registration
  bodies to 4 KiB (M2).
- Revoke MCP grants with revoke-all-sessions and always require step-up for
  administrator write grants (M3).
- Rate limit /api/v1/mcp per IP before authentication and write last_used_at
  at most once per minute (M4).
- Persistently revoke grants when an account is disabled or demoted, derive
  result redaction from SensitiveCredentialKeys, allowlist browser sessions
  for step-up, audit every MCP read, reject invisible characters in
  client_name, and document site-root-only deployment (L1-L5, L7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 09:30:23 -04:00
..