Add api-proxy CA certificate support - #7816
Conversation
There was a problem hiding this comment.
Pull request overview
Adds private/corporate CA trust for custom API proxy upstreams without disabling TLS verification.
Changes:
- Adds config and CLI plumbing for
apiProxy.caCert. - Mounts the CA into API proxy containers and configures
NODE_EXTRA_CA_CERTS. - Updates schemas, tests, and documentation.
Show a summary per file
| File | Description |
|---|---|
src/types/api-proxy-routing-options.ts |
Adds the CA option type. |
src/types/api-proxy-options.test.ts |
Tests type composition. |
src/services/api-proxy-service-config.ts |
Adds the read-only CA mount. |
src/services/api-proxy-service-config.test.ts |
Tests Compose CA wiring. |
src/services/api-proxy-env-config.ts |
Sets NODE_EXTRA_CA_CERTS. |
src/schema.test.ts |
Covers valid schema usage. |
src/config-mapper.ts |
Maps file configuration. |
src/config-file.ts |
Adds the file-config field. |
src/config-file-validation.test.ts |
Tests field type validation. |
src/config-file-mapping.test.ts |
Tests config mapping. |
src/commands/build-config.ts |
Propagates the resolved option. |
src/commands/build-config.test.ts |
Tests option propagation. |
src/cli-options.ts |
Adds the CLI flag. |
src/awf-config-schema.json |
Updates the runtime schema. |
docs/awf-config.schema.json |
Updates the canonical schema. |
docs/awf-config-spec.md |
Documents config mapping. |
docs/api-proxy-sidecar.md |
Documents the environment variable. |
docs-site/src/content/docs/reference/cli-reference.md |
Documents CLI usage. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 18/18 changed files
- Comments generated: 1
- Review effort level: Balanced
| [ | ||
| // Mount log directory for api-proxy logs | ||
| `${apiProxyLogsPath}:/var/log/api-proxy:rw`, | ||
| ...(config.apiProxyCaCert ? [`${config.apiProxyCaCert}:${API_PROXY_UPSTREAM_CA_CERT_CONTAINER_PATH}:ro`] : []), |
|
@copilot address review feedback |
Addressed in commit |
|
✅ Copilot review passed with no inline comments. @copilot Add the |
|
🔌 Smoke Services — All services reachable! ✅
|
|
🛡️ Smoke Copilot Network Isolation confirmed the egress allowlist is enforced. ✅ Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
|
❌ Smoke Gemini reports failed. Facets need polishing...
|
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤
|
|
✅ Smoke Claude passed
|
|
📰 VERDICT: Smoke Docker Sbx has concluded. All systems operational. This is a developing story. 🎤
|
|
🚀 Security Guard has started processing this pull request |
|
Chroot tests passed! Smoke Chroot - All security and functionality tests succeeded.
|
|
📡 Smoke OTel Tracing completed. All tracing scenarios validated. ✅
|
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
|
EGRESS_RESULT allow=pass deny=pass ✅ Allowed domain (github.com) reachable: Overall: PASS
Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "example.com"See Network Configuration for more information.
|
Smoke Test: Claude Engine Validation
Overall result: PASS
|
|
Smoke Test: GitHub Actions Services Connectivity
Overall: FAIL —
|
🧪 Smoke Test: Copilot BYOK (Direct) Mode✅ GitHub MCP Testing — MCP connected, PR list verified Status: ✅ PASS
|
|
Smoke Test: Copilot Engine —
Overall: PASS
|
|
Docker Sbx Smoke Test
Overall: PASS cc
|
Chroot Version Comparison
Overall: FAILED — Node.js version mismatch between host and chroot environment.
|
|
Smoke Test: API Proxy OTel Tracing — results:
Overall: all core OTEL integration points verified; no unexpected failures. Recommend fixing the Jest flag (
|
|
fix: validate api proxy CA certificate paths Warning Firewall blocked 1 domainThe following domain was blocked by the firewall during workflow execution:
To allow these domains, add them to the network:
allowed:
- defaults
- "registry.npmjs.org"See Network Configuration for more information.
|
🏗️ Build Test Suite Results
Overall: 8/8 ecosystems passed — ✅ PASS Note: Java's Maven local repository (
|
Custom api-proxy upstream targets can use TLS certificates chained to private or corporate CAs, but the sidecar had no way to extend Node’s trust store. This adds a supported CA path for api-proxy without disabling certificate verification.
Configuration + CLI
apiProxy.caCertto AWF config.--api-proxy-ca-cert <path>CLI plumbing.Sidecar wiring
/usr/local/share/ca-certificates/awf-upstream-ca.crtNODE_EXTRA_CA_CERTSto that mounted path so Node trusts the additional CA alongside built-in roots.Schema, tests, docs
Example:
Equivalent CLI:
awf \ --openai-api-target llm-router.internal.example.com \ --api-proxy-ca-cert /etc/ssl/certs/corporate-ca.crt \ --allow-domains llm-router.internal.example.com \ -- command