fix(#337): Add API key authentication for orchestrator-coordinator communication

- Add COORDINATOR_API_KEY config option to orchestrator.config.ts
- Include X-API-Key header in coordinator requests when configured
- Log security warning if COORDINATOR_API_KEY not configured in production
- Log security warning if coordinator URL uses HTTP in production
- Add tests verifying API key inclusion in requests and warning behavior

Refs #337
This commit is contained in:
Jason Woltje
2026-02-05 15:46:03 -06:00
parent 949d0d0ead
commit 6d6ef1d151
3 changed files with 226 additions and 15 deletions

View File

@@ -32,6 +32,7 @@ export const orchestratorConfig = registerAs("orchestrator", () => ({
url: process.env.COORDINATOR_URL ?? "http://localhost:8000",
timeout: parseInt(process.env.COORDINATOR_TIMEOUT_MS ?? "30000", 10),
retries: parseInt(process.env.COORDINATOR_RETRIES ?? "3", 10),
apiKey: process.env.COORDINATOR_API_KEY,
},
yolo: {
enabled: process.env.YOLO_MODE === "true",