feat: harden GBrain multi-agent MCP access#685
Conversation
|
Phase 4E PR hygiene complete. PR: #685 Checks/smoke:
Migration status:
Rollback:
No secrets or cleartext bearer tokens were minted/logged. |
|
Thank you for this work @chipoto69 — closing as superseded by your own later PR #1316, which carries forward the Phase 4 multi-agent hardening scope this PR started. #1316 itself stays open with a status comment explaining why the v0.41.3.0 wave (#1403) only extracts the pieces it can land without touching the v0.26.7 auto-RLS event trigger. The deny-by-default scope wiring + real operation names + last_used_at LRU debounce from your design are filed as TODOS T13a/T13b/T13c in TODOS.md, each citing #1316 as the cherry-pick starter. The OAuth CORS lockdown + register-client validator surface in #1403 builds on the security-hardening direction your PRs introduced. |
Summary
Test Plan
git diff --checkbun run typecheckbun run build:schemabun test test/oauth.test.ts test/scoped-tokens.test.ts test/migrate.test.ts test/rls-posture-migration.test.ts test/http-transport.test.ts test/token-last-used.test.ts test/doctor.test.ts— 197 passhermes,claude,codex: all list 43 tools and calllist_pagesMigration / verification status
SELECT token_name, scopes FROM access_tokens ORDER BY token_name;SELECT operation, COUNT(*) FROM mcp_request_log GROUP BY operation ORDER BY 2 DESC;SELECT COUNT(*) AS generic_mcp_request_rows FROM mcp_request_log WHERE operation = 'mcp_request';SELECT indexname, indexdef FROM pg_indexes WHERE tablename = 'mcp_request_log' ORDER BY indexname;EXPLAIN SELECT * FROM mcp_request_log WHERE token_name = 'agent-cto-ryde' ORDER BY created_at DESC LIMIT 50;SELECT * FROM partman.part_config WHERE parent_table LIKE '%mcp_request_log%';SELECT tablename, rowsecurity FROM pg_tables WHERE schemaname = 'public' ORDER BY tablename;SELECT schemaname, tablename, policyname FROM pg_policies WHERE schemaname = 'public' ORDER BY tablename, policyname;Rollback
docs/ops/mcp-request-log-partitioning-2026-05-06.md: rename partitioned table aside, restoremcp_request_log_legacy, recreate lookup indexes, then remove the pg_partman config only after continuity is verified.Kanban:
t_a14a0ff5/ Phase 4E.Need help on this PR? Tag
@codesmithwith what you need.