Give https omnibus rigs a host name so Duo flows run

Problem

On an omnibus instance moved to https with an IP-literal external_url, a Duo Agent Platform flow fails on the privileged Duo runner. The Duo CLI starts in the Anthropic sandbox runtime. Its network proxy at localhost:3128 checks the certificate against the host name it is asked for, and an address is not a name:

Hostname/IP does not match certificate's altnames: Host: localhost. is not cert's CN: <external-ip>, which the CLI reports as WebSocket closed abnormally.

sequenceDiagram
    participant CLI as Duo CLI (sandbox)
    participant Proxy as sandbox proxy localhost:3128
    participant GL as GitLab (https)
    Note over CLI,GL: before: external_url is an address
    CLI->>Proxy: CONNECT 34.x.x.x:443
    Proxy->>GL: TLS handshake
    GL-->>Proxy: certificate, SAN IP only
    Proxy-->>CLI: Host: localhost. is not cert's CN
    CLI-->>CLI: WebSocket closed abnormally
    Note over CLI,GL: after: external_url is a name
    CLI->>Proxy: CONNECT gitlab.sim.test:443
    Proxy->>GL: TLS handshake (name in hosts, CA trusted)
    GL-->>Proxy: certificate, SAN DNS + both IPs
    Proxy-->>CLI: tunnel open, flow runs

Fix

The sandbox is required for flows: the runner docs say to set privileged = true to use it (flows execution, "Sandbox requirements"), and they present a non-privileged runner only as a variant. So the rig stays privileged and gains a name, with the custom-CA remedy from Duo Agent Platform troubleshooting applied to the runner and its jobs.

  • just lab https-private-ca --hostname NAME makes external_url a dotted name. The VM maps it to its internal address in /etc/hosts (no DNS), and the certificate keeps the internal and external addresses in its SAN beside the name.
  • just lab runner-tls-ca and runner registration on an https omnibus instance add extra_hosts to the job containers, with the CA through tls-ca-file, GIT_SSL_CAINFO and NODE_EXTRA_CA_CERTS.
  • gce/https-private-ca.md and gce/airgap.md say so, including the sealed case: the job image pulls with policy always and stalls, so a sealed runner sets pull_policy = ["if-not-present"] after one unsealed flow.
  • The engine self-test gains stubbed checks for the name, the SAN, the hosts entries and the runner's extra_hosts. They fail on main's scripts and pass here.

Evidence

One omnibus rig on 19.5, privileged Duo runner, flows started with POST /api/v4/ai/duo_workflows/workflows (developer/v1, start_workflow: true) using a personal access token, not a console call.

Arm external_url Result
Control (main's recipe) https://<ip> job failed, Host: localhost. is not cert's CN, WebSocket closed abnormally
Fixed, unsealed https://gitlab.sim.test sandbox engaged, WebSocket opened, workflow finished
Fixed, sealed https://gitlab.sim.test external egress denied, internal 200, workflow finished

The rig held an offline licence for the flows: an online activation code fails flow billing for a separate reason (gce/bases.md, License). The rig was torn down by name; no instance or firewall rule remains.

Merge request reports

Loading
Loading