Commit f7b4267
committed
test(authz): e2e-prove the MCP HTTP surface is identity-admitted; upgrade the matrix row to high-risk (#3167)
PR-B of #3167. During implementation the premise shifted: the CLI ALREADY
auto-loads MCPServerPlugin in `os serve`/`dev` when isMcpServerEnabled()
(serve.ts — requires.push('mcp')), on the SAME decision point that gates the
dispatcher /mcp route, with stdio staying opt-in. So decisions A/B/C (dev
default-on, HTTP-only, unified off-switch) were already shipped — my #3167
"wired nowhere" claim was a stale read (a grep of the wrong path). The one
genuinely-missing piece was the end-to-end proof the mcp-http-identity row
(#3202) explicitly deferred.
This lands that proof: showcase-mcp-http-identity.dogfood.test.ts boots the
real showcase + security + MCPServerPlugin and drives POST /api/v1/mcp through
the real HTTP + RLS stack:
- an anonymous MCP tools/call is 401 before any tool runs (fail-closed);
- a member's query_records over the owner-private showcase_private_note returns
ONLY their own rows, symmetric across two members — if the tool had run
unscoped/system (the stdio posture, mcp-stdio-authority) the other owner's
rows would leak, so this is the load-bearing RLS-through-MCP assertion;
- tool discovery (tools/list) is gated on the same admitted identity.
The mcp-http-identity matrix row is upgraded to HIGH_RISK with this proof,
closing the deferral noted on it in #3202. Dispatcher-level unit coverage
(http-dispatcher.mcp.test.ts 401 + EC-to-bridge; .mcp-oauth.test.ts scope 403)
already existed; this adds the whole-stack authorization outcome the unit
mocks cannot show.
Test-only + a dev-dep on @objectstack/mcp in the private @objectstack/dogfood
gate — no runtime change, no changeset. authz-conformance + the new proof:
13/13 green locally.
Refs #3167, ADR-0096, ADR-0056 D10, #3202, #2698.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Pbmw3pMqNJfPbkvwh9Fkjs1 parent 2f3c641 commit f7b4267
5 files changed
Lines changed: 121 additions & 1 deletion
File tree
- packages/qa/dogfood
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
| 102 | + | |
102 | 103 | | |
103 | 104 | | |
104 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
167 | 171 | | |
168 | 172 | | |
169 | 173 | | |
| |||
Lines changed: 111 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments