Runbook — Onboarding a VPN-only institution in SmartLink
How to connect SmartLink to a counterpart API that is reachable only over a private network (ministry VPN, site-to-site tunnel, internal DNS). Three steps, in this order: make the network reachable, pin the TLS trust, then grant the connector private network access.
Scope: SmartLink decides whether a connector is allowed to dial a private address (per-connector opt-in — spec:
docs/specs/2026-07-06-smartlink-private-egress.md). Making the address reachable is deployment infrastructure and is step 1 below — SmartLink does not establish tunnels.
1. Establish the tunnel (deployment infrastructure)
Pick whichever fits the institution’s setup — all three are equivalent from SmartLink’s point of view; what matters is that the Docker host (and hence the backend container’s network namespace) can route to the institution’s ranges:
- Host-level tunnel — WireGuard/IPsec on the Docker host itself. Simplest; containers inherit the route.
- VPN sidecar — a VPN client container sharing a network with the backend. Used when the host must stay tunnel-free.
- Site-to-site at the network edge — the datacenter/VPC routes the institution’s ranges over an existing government interconnect. Nothing to install on the host.
Verify reachability from the Docker host before touching SmartLink — a connector cannot fix a missing route:
# Route exists and the endpoint answers (adjust IP:port to the institution's API)
ip route get 10.8.0.15 # should show the tunnel interface
curl -sk --connect-timeout 5 https://10.8.0.15:8443/health -o /dev/null -w "%{http_code}\n"
If the backend runs in a container with its own network, repeat the curl
from inside the container (docker exec <backend> curl ...) — host routes do
not always propagate to bridge networks.
2. Create the connector (internal endpoint + pinned internal CA)
Create the connector as usual (see the smartlink-integrate skill), with the
internal host/IP and port. Government-internal endpoints almost always serve a
certificate from an internal CA the system bundle doesn’t trust — pin it
via the per-connector trust store (M35):
# Grab the institution's CA / server cert (or get the PEM from their ops team)
openssl s_client -connect 10.8.0.15:8443 -showcerts </dev/null 2>/dev/null \
| openssl x509 -outform PEM > institution-ca.pem
# Attach it to the connector
curl -s -X POST http://localhost:8000/api/v1/smartlink/connectors/$CONNECTOR_ID/certificates \
-H "Content-Type: application/json" \
-d "{\"label\": \"Institution internal CA\", \"pem\": $(jq -Rs . < institution-ca.pem)}"
Chain verification always stays on; the two opt-in relaxations
(allow_hostname_mismatch, allow_expired) exist for legacy internal certs —
use them only when the institution confirms the mismatch is expected.
3. Enable “Private network access (VPN)” with the institution’s ranges
In the SmartLink admin SPA, open the connector and turn on Private network access (VPN), then list the institution’s allowed network ranges (get these from the tunnel config / the institution’s network team). Or via API:
curl -s -X PUT http://localhost:8000/api/v1/smartlink/connectors/$CONNECTOR_ID \
-H "Content-Type: application/json" \
-d '{"allow_private_egress": true, "private_egress_cidrs": ["10.8.0.0/24"]}'
Rules:
- The ranges are required — enabling the toggle with none listed is a 422, as is any string that isn’t a valid CIDR.
- Keep ranges as tight as the tunnel allows (the API subnet, not
10.0.0.0/8). - Cloud metadata, loopback, link-local, multicast, and reserved addresses stay blocked regardless of the ranges — that is by design and not configurable.
- The change is recorded in the platform audit log like any other connector config change.
Then run the connector’s test (POST /connectors/{id}/test) and one real
operation execute to confirm end-to-end.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Health status shows unreachable / test-connection times out | Tunnel is down or the route doesn’t reach the backend container | Re-run the step-1 reachability checks from the Docker host and from inside the backend container; restart the tunnel/sidecar |
| Execute fails with a blocked-IP error even though the toggle is on | The resolved IP is outside the listed ranges (wrong CIDR), or the destination is in the always-blocked set (loopback/link-local/metadata) | Compare the resolved IP against private_egress_cidrs; widen/correct the range. If it’s loopback/metadata, the destination is wrong — that set is never openable |
| 422 when saving the connector | Invalid CIDR string, or toggle on with an empty range list | Fix the CIDR (e.g. 10.8.0.0/24); always provide at least one range with the toggle |
| Execute fails with a TLS/certificate error | Internal CA not pinned, or hostname/expiry mismatch on a legacy cert | Attach the CA PEM (step 2); only then consider the per-certificate relaxations |
Works from the host curl but not from SmartLink | Backend container on a bridge network without the tunnel route (sidecar/host-route mismatch) | Test from inside the container; attach the backend to the sidecar’s network or add the route to the bridge |
| Internal DNS name doesn’t resolve from the backend | Container uses default resolver, not the VPN’s internal DNS | Point the container/host resolver at the institution’s DNS for that zone, or use the IP directly (resolution failure is non-fatal — the connection error is what surfaces) |