Skip to main content
By default, containers cannot reach the internet or other containers. The enclave automatically connects the shim to the container that receives incoming requests. You only need a networks block when a container has to make outbound connections (calling an external API) or talk to another container in the same enclave.

Defining networks

networks is a top-level map of named networks. Each has an egress policy that controls what containers attached to it can reach:
Rules for allow entries:
  • Must be hostnames (e.g. api.example.com), not IP addresses; wildcards are not supported.
  • Allow every hostname the request may contact, including redirect targets and separate CDN or API hostnames.
  • Hostnames are re-resolved periodically (about every 60 seconds), so allowlisting works with rotating DNS. Only IPv4 addresses are allowlisted today.
Network names must be lowercase alphanumeric with hyphens, at most 15 characters. The name shim-net is reserved for the enclave’s internal shim-to-container channel and cannot be used (see Routing).

Attaching containers to networks

List the networks a container joins under its networks field:
  • A container may attach to any number of networks, but at most one may have egress other than closed.
  • Containers on a shared network reach each other by container name (e.g. http://api:8000).
  • A container with no networks (and that isn’t the shim’s target) has no connectivity.

Routing

The shim section controls which ports and paths your container exposes. Only listed HTTP paths are reachable from outside the enclave. Any request to an unlisted path is rejected with a 404 error code. The enclave reaches the target container over a private internal channel; you don’t declare a network for it.
The shim-net channel. The shim reaches your upstream container over an automatic, private Docker bridge named shim-net (a fixed 172.31.255.0/30 subnet). It carries only shim → container traffic and is always closed to the internet. You don’t create it, and the name shim-net is reserved. You can’t declare a network called shim-net or attach a container to it yourself.

Direct admin SSH

An administrator workspace can expose SSH directly. Add these fields to its existing configuration:
cvm_admin: true grants administration of the entire enclave, including other workloads and their secrets. It does not enable debug mode. Direct admin SSH requires all three settings: inbound port 22, an admin container attached to a declared network, and its 22:22 port mapping. Other published workload ports remain private to the enclave. Note that the externally allocated SSH port will differ from 22; tinfoil attest-ssh resolves it when you supply a container name. This exposes the SSH endpoint. Configure the SSH server with an attested key, then follow Attested SSH to verify and connect to it.