Skip to content

Commit fbfa02e

Browse files
Aitemclaude
andcommitted
Expand proxy tutorial with corporate CA install and SSL troubleshooting
After the v2602 HTTP client migration to Java's standard JSSE SSL stack, customers behind corporate proxies with SSL inspection see new errors when fetching FHIR packages from fs.get-ig.org. Rewrite how-to-configure-aidbox-to-use-proxy.md to cover: - HTTPS + HTTP proxy via JAVA_OPTS with nonProxyHosts. - Installing a corporate CA certificate into the JVM truststore (Dockerfile snippet using keytool). - Troubleshooting SSL errors: the four common error messages, root cause (proxy SSL inspection vs strict JSSE validation), and a five-step fix order including filesystem package loading and BOX_FHIR_NPM_PACKAGE_REGISTRY as fallbacks. Refs: HealthSamurai/sansara#7205 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5145a06 commit fbfa02e

1 file changed

Lines changed: 78 additions & 9 deletions

File tree

Lines changed: 78 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,95 @@
11
---
2-
description: Configure Aidbox to use a proxy for outgoing requests.
2+
description: Configure Aidbox to use a proxy for outgoing requests, install a corporate CA certificate, and troubleshoot SSL errors when fetching FHIR packages.
33
---
44

55
# How to configure Aidbox to use a proxy for outgoing requests
66

77
## Objectives
88

9-
* Configure Aidbox to use a proxy for outgoing requests.
9+
* Route Aidbox outbound HTTP / HTTPS traffic through a corporate proxy.
10+
* Trust a corporate CA used for proxy SSL inspection.
11+
* Diagnose SSL errors when fetching FHIR packages from `fs.get-ig.org`.
12+
* Know which fallback to reach for in air-gapped environments.
1013

1114
## Before you begin
1215

13-
* You must have an active proxy server.
16+
* You have a proxy host / port from your network team.
17+
* If the proxy performs SSL inspection, you have the corporate root CA certificate (`.crt` / `.pem`).
18+
* You can build a custom container image based on `healthsamurai/aidboxone`.
1419

15-
## Configure Aidbox to use a proxy for outgoing requests
20+
## Configure the HTTP / HTTPS proxy
1621

17-
To configure Aidbox to use a proxy for outgoing requests, you need to set the following environment variable:
22+
Aidbox uses Java's standard networking stack, so the proxy is configured through `JAVA_OPTS`. Set both `https.*` and `http.*` so package downloads, webhook deliveries, terminology lookups, and any other outbound calls go through the proxy.
1823

1924
```yaml
20-
JAVA_OPTS: -Dhttps.proxyHost=proxyhost -Dhttps.proxyPort=proxyPort
25+
# docker-compose.yaml
26+
services:
27+
aidbox:
28+
environment:
29+
JAVA_OPTS: >-
30+
-Dhttps.proxyHost=proxy.corp.example.com
31+
-Dhttps.proxyPort=8080
32+
-Dhttp.proxyHost=proxy.corp.example.com
33+
-Dhttp.proxyPort=8080
34+
-Dhttp.nonProxyHosts=localhost|127.0.0.1|*.svc.cluster.local
2135
```
22-
Please note that this configuration will proxy **all outbound** requests from Aidbox, including things like Subscriptions with webhook destinations.
2336
24-
See also:
37+
{% hint style="warning" %}
38+
This setting proxies **all** outbound requests from Aidbox, including [AidboxTopicDestination](../../modules/topic-based-subscriptions/aidbox-topic-based-subscriptions.md) webhook deliveries, GCP Pub/Sub clients, and external terminology calls. Add internal hosts you want to reach directly to `http.nonProxyHosts`.
39+
{% endhint %}
2540

26-
* https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/doc-files/net-properties.html
41+
See [Java networking properties reference](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/doc-files/net-properties.html) for the full property list.
42+
43+
## Install a corporate CA certificate
44+
45+
If your proxy performs SSL inspection it presents an internally-signed certificate when Aidbox connects to `https://fs.get-ig.org` (or any other upstream). Java rejects it because the corporate root CA is not in the default truststore. Add the CA to the JVM's `cacerts` keystore at image build time:
46+
47+
```dockerfile
48+
FROM healthsamurai/aidboxone:edge
49+
50+
COPY corporate-ca.crt /tmp/corporate-ca.crt
51+
52+
RUN keytool -importcert -trustcacerts \
53+
-keystore "$JAVA_HOME/lib/security/cacerts" \
54+
-storepass changeit -noprompt \
55+
-alias corporate-ca \
56+
-file /tmp/corporate-ca.crt \
57+
&& rm /tmp/corporate-ca.crt
58+
```
59+
60+
If the proxy issues a chain (intermediate + root), import each certificate with a unique alias.
61+
62+
{% hint style="info" %}
63+
Verify the certificate was added: `keytool -list -keystore "$JAVA_HOME/lib/security/cacerts" -storepass changeit -alias corporate-ca`.
64+
{% endhint %}
65+
66+
## Troubleshooting SSL errors when fetching FHIR packages
67+
68+
Since [Aidbox 2602](../../overview/release-notes.md#february-2026-2602) the HTTP client uses Java's standard JSSE SSL stack. JSSE is stricter than the previous client and surfaces certificate-chain problems that earlier versions silently tolerated.
69+
70+
**Symptoms** — startup fails to bootstrap [`BOX_BOOTSTRAP_FHIR_PACKAGES`](../../reference/all-settings.md), or [Artifact Registry](../../artifact-registry/artifact-registry-overview.md) package install errors with one of:
71+
72+
* `SSL peer shut down incorrectly`
73+
* `EOFException` thrown from `sun.security.ssl.SSLSocketInputRecord.read`
74+
* `unable to find valid certification path to requested target`
75+
* `PKIX path building failed`
76+
77+
**Root cause** — corporate proxy SSL inspection presents a certificate signed by an internal CA that the JVM does not trust. The `fs.get-ig.org` certificate itself is healthy (Google Trust Services chain) — the failure is at the proxy hop, not at the upstream.
78+
79+
**Fix order:**
80+
81+
1. Confirm whether you are behind a proxy with SSL inspection: `openssl s_client -connect fs.get-ig.org:443 -servername fs.get-ig.org`. If the issuer is not Google Trust Services, the proxy is intercepting.
82+
2. Configure the proxy via `JAVA_OPTS` ([above](#configure-the-http-https-proxy)).
83+
3. If SSL inspection is enabled, install the corporate CA ([above](#install-a-corporate-ca-certificate)).
84+
4. As a workaround for air-gapped or otherwise restricted environments, skip the network entirely — see [Loading packages from local filesystem](../../artifact-registry/artifact-registry-overview.md#loading-packages-from-local-filesystem).
85+
5. Or point Aidbox at an internal package mirror (Verdaccio, Nexus, etc.) using [`BOX_FHIR_NPM_PACKAGE_REGISTRY`](../../reference/all-settings.md).
86+
87+
{% hint style="danger" %}
88+
Disabling SSL verification (`-Dcom.sun.net.ssl.checkRevocation=false`, custom permissive truststores, etc.) silences the symptom but exposes Aidbox to MITM attacks on every outbound call. Fix the trust chain instead.
89+
{% endhint %}
90+
91+
## See also
92+
93+
* [Artifact Registry overview](../../artifact-registry/artifact-registry-overview.md)
94+
* [Loading packages from local filesystem](../../artifact-registry/artifact-registry-overview.md#loading-packages-from-local-filesystem)
95+
* [Java networking system properties](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/net/doc-files/net-properties.html)

0 commit comments

Comments
 (0)