Skip to content

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

TypeScript

fix(control-api): allowlist hand-made legacy server in real-PG I11

Diego Zacarias91b596606879
diff --git a/control-api/package-lock.json b/control-api/package-lock.json
index e202849e8..df3391491 100644
--- a/control-api/package-lock.json
+++ b/control-api/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-control-api",
- "version": "0.1.739",
+ "version": "0.1.740",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-control-api",
- "version": "0.1.739",
+ "version": "0.1.740",
"dependencies": {
"@clerum/display-field": "file:../packages/display-field",
"@clerum/grok-provider-attempt-contract": "file:../packages/grok-provider-attempt-contract",
diff --git a/control-api/package.json b/control-api/package.json
index 38771b118..f03e556c0 100644
--- a/control-api/package.json
+++ b/control-api/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-control-api",
- "version": "0.1.739",
+ "version": "0.1.740",
"description": "Internal Clerum control plane REST API + UI for managing CRDs and secrets",
"main": "dist/main.js",
"engines": {
diff --git a/control-api/test/oauth.perServerCallback.realPostgres.integration.test.ts b/control-api/test/oauth.perServerCallback.realPostgres.integration.test.ts
index adddbf8a9..d2e6b1aeb 100644
--- a/control-api/test/oauth.perServerCallback.realPostgres.integration.test.ts
+++ b/control-api/test/oauth.perServerCallback.realPostgres.integration.test.ts
@@ -36,6 +36,7 @@ import {
} from '../src/oauth/dynamicClientStore.js'
import { deriveOAuthEncryptionKey } from '../src/oauth/encryption.js'
import { buildRemoteOAuthSpec } from '../src/routes/admin/remoteMcp.js'
+import { attachServerToContext } from '../src/services/contextAllowlist.js'
import { discoverPilot, installRemoteServer, seedContext } from './fixtures/perServerInstall.js'
import {
ATLASSIAN_V2_PILOT,
@@ -325,6 +326,10 @@ describeRealPostgres('per-server remote callback (real Postgres)', () => {
},
NS
)
+ // The CR is written by hand (no install), so the allowlist step the install performs
+ // is replayed here: without it the mint stops at the membership gate (403) and never
+ // reaches the nonce check this test certifies.
+ await attachServerToContext(gateway as never, { name: CONTEXT, namespace: NS }, 'legacy')
// The only producer of a nonce-less row: the pre-install-identity upsert.
await upsertDynamicClient(db, KEY, {
serverNamespace: NS,
@@ -344,6 +349,7 @@ describeRealPostgres('per-server remote callback (real Postgres)', () => {
.set('x-service-token', 'rpc-proxy')
.send({ mcpServerName: 'legacy', userId: 'user-9' })
expect(mintRes.status).toBe(503)
+ expect(mintRes.body).toMatchObject({ error: 'integration_not_configured' })
const state = await signedStateFor('legacy')
for (const path of ['/remote/legacy', `/remote/legacy/${randomUUID()}`]) {