From 601728c13939fed1121572b442f2966d12825e5f Mon Sep 17 00:00:00 2001 From: "Timothy J. Aveni" Date: Sun, 12 Jul 2026 15:12:26 -0700 Subject: [PATCH] Tighten Camino runtime auth enforcement --- src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.ts b/src/index.ts index f49b980..74c31b3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -721,6 +721,11 @@ export const serveQuixosPackageRuntime = < const port = Number(process.env.QUIXOS_RUNTIME_PORT ?? "0"); const caminoUrl = process.env.CAMINO_URL ?? "http://127.0.0.1:7310"; const runtimeToken = process.env.CAMINO_RUNTIME_AUTH_TOKEN ?? ""; + if (process.env.CAMINO_RUNTIME_AUTH_REQUIRED === "1" && !runtimeToken) { + throw new Error( + "CAMINO_RUNTIME_AUTH_REQUIRED=1 but CAMINO_RUNTIME_AUTH_TOKEN is missing", + ); + } const runtimeTokenInterceptor: Interceptor = (next) => async (request) => { if (runtimeToken) { request.header.set("x-camino-runtime-token", runtimeToken);