Permissions and safety
Two separate permissions must agree before anything happens on a machine:
| Lock | Who decides | Where | What it says |
|---|---|---|---|
| The agent's token | The owner of the account | In the dashboard, in a browser | Which capabilities, on which machines, until when |
| The local policy | The owner of the machine | On the machine itself | What agents may do on this machine at all |
The runtime on the machine checks its local policy itself, for every request, whatever the server or the agent asks. When the machine refuses, the refusal names the rule, and the bodylet command says "The token is not the cause: the policy of the machine refused".
The local policy of a machine#
A new installation allows nothing. The owner opens what they want, in a terminal of the machine, under their own account:
bodylet policy showThis shows what is allowed now: the account commands run as, the shells, the folders, the ports, the approvals.
Commands#
bodylet policy allow terminal.exec # agents may run commands here
bodylet policy deny terminal.exec # no more commandsallow prints allowed: terminal.exec, then the account commands run as (run_as), the shells agents may use (shells) and the folders they start in (working_roots). Read the note: lines: they are warnings for you.
Folders#
Agents reach no file until you open a folder. Each folder is read only, or read and write:
bodylet policy allow files.read ~/Documents # read
bodylet policy allow files.read ~/Projects --write # read and write
bodylet policy deny files.read ~/Projects # close that folder
bodylet policy deny files.write # stop all writing
bodylet policy deny files.read # no files at allThe files of Bodylet itself (its settings, its key, its logs) are never reachable, even inside an open folder. A link that leads outside the folders you opened is refused.
Previews of web apps#
bodylet policy allow ports.preview # every port from 1024
bodylet policy allow ports.preview 3000-3999 # only these ports
bodylet policy deny ports.preview 3000-3999 # remove a range
bodylet policy deny ports.preview # no previews again
bodylet policy allow ports.other_accounts # servers of other accounts tooRepeat allow ports.preview for more ranges. A preview reaches only the machine's own loopback address (127.0.0.1), never another computer of your network. By default it reaches only programs that run under your account; ports.other_accounts is off until you allow it.
Port forwards#
bodylet policy allow ports.forward # every port from 1024
bodylet policy allow ports.forward 5432 8000-8100 # only these ports
bodylet policy deny ports.forward 8000-8100 # remove a range
bodylet policy deny ports.forward # no forwards again
bodylet policy allow forward.other_accounts # servers of other accounts tooForwards are separate from previews: a port open to previews is not open to forwards, and the reverse. A forward reaches only the machine's own loopback address and ports from 1024; ports below 1024 can never be opened. See Forwards.
Applications#
bodylet policy allow apps.check # agents may ask which applications are here
bodylet policy allow apps.install # and ask for installs of the missing ones
bodylet policy deny apps.install # no more installsOn Windows, installs are for your account only. On Linux, they also need an administrator to turn on system installs, and then the packages' scripts run as root. Every plan waits for your approval unless you change it below. See Applications and requirements.
Desktop#
On Windows, and on Linux with an Xorg session:
bodylet-runtime desktop driver install # download and check the driver
bodylet policy allow desktop.observe # see the screen, read windows
bodylet policy allow desktop.control # use the pointer and keyboardWindows that run with administrator rights are never acted on. Agents can only start the applications you list in the policy file. A desktop that is locked is not used. The agent's token also needs See the desktop, and Use the desktop to act (see What agents can do).
Approvals#
You can ask that some actions wait for a yes in the dashboard before they happen:
| Value | Asks for your approval |
|---|---|
desktop.control session | Each time an agent takes control of the desktop |
ports.preview first_use | The first preview of each agent on this machine |
ports.preview always | Every preview |
machines.provision first_use | On a host: the first machine each agent creates |
machines.provision always | On a host: every machine |
ports.forward first_use | The first forward of each agent on this machine |
ports.forward always | Every forward |
apps.install always | Every install plan. This one is on until you change it |
apps.install first_use | The first install plan of each agent |
never | Nothing: the approval is off again |
bodylet policy approval desktop.control session
bodylet policy approval ports.preview first_use
bodylet policy approval ports.preview always
bodylet policy approval machines.provision first_use
bodylet policy approval machines.provision always
bodylet policy approval ports.forward first_use
bodylet policy approval apps.install first_use
bodylet policy approval desktop.control neverThe call of the agent then stops at once, and nothing is done. It appears on the Approvals page of the dashboard, where you Approve or Deny it. Once approved, the agent repeats its call and it goes ahead, once, within 10 minutes. A request nobody decides lapses after 30 minutes. A decision is final.
These approvals concern the desktop, previews opened by an agent, forwards, installs and creating machines: you see one only after you granted that capability to a token.
Agent tokens#
The Agent tokens page lists every token: its name, status (Active, Expired, Revoked), capabilities, machines, when it was last used and created.
- New token creates one by hand (see Connecting agents).
- Revoke takes access back. Its next request is refused. You can also cancel its running jobs at the same time.
- A token expires in 90 days unless you choose otherwise: 1 hour, 1 day, 7 days, 30 days, 1 year, or never. A token that never expires works until you revoke it, so keep that for what you use every day.
Bodylet keeps tokens only as a hash, never in clear. On your computer, the bodylet program keeps a token in your system's credential store (Keychain, Credential Manager, Secret Service), or, where there is none, in a file only your account can read.
Operator tokens#
The box Operator tokens on the same page lists the tokens of your own bodylet command line, apart from agent tokens. An operator token manages the whole fleet (pairing, removing machines, tokens, the activity log) and cannot run commands. Keep it on your own computer and never give it to an agent. See Connecting agents.
New agents#
On the Agent tokens page, the box New agents has one setting: "Give new agents access to all my machines". It is on by default: when an agent asks to join, the approval page ticks every machine for it. Turned off, no machine is ticked and you tick each one. You still approve each agent either way.
Pause a machine#
On the machine, bodylet pause stops the jobs that run there and refuses every request until bodylet resume. It works without a network and only the owner can lift it. In the dashboard, Pause on a machine's page stops new work on it. See Your machines.
Stop everything at once#
Stop all agents, at the bottom of the dashboard's menu, is the emergency stop for your whole fleet:
- every running job of every agent is cancelled;
- agents are refused new commands until you choose Resume agents;
- a banner says "Agents are stopped." on every page.
Tokens are not revoked and machines are not paused: when you resume, everything works as before. Nothing that was cancelled starts again by itself.
The activity log#
The Activity page lists every operation, newest first: who (an agent token or a person), what, on which machine, and refusals too. Filter it by machine or by token. Changes made in the dashboard are recorded as yours.
Each machine also keeps its own log of what agents did there, in the runtime's logs folder.
What Bodylet never records: text that an agent or a person types on a desktop, screenshots and pictures of the Screen, the content of files, and the values of environment variables given to a command. When you use the Screen, the log says that you watched, took over, typed (how much, never what) and handed back.
The installation itself#
- Installed for your account only, in your home folder. It never asks for administrator rights. System installs of applications on Linux are a separate step that an administrator takes on purpose (see Applications and requirements).
- One outgoing connection to Bodylet. The machine listens on no port.
- Each program archive is checked against its SHA-256 checksum before it is unpacked. When an agent installs Bodylet, it also checks the installer itself first.
- It never hides:
bodylet statusshows it, and it appears as a normal sign-in item (a systemd user unit on Linux, a launch agent on macOS, a sign-in task on Windows). - You remove it completely with one command: see Uninstall.