Skip to main content

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 the allow list is empty. Fix the entry that the message names.
  • 403 api_key_action_forbidden: The key lacks network.write. Use a session or an admin key.
  • 403 network_policy_managed: The organization environment sets the policy. Ask an owner or an admin.
  • 403 inbound_closed: The sandbox has inbound: boat-only. Use boat 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.
Inside the sandbox:

Limits

Know these before you rely on a policy.
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.
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.
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.
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.
Until its next start, code in it can use a key of any boat account. Check network.apiBound. Read The boat API.
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.
A person or a program that connects to the sandbox can read data from it. Set inbound: boat-only.
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.
A cooperating sandbox on the same host can read the DHCP host name of a restricted sandbox. The bandwidth is very low.