Status
boat network get <id> and GET /sandboxes/{id}/network show network.status.
With
pending, network.pendingReason gives the cause:
PUT answers 200 for enforced or a stopped sandbox, and 202 for pending. boat network set --wait waits for enforced.
Who can change it
A key also needs the
network.write action. Only the admin preset holds it. An environment needs environment.write too.
A key without network.write never changes a policy, by any route. The sandbox gets the policy that it has without the key. Another policy, also a tighter one, gets 403 api_key_action_forbidden. This includes a new sandbox from a saved snapshot that holds a policy, unless the environment sets the same policy.
The key inside a sandbox never holds network.write.
What keeps the policy
- A fork, or a sandbox from a saved snapshot, follows its own environment when its source followed one.
- A policy in the create or fork request applies instead.
Errors
400 invalid_network_policy: An entry is bad, covers the boat API, or theallowlist is empty. Fix the entry that the message names.403 api_key_action_forbidden: The key lacksnetwork.write. Use a session or anadminkey.403 network_policy_managed: The organization environment sets the policy. Ask an owner or an admin.403 inbound_closed: The sandbox hasinbound: boat-only. Useboat exec, and publish ports from outside.403 sandbox_bound: The call comes from inside a bound sandbox. Run it from outside.409 network_policy_unsupported: No host can enforce the policy for this sandbox now. Stop it, set the policy, resume it. On create, try again later.409 network_policy_agent_outdated: The sandbox started before network policies. Stop it, set the policy, resume it.409 network_policy_changed: Another request changed the policy during a resume or a policy change. Run the command again.
Limits
Know these before you rely on a policy.An allowed site is a way out
An allowed site is a way out
Code that can reach
github.com can push data to any repository that it has credentials for. Allow only sites that you trust with the data.A domain entry matches the name, not the content
A domain entry matches the name, not the content
boat reads the server name of a TLS connection and does not decrypt it. A CDN can serve another of its sites on a connection that names an allowed one (domain fronting). With Encrypted Client Hello, boat sees the outer name only. Allow a CDN domain only if you accept this.
An IP entry allows every port and every site on that address
An IP entry allows every port and every site on that address
Do not allow a range that holds the addresses of
boat.dev. The sandbox then reaches the boat API directly, and boat does not limit it to its own credentials.Do not allow the address of a public DNS resolver, such as 1.1.1.1 or 8.8.8.8. Code can then send data out in DNS queries for any name.A domain entry allows TCP 443 and 80 only
A domain entry allows TCP 443 and 80 only
HTTP/3 (QUIC) clients fall back to HTTP/2. On port 80, boat accepts one request per connection, no chunked request body and no WebSocket. Use HTTPS for these.
A sandbox restricted while it runs is not bound to the boat API
A sandbox restricted while it runs is not bound to the boat API
Until its next start, code in it can use a key of any boat account. Check
network.apiBound. Read The boat API.A snapshot or a restore in progress keeps the storage servers reachable
A snapshot or a restore in progress keeps the storage servers reachable
The status is
pending with pendingReason: transfer until it ends. During that time, boat matches its storage servers by name only. Other customers of the storage provider use the same servers.Inbound is open by default
Inbound is open by default
A person or a program that connects to the sandbox can read data from it. Set
inbound: boat-only.The owner can read the sandbox
The owner can read the sandbox
boat exec and the file API return data from the sandbox to a key that holds these actions. A port that you publish serves what listens on it.DHCP host name
DHCP host name
A cooperating sandbox on the same host can read the DHCP host name of a restricted sandbox. The bandwidth is very low.