Trust and isolation
What the box enforces
Section titled “What the box enforces”Tested against real Chromium (test/scope.browser.test.ts in the repository):
- Slots cannot reach each other. Each slot is its own BrowserContext behind a virtual DevTools endpoint that cannot see or reach another slot’s pages, targets, contexts or sessions, including by guessing ids.
- A client is held to the web. It cannot point a page at
file:,chrome:,devtools:,view-source:orabout:pages other than blank. Onlyhttp(s),data:andblob:open. It cannot have the browser read a file path into a page (DOM.setFileInputFiles, dragging files in), and it cannot choose where a download goes. Downloads are denied from the start. - The browser does not inherit the node’s secrets. Chromium is started with an allowlisted environment, not the node’s:
PATH,HOME, the locale (LANG,LC_*),TZ, the display (DISPLAY,XAUTHORITY,WAYLAND_DISPLAY,XDG_*), library and font paths, and proxy and CA settings (HTTP(S)_PROXY,NO_PROXY,SSL_CERT_*). A headful node that needs more (LIBGL_*,MESA_*,GTK_*,DBUS_SESSION_BUS_ADDRESS) names it inBROWSERBAY_CHROMIUM_ENV_PASSTHROUGH. The box’s ownBROWSERBAY_*settings can never be passed.
Proxy credentials
Section titled “Proxy credentials”A slot can be given a proxy with a user name and password (Avoid bot blocks). The password is handled like this:
- It travels from your service to the relay in the request, then to the one node that makes the browser, in the frame that creates the slot. Both hops are as protected as their connections: TLS, except between a relay and a node on loopback or, with
BROWSERBAY_ALLOW_INSECURE_RELAY, a private network. - The relay keeps it in no table, no listing and no log (the log says which options a slot has, never what they are). It exists in the relay’s memory only while the request is being served.
- The node keeps it in memory for the life of the slot, in the slot’s forwarder. Chromium never holds it: the browser is told to use a loopback address of the node’s, and the forwarder adds the credentials when it connects to your proxy. A page cannot read them, and a client of the slot cannot ask the browser for them.
- A message that says an option is wrong never repeats it, and the Python and Go clients print a proxy with its password hidden.
What it cannot do: a client with the slot token has control of the slot’s browser, which goes out through the proxy. They can use the proxy as the slot does for as long as the slot lives. That is why the token is a credential too.
The signing key
Section titled “The signing key”A box that signs its browsers’ requests (Identify your box to sites) holds a private key, and that changes what a node machine is worth stealing.
- The key is on the relay and on every node that signs, home or office nodes included, in the process environment (
BROWSERBAY_WEB_BOT_AUTH_KEY). Anyone who has it can sign requests as your box. Treat it like the enrollment secret: a Secret in Kubernetes, never in an image or a values file, and rotate it (make a new one, update the relay and the nodes together) if a machine that held it is lost. - It never crosses the network. Each machine is given it by its operator. The relay publishes only the public half, and the signatures a node makes are the only thing of it a site sees.
- A slot’s client cannot ask the browser for it. The browser is not given it, and the process environment passes to Chromium only what the allowlist says.
- It tells every site who you are. The signatures name the box’s address, so a site that logs them learns which box a request came from, and a declared bot can be blocked on sites that block all bots. Sign only the slots that need it (
optionalandsignRequests: true), not every one.
What it does not do
Section titled “What it does not do”The box limits what a client can ask of the machine. It does not make a client harmless.
- A slot can browse anything the node’s network can reach. That means localhost services, the LAN, and a cloud metadata address (
169.254.169.254). This is SSRF, and it is inherent in giving someone a browser. - The node process’s own environment holds a secret. A node’s enrollment secret sits there, and in the all-in-one it is the API key. The browser’s OS user can read it through the process table. The restrictions above keep a client from asking for it, but they are a filter on a very capable protocol, not a sandbox. Nothing here is proof against a flaw in that filter or in Chromium.
- Slots on one node share a browser process (unless the node runs with
BROWSERBAY_ISOLATION=process: see Isolation). A hostile page that crashes or exhausts it takes every slot on that node with it, and a renderer exploit is not contained by a VM. Chromium’s own sandbox is the control for that. It is off by default (--no-sandbox) because containers rarely allow the user namespaces it needs. SetBROWSERBAY_CHROMIUM_SANDBOX=truewhere yours does. A Chromium per slot stops one slot’s page crashing the others, but it is not a boundary against an exploit: that still needs the sandbox, or a machine per party.
- Give slot tokens to services you trust, not to end users or to code you did not write. A person watching and steering a slot through a viewer you build is fine, because that viewer sends only mouse and key events, not DevTools commands. See Live view.
- Run nodes on machines with nothing to steal. If the pages are untrusted, add egress rules that block private ranges and metadata addresses.
- Prefer the split deployment for anything sensitive. The machines with browsers then hold only a node’s enrollment secret, and the API key stays on the relay’s machine.
- To serve parties that do not trust each other, run a box per party. A namespace is a naming convention, not a boundary.