vantage-peers-mcp 2.3.2 → 2.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## v2.3.4 — 2026-05-28
4
+
5
+ **Security fix** — DCR (Dynamic Client Registration) self-registration now defaults to tenant-scope only. Master scope requires explicit admin authorization (`ADMIN_DCR_TOKEN` / `BEARER_SECRET_MASTER` env var). Closes beta blocker for Marie/Iris RH onboarding identified in VP Cloud audit Day 84.
6
+
7
+ Changes:
8
+ - `convex/oauth.ts`: `registerPublicClient` now explicitly rejects `scopeProfile="master"` with a `ScopeViolation` error. Previously only the HTTP server enforced this; the Convex-layer was bypassable via direct internal call.
9
+ - `mcp-server/src/auth.ts`: bearer layer 3 (DCR token path) no longer maps `mcp:full` scope string to `scopeProfile="master"`. DCR tokens now always resolve to `client-generic` (deny-by-default). The `mcp:full` label in the legacy `oauthTokens` table was a scope label, not an authorization grant.
10
+ - `convex/oauthDcr.ts`: added security documentation clarifying the legacy table is no longer an escalation path; the auth middleware fix is the primary gate.
11
+
12
+ Tests: 5 new Convex security tests (`convex/oauth-dcr-security.test.ts`) + 5 new MCP scope enforcement tests (`mcp-server/src/__tests__/dcr-scope-enforcement.test.ts`), 0 regression on existing suites.
13
+
14
+ VP task: k17218rvqyncs1v6rwj3qdzfsn87jj4n. Beta unblock chain: DCR fix → 5 quick wins onboarding (seed-profiles + marie-iris-rh client + README VP Cloud + runbook + email).
15
+
3
16
  ## v2.3.2 — 2026-05-28
4
17
 
5
18
  **Hotfix** — Expose `fields="lite"` + `status` array/aliases in MCP tool schemas (Day 82 sprint gap).
package/dist/src/auth.js CHANGED
@@ -231,10 +231,18 @@ export function bearerAuthMiddleware() {
231
231
  console.error("[auth] CONVEX_URL_INTERNAL not set — cannot route DCR OAuth token");
232
232
  return c.json({ error: "Server misconfigured: internal deployment URL missing" }, 500);
233
233
  }
234
- // Map DCR single-scope string OAuthContext fields.
235
- // DCR tokens always carry "mcp:full" which maps to full access.
234
+ // SECURITY FIX: DCR tokens from the legacy oauthDcr path (oauthTokens
235
+ // table) carry "mcp:full" as a scope string. Previously this was mapped
236
+ // to scopeProfile="master" which granted cross-tenant, full-access.
237
+ // This is the DCR master-scope leak identified in VP Cloud audit Day 84.
238
+ //
239
+ // Fix: DCR self-registered clients ALWAYS resolve to "client-generic"
240
+ // (deny-by-default). "mcp:full" in the legacy table is a scope label, NOT
241
+ // an authorization to bypass namespace isolation. Master scope is only
242
+ // granted via the master bearer token path (layer 1) or via the
243
+ // oauth_access_tokens table with an admin-provisioned scopeProfile
244
+ // (layer 2). The DCR layer (layer 3) never grants master access.
236
245
  const scopes = dcrResult.scope.split(/\s+/).filter(Boolean);
237
- const isFull = scopes.includes("mcp:full");
238
246
  c.set("tenant", {
239
247
  tenantName: `dcr:${dcrResult.clientId}`,
240
248
  convexUrl: internalUrl,
@@ -243,10 +251,11 @@ export function bearerAuthMiddleware() {
243
251
  clientId: dcrResult.clientId,
244
252
  userId: dcrResult.clientId,
245
253
  scopes,
246
- scopeProfile: isFull ? "master" : "client-generic",
247
- fromAllowList: isFull ? ["*"] : [],
248
- namespaceReadPrefixes: isFull ? ["*"] : [],
249
- namespaceWritePrefixes: isFull ? ["*"] : [],
254
+ // Always tenant-scoped — never master regardless of scope string value.
255
+ scopeProfile: "client-generic",
256
+ fromAllowList: [],
257
+ namespaceReadPrefixes: [],
258
+ namespaceWritePrefixes: [],
250
259
  expiresAt: dcrResult.expiresAt,
251
260
  isMaster: false,
252
261
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vantage-peers-mcp",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "MCP server for VantagePeers — shared memory, messaging, and task coordination for AI agent teams",
5
5
  "type": "module",
6
6
  "main": "./dist/server.js",