caelum0x 03e4cd213c fix(toolgate): harden OAuth dynamic client registration and consent
Security report 2026-11-12: open DCR stays (MCP clients self-register),
but the consent step now carries the trust decision.

- Consent page marks dcr/cimd clients "Unverified app", shows the
  redirect host (or "an app on this computer") as the thing to check,
  says when the client registered itself, and warns that any app can
  call itself Claude or Scribase. First-party CLI is labelled as such.
- admin scope can no longer be requested by dcr/cimd clients (authorize
  and device flows); only the first-party CLI may hold it.
- redirect_uris: no userinfo, host required, <=2048 chars each, deduped;
  error text spells the rules out.
- POST /oauth/register: per-address 10/10min + global 200/h sliding
  window (429 + Retry-After), 16 KB body cap, client_name stripped of
  control chars.
- Store: delete_client + prune_dcr_clients; server drops dcr clients
  that never got a grant in 7 days or had none in 60, at start and
  every 6 h.
- MCP serverInfo is scribase-toolgate / Scribase Toolgate (was
  switchyard).
- Catalog: relay.chat.complete example uses
  tensorzero::model_name::openai/gpt-oss-20b, which Relay accepts
  (the old openrouter:: name returned 400).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-11-12 16:22:22 +03:00
..