Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
refactor(control-api): drop dead revokeRefreshJti and reuse HCC_STANDALONE_RECIPE_NAME (BR-09)
Diego Zacarias13e0e3490a7d
diff --git a/control-api/package-lock.json b/control-api/package-lock.jsonindex 23e5fb7dd..53a7da07a 100644--- a/control-api/package-lock.json+++ b/control-api/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-control-api",- "version": "0.1.821",+ "version": "0.1.822","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-control-api",- "version": "0.1.821",+ "version": "0.1.822","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.jsonindex b94de8ff3..f51260d32 100644--- a/control-api/package.json+++ b/control-api/package.json@@ -1,6 +1,6 @@{"name": "clerum-control-api",- "version": "0.1.821",+ "version": "0.1.822","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/auth/mcp-host/issue.routes.ts b/control-api/src/routes/auth/mcp-host/issue.routes.tsindex 43f6a2de4..de4617a7b 100644--- a/control-api/src/routes/auth/mcp-host/issue.routes.ts+++ b/control-api/src/routes/auth/mcp-host/issue.routes.ts@@ -4,6 +4,7 @@ import { requireInternalControlJwt } from '../../../middleware/internalControlJwimport { mcpHostHttpMetrics } from '../../../middleware/mcpHostHttpMetrics.js'import {ALL_MCP_HOST_CONTROL_SCOPES,+ HCC_STANDALONE_RECIPE_NAME,type McpHostControlScope,issueMcpHostAccessJwt,issueMcpHostControlJwt,@@ -127,7 +128,7 @@ export function createAuthMcpHostIssueRoutes(): Router {return res.status(400).json({ error: 'invalid_issuance_namespace' })}- if (provisioner.iss === 'hcc' && recipeName !== 'standalone') {+ if (provisioner.iss === 'hcc' && recipeName !== HCC_STANDALONE_RECIPE_NAME) {return res.status(403).json({ error: 'provisioner_target_mismatch' })}diff --git a/control-api/src/utils/auth/mcpHostJwtToken.ts b/control-api/src/utils/auth/mcpHostJwtToken.tsindex f57103042..c6a76f905 100644--- a/control-api/src/utils/auth/mcpHostJwtToken.ts+++ b/control-api/src/utils/auth/mcpHostJwtToken.ts@@ -79,19 +79,6 @@ function cacheRevokedRefreshJti(jti: string): void {}}-// Explicit revocation path for admin/manual invalidation flows. Refresh-token-// rotation uses consumeRefreshJti() instead so the one-time-use path stays-// atomic under race.-async function revokeRefreshJti(jti: string, exp: number): Promise<void> {- const expiresAt = new Date(exp * 1000).toISOString()- // Persist to DB first (authoritative), then update cache- await pool.query(- `INSERT INTO workflow_revoked_refresh_jtis (jti, expires_at) VALUES ($1, $2) ON CONFLICT DO NOTHING`,- [jti, expiresAt]- )- cacheRevokedRefreshJti(jti)-}-async function insertRefreshJtiOnce(jti: string, exp: number): Promise<boolean> {if (revokedRefreshJtis.has(jti)) {return false@@ -128,8 +115,6 @@ async function isRefreshJtiRevoked(jti: string): Promise<boolean> {return false}-export { revokeRefreshJti }-/*** For 1st-party HCC-issued tokens, `hostRefs[0]` is the actual Host CRD* name (e.g. "trader", "chatllm") and per-event identity binding (e.g.