Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

refactor(control-api): align disconnect grant-key call-sites with converged buildMcpServerGrantKey

Diego Zacariasf3147ffba84d
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index b2ce7fe8d..b73f8aa11 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.503",
+ "version": "0.1.504",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.503",
+ "version": "0.1.504",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/image-policy": "file:../packages/image-policy",
diff --git a/control-api/package.json b/control-api/package.json
index c60946ab6..9adeb7ea7 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.503",
+ "version": "0.1.504",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/src/routes/internal/oauth.ts b/control-api/src/routes/internal/oauth.ts
index 9f07d1bd7..886f9f910 100644
--- a/control-api/src/routes/internal/oauth.ts
+++ b/control-api/src/routes/internal/oauth.ts
@@ -358,8 +358,8 @@ export function createInternalOAuthRouter(gateway: K8sGateway): Router {
// Build the flavored delete key from the SAME source of truth the
// grant-presence gate reads by (D4/F2). null ⇒ fail-closed.
const key = buildMcpServerGrantKey(resolved, {
- namespace: config.mcpServersNamespace,
- serverName: mcpServerName,
+ mcpServersNamespace: config.mcpServersNamespace,
+ mcpServerName,
userId,
})
if (!key) {
diff --git a/control-api/test/oauth.mcpDisconnect.realPostgres.integration.test.ts b/control-api/test/oauth.mcpDisconnect.realPostgres.integration.test.ts
index abd0ceb26..fb0586670 100644
--- a/control-api/test/oauth.mcpDisconnect.realPostgres.integration.test.ts
+++ b/control-api/test/oauth.mcpDisconnect.realPostgres.integration.test.ts
@@ -92,8 +92,8 @@ describeRealPostgres('mcp-server grant disconnect composition (real Postgres)',
}
const keyA = buildMcpServerGrantKey(resolved, {
- namespace: NS,
- serverName: 'gdrive',
+ mcpServersNamespace: NS,
+ mcpServerName: 'gdrive',
userId: 'user-a',
})
expect(keyA).not.toBeNull()
@@ -140,8 +140,8 @@ describeRealPostgres('mcp-server grant disconnect composition (real Postgres)',
// A DIFFERENT member revokes: the key is decoupled from the caller's userId.
const key = buildMcpServerGrantKey(resolved, {
- namespace: NS,
- serverName: 'teamdrive',
+ mcpServersNamespace: NS,
+ mcpServerName: 'teamdrive',
userId: 'user-b',
})
expect(key).not.toBeNull()
@@ -165,8 +165,8 @@ describeRealPostgres('mcp-server grant disconnect composition (real Postgres)',
})
expect(resolved).not.toBeNull()
const key = buildMcpServerGrantKey(resolved!, {
- namespace: NS,
- serverName: 'gdrive',
+ mcpServersNamespace: NS,
+ mcpServerName: 'gdrive',
userId: 'user-a',
})
expect(key).toBeNull()