~bigbes/sr-ht-spec

ref: a93855e6dc08555784023f290b5eb5ed5f830437 sr-ht-spec/mcpsrv/gate_test.go -rw-r--r-- 2.3 KiB
7cc652d5 — Eugene Blikh 25 days ago
fix(mcpsrv): gate read tools to owner+agents (spec-jjo)

The MCP read tools (spec_search/spec_read/spec_list) enforced no ACL:
anyone clearing the Host allowlist could read approved content. graph's
/query and the web UI gate reads to owner+agents; /mcp did not. Add the
same fail-closed gate to the whole MCP surface — initialize, tools/list
and tools/call — mounted inside the resolver middleware so it sees the
resolved principal. spec_propose was already fail-closed in service.Propose;
this makes the read tools match.

Pre-existing since Phase 2, cheap now that /mcp resolves a principal.

Closes spec-jjo