Security model
AXE is not an isolation boundary. The sandbox it runs in is: a container, gVisor or Firecracker. Anything that can reach axed’s API can run any command as axed’s user, by design. Your job is to make sure only your platform can reach it. Inside the sandbox, AXE assumes the code it runs is hostile and protects itself and the workspace from that code:- Paths stay in the root. File paths resolve one directory at a time against open handles, so sandboxed code cannot redirect a file operation outside
--root-dirby swapping in a symlink. See Confinement. - Uploads are atomic. An upload that creates or replaces a file makes it appear only when the upload commits, so nobody reads a half-written file. Appends write to the existing file in place.
- Everything is bounded. Retained output, buffered
Executeoutput, the number of processes, client connections and file watches are all capped. - No descriptors leak. At startup axed marks every inherited descriptor close-on-exec. Processes it starts inherit only standard input, output and error.
- Untrusted input cannot crash the daemon. axed is often PID 1, so a crash ends the sandbox. Deep directory trees, odd file times and files swapped for FIFOs are handled as input, not panics.
- axed outlives its children. Under memory pressure the kernel kills supervised processes before axed. See Memory pressure.
- Slow clients are cut off. A gRPC connection must complete its HTTP/2 handshake within 10 seconds, and is closed after
--grpc-idle-timeout(default5m) with no call open. REST connections idle, stuck writing or stalled mid-upload for--http-idle-timeout(default60s) are closed. MCP connections are closed after 5 minutes with no request open.
Tokens
Without a token, anyone who can reach a TCP port can run commands. axed logs a warning at startup when a TCP listener is open with no token. Configure one of these two flags. They are mutually exclusive.File holding the bearer token, for example a mounted Kubernetes Secret. Surrounding whitespace is trimmed. An empty file is an error at startup. axed reloads the file when it changes; see Rotate the token.
axectl, set AXE_TOKEN or pass --token.
Rotate the token
With--auth-token-file, write the new token to the file. axed watches the file’s directory and reloads the token when an entry there changes, which covers writing the file in place, renaming a new file over it, and Kubernetes updating a mounted Secret (it swaps a ..data symlink). SIGHUP also reloads it, for changes the watch cannot see, such as a symlink into another directory.
After a reload, the previous token keeps working for 60 seconds, so clients holding it can switch without failed calls. Only one previous token is kept: a second rotation within the minute ends the first one’s grace.
If the file is empty or cannot be read when axed reloads it, axed logs a warning and keeps the current token, so a half-finished update never locks clients out. axed logs that it reloaded, never the token or its digest.
A token given with --auth-token-sha256 cannot be rotated without a restart.
Which endpoints require it
GET /v1/health, GET /readyz and grpc.health.v1 stay open so readiness and wakeup probes work without the token. They reveal only whether axed is ready. The native System.Health RPC does require it.
Run processes as another user
A process runs as axed’s user unless its request names another (Spec.user). Where axed runs as root, as a microVM’s PID 1 usually does, start it with --default-user so commands run unprivileged by default:
/etc/passwd for a name, and refuses to start if it cannot. It applies on every protocol, including the Agent Sandbox and Agent Substrate APIs, which have no user field. A request that names a user still gets that user: the default narrows what clients get by accident, not what they may ask for. Anyone who can reach the API can still ask for root.
Memory pressure
As PID 1, axed’s exit ends the sandbox, so it should be the last process the kernel’s OOM killer picks. axed arranges that three ways:- Children are preferred victims. Each process sets its own
oom_score_adjto--child-oom-score-adj(default500) before it execs, so its whole tree inherits it. Raising the value needs no privilege. - axed lowers its own score to
-900when it hasCAP_SYS_RESOURCE, unless the platform already set it lower. Without the capability it keeps the score it started with. - axed reserves memory in its cgroup. With cgroups and the memory controller, axed sets
memory.minto 16 MiB on its own leaf, so reclaim takes the supervised trees’ memory first. The kernel honors it only as far as the cgroups above axed’s also protect memory.
Limits.memory_bytes, or --default-memory and --max-memory for every process) keep one tree from using up the sandbox in the first place. With cgroups, a tree that exceeds its limit is killed whole and its exit reports OOM_KILLED.
Transports
axed serves the same gRPC services on every--listen endpoint. Repeat --listen to serve several at once. Passing any --listen replaces the default listener on tcp://LISTEN_HOST:GRPC_PORT; add it back explicitly if you still want it. --mcp-listen takes the same URIs and options, and serves MCP instead.
Append
?auth=none to a Unix, vsock or fd listener when the channel itself is the trust boundary, for example vsock from the host:
- A vsock listener with
?auth=nonerefuses connections from inside the guest: the loopback CID 1 and the guest’s own CID. The host and other VMs the hypervisor lets through are accepted. - A Unix socket with
?auth=noneis created with mode0600, so only processes running as axed’s user can connect. Processes axed starts as the same user can, so run them as another user (Spec.user), or require the token. - An
fd://listener with?auth=nonegets no extra check; whoever bound the socket decides who can reach it.
--agent-sandbox (the default), it always listens on TCP at --listen-host and --rest-port. Turn it off with --agent-sandbox=false if you do not need it, or bind it to loopback with --listen-host 127.0.0.1, which also moves the default gRPC listener to loopback.
No TLS
axed does not terminate TLS. Put one of these in front of it:- pod isolation plus a Kubernetes NetworkPolicy that admits only your control plane,
- a service mesh that provides mutual TLS,
- vsock or a Unix socket, which never leave the machine.
/v1/metadata
GET /v1/metadata on the REST port returns axed’s environment variables whose names start with --metadata-env-prefix (default SANDBOX_; an empty prefix also means SANDBOX_). It leaves out any variable whose name contains TOKEN, SECRET, PASSWORD, PASSWD, CRED, KEY, AUTH, BEARER, PRIVATE or CERT, in any case. It requires the token when one is configured. The name filter is a safety net, not a guarantee. Do not put secrets in variables that match the prefix.

