Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
fix(hcc): raise proxy_ssl_verify_depth so cross-signed root chains verify
Jose Ramirez9ed6ef3f99f7
diff --git a/host-context-controller/package-lock.json b/host-context-controller/package-lock.jsonindex b3635ac43..9dc6dcbba 100644--- a/host-context-controller/package-lock.json+++ b/host-context-controller/package-lock.json@@ -1,12 +1,12 @@{"name": "clerum-host-context-controller",- "version": "0.1.154",+ "version": "0.1.155","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "clerum-host-context-controller",- "version": "0.1.154",+ "version": "0.1.155","license": "MIT","dependencies": {"@clerum/image-policy": "file:../packages/image-policy",diff --git a/host-context-controller/package.json b/host-context-controller/package.jsonindex 7b0c2ee3c..1cd6f061f 100644--- a/host-context-controller/package.json+++ b/host-context-controller/package.json@@ -1,6 +1,6 @@{"name": "clerum-host-context-controller",- "version": "0.1.154",+ "version": "0.1.155","description": "Host Context Controller - provides McpServer CRDs to mcp-host via REST API","main": "dist/main.js","engines": {diff --git a/host-context-controller/src/__tests__/reconciler.remote.test.ts b/host-context-controller/src/__tests__/reconciler.remote.test.tsindex fcd9ec7f3..09c0b5b84 100644--- a/host-context-controller/src/__tests__/reconciler.remote.test.ts+++ b/host-context-controller/src/__tests__/reconciler.remote.test.ts@@ -298,6 +298,23 @@ describe('McpServerReconciler remote egress proxy', () => {expect(conf).toContain('proxy_ssl_verify on')})+ // nginx defaults proxy_ssl_verify_depth to 1, which only admits chains with a+ // single untrusted intermediate. Upstreams mid-root-rollover (Let's Encrypt+ // "Root YE"/"Root YR", "Microsoft TLS ECC Root G2") serve a chain that reaches+ // a trusted anchor via a cross-signed root — two untrusted intermediates — and+ // nginx rejects them with "(20:unable to get local issuer certificate)" even+ // though the CA bundle is complete. Verified against real upstreams: without+ // this directive mcp.postman.com / api.firecrawl.dev / learn.microsoft.com all+ // fail the handshake; with it they connect while verification stays on.+ it('should raise proxy_ssl_verify_depth to admit cross-signed root chains', () => {+ const cm = (reconciler as any).buildNginxConfigMap(REMOTE_SERVER)+ const conf = cm.data['default.conf.template']++ const match = conf.match(/proxy_ssl_verify_depth\s+(\d+);/)+ expect(match).not.toBeNull()+ expect(Number(match![1])).toBeGreaterThanOrEqual(3)+ })+it('should include a /health endpoint returning 200', () => {const cm = (reconciler as any).buildNginxConfigMap(REMOTE_SERVER)const conf = cm.data['default.conf.template']diff --git a/host-context-controller/src/reconciler.ts b/host-context-controller/src/reconciler.tsindex 02f5e94bf..b1c1c5d62 100644--- a/host-context-controller/src/reconciler.ts+++ b/host-context-controller/src/reconciler.ts@@ -389,6 +389,16 @@ ${authHeaderLines ? '\n # ── Credential auth headers (envsubst-resolvproxy_ssl_verify on;proxy_ssl_server_name on;proxy_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;+ # nginx defaults proxy_ssl_verify_depth to 1, which only admits a chain+ # with a single untrusted intermediate. CAs mid-root-rollover serve a+ # chain that reaches a trusted anchor through a cross-signed root, so the+ # leaf sits two intermediates below the trust store: Let's Encrypt via+ # "Root YE"/"Root YR" (cross-signed by ISRG Root X2/X1) and Microsoft via+ # "Microsoft TLS ECC Root G2" (cross-signed by MS ECC Root 2017). At depth+ # 1 nginx rejects those with "(20:unable to get local issuer certificate)"+ # even though the CA bundle is complete — it looks like a missing root but+ # is purely the depth cap. Raising the depth keeps verification fully on.+ proxy_ssl_verify_depth 3;}# Health check endpoint