Skip to main content
This page is the map of Boat security. Each section is short and links to the page that has the details.

Give sandboxes to end users

To give an end user a sandbox, do these three things:
  1. Start the sandbox in an environment with Safe for third parties on, or with boat new --no-env. No secret of yours goes in.
  2. Give the user an API key limited to that one sandbox, if they need the API.
  3. Treat every URL with a token as a password.

Isolation between sandboxes

  • Each sandbox is its own virtual machine, with its own kernel, disk and IP address.
  • Sandboxes share no disk and no processes. They reach each other only over the network.
  • The user account has passwordless sudo. Anyone with a shell in a sandbox is root in that sandbox.
  • So treat everything inside a sandbox as readable and changeable by its user. This includes files, environment variables and the browser profile.
  • The security boundary is between sandboxes and between accounts. Inside a sandbox, use normal Linux tools (users, file permissions, firewall rules) as on any server.

One sandbox per end user

Give each end user their own sandbox. Containers inside one sandbox share its kernel, so Boat does not isolate them from each other. Boat also does not clean a sandbox between your users.
  • To start fast, save a named snapshot and start each user’s sandbox with boat new --from <name>.
  • If you must reuse one sandbox for many users, assume each user looks for traces of the user before. Run each job as a new Linux user, delete its files after the job, and keep no keys in the sandbox.

Who can reach a sandbox

Snapshots and personal environments stay private to the person who made them. Read Teams and organizations.

Boat credentials inside a sandbox

ASCII_TOKEN lets the user publish any port of their sandbox on a public URL under that sandbox’s subdomain. It cannot reach your account or other sandboxes. For the full list of what a protected sandbox does not receive, read Access and credentials.

Check a sandbox

A protected sandbox prints [] and No such file or directory for each file.

Sandboxes made from your own snapshots

A snapshot of a normal sandbox can contain your secrets. Resume or fork it with --no-env before an end user gets it. Boat removes the owner secrets before the sandbox becomes reachable. Read Protect an existing sandbox.

API keys for end users

  • A key limited with --sandbox cannot see or touch other sandboxes. It cannot list keys or read billing.
  • full-sandbox cannot create, resume, fork or delete. Your backend does that.
  • Use a short --ttl. Revoke the key when the user leaves.
  • Never give an end user an admin key or a key with account.admin. These can create more keys.
Read Scopes.

Network

  • Boat has no API setting for network rules.
  • The user is root, so the user can remove rules that you add as root. To keep a rule, run the untrusted code as a separate account without sudo.
  • Snapshots do not keep firewall rules. Apply them again after each resume and fork.

URLs that carry a token

Create these URLs on your server. Send each one only to the user who needs it. Do not log them.

Data

SOC 2, uptime, data location and security reports are on Compliance and uptime.