Skip to content

Commit a3f650f

Browse files
docs: deprecate boundary-run
1 parent 03a9d24 commit a3f650f

1 file changed

Lines changed: 21 additions & 46 deletions

File tree

README.md

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,8 @@ cd boundary
3535
# Build the binary
3636
make build
3737

38-
# Install binary and wrapper script (optional)
38+
# Install binary
3939
sudo cp boundary /usr/local/bin/
40-
sudo cp scripts/boundary-wrapper.sh /usr/local/bin/boundary-run
41-
sudo chmod +x /usr/local/bin/boundary-run
4240
```
4341

4442
**Requirements:**
@@ -47,52 +45,31 @@ sudo chmod +x /usr/local/bin/boundary-run
4745

4846
## Usage
4947

50-
### Quick Start with Shortcut
48+
### Quick Start
5149

52-
The recommended way to run `boundary` is using the `boundary-run` shortcut, which handles privilege escalation automatically. The `boundary-run` wrapper is installed automatically when you use the installation script:
50+
When using the default nsjail backend, boundary escalates privileges automatically (via `sudo` and `setpriv`) to acquire the necessary capabilities:
5351

5452
```bash
55-
# After installation, use the shortcut:
56-
boundary-run --allow "domain=github.com" -- curl https://github.com
57-
boundary-run -- bash
53+
boundary --allow "domain=github.com" -- curl https://github.com
54+
boundary -- bash
5855
```
5956

60-
> **Note:** If you installed `boundary` manually, you can install the wrapper script separately:
61-
> ```bash
62-
> sudo cp scripts/boundary-wrapper.sh /usr/local/bin/boundary-run
63-
> sudo chmod +x /usr/local/bin/boundary-run
64-
> ```
65-
66-
### Direct Usage
67-
68-
If you prefer to run `boundary` directly, you'll need to handle privilege escalation:
69-
70-
```bash
71-
# Note: sys_admin is only needed in restricted environments (e.g., Docker with seccomp).
72-
# If boundary works without it on your system, you can remove +sys_admin from both flags.
73-
sudo -E env PATH=$PATH setpriv \
74-
--reuid=$(id -u) \
75-
--regid=$(id -g) \
76-
--clear-groups \
77-
--inh-caps=+net_admin,+sys_admin \
78-
--ambient-caps=+net_admin,+sys_admin \
79-
boundary --allow "domain=github.com" -- curl https://github.com
80-
```
57+
Privilege escalation runs only when jail type is `nsjail` (the default). With `landjail`, no escalation is performed.
8158

8259
### Examples
8360

8461
```bash
8562
# Allow only requests to github.com
86-
boundary-run --allow "domain=github.com" -- curl https://github.com
63+
boundary --allow "domain=github.com" -- curl https://github.com
8764

8865
# Allow full access to GitHub issues API, but only GET/HEAD elsewhere on GitHub
89-
boundary-run \
66+
boundary \
9067
--allow "domain=github.com path=/api/issues/*" \
9168
--allow "method=GET,HEAD domain=github.com" \
9269
-- npm install
9370

9471
# Default deny-all: everything is blocked unless explicitly allowed
95-
boundary-run -- curl https://example.com
72+
boundary -- curl https://example.com
9673
```
9774

9875
## Allow Rules
@@ -109,22 +86,22 @@ boundary-run -- curl https://example.com
10986

11087
### Examples
11188
```bash
112-
boundary-run --allow "domain=github.com" -- git pull
113-
boundary-run --allow "domain=*.github.com" -- npm install # GitHub subdomains
114-
boundary-run --allow "domain=github.com" --allow "domain=*.github.com" -- git pull # Both base domain and subdomains
115-
boundary-run --allow "method=GET,HEAD domain=api.github.com" -- curl https://api.github.com
116-
boundary-run --allow "method=POST domain=api.example.com path=/users,/posts" -- ./app # Multiple paths
117-
boundary-run --allow "path=/api/v1/*,/api/v2/*" -- curl https://api.example.com/api/v1/users
89+
boundary --allow "domain=github.com" -- git pull
90+
boundary --allow "domain=*.github.com" -- npm install # GitHub subdomains
91+
boundary --allow "domain=github.com" --allow "domain=*.github.com" -- git pull # Both base domain and subdomains
92+
boundary --allow "method=GET,HEAD domain=api.github.com" -- curl https://api.github.com
93+
boundary --allow "method=POST domain=api.example.com path=/users,/posts" -- ./app # Multiple paths
94+
boundary --allow "path=/api/v1/*,/api/v2/*" -- curl https://api.example.com/api/v1/users
11895
```
11996

12097
Wildcards: `*` matches any characters. All traffic is denied unless explicitly allowed.
12198

12299
## Logging
123100

124101
```bash
125-
boundary-run --log-level warn --allow "domain=github.com" -- git pull # Default: only logs denied requests
126-
boundary-run --log-level info --allow "method=*" -- npm install # Show all requests
127-
boundary-run --log-level debug --allow "domain=github.com" -- git pull # Debug info
102+
boundary --log-level warn --allow "domain=github.com" -- git pull # Default: only logs denied requests
103+
boundary --log-level info --allow "method=*" -- npm install # Show all requests
104+
boundary --log-level debug --allow "domain=github.com" -- git pull # Debug info
128105
```
129106

130107
**Log Levels:** `error`, `warn` (default), `info`, `debug`
@@ -142,7 +119,7 @@ When running inside a Coder workspace, boundary can forward audit logs to the wo
142119
agent, which then sends them to coderd for centralized logging. The intention is for
143120
these logs to work out of the box when an AI agent runs in a workspace using a module
144121
that has boundary enabled (e.g. the [Claude Code](https://registry.coder.com/modules/coder/claude-code)
145-
module), and when `boundary-run` is used directly.
122+
module).
146123

147124
**How it works:**
148125

@@ -172,14 +149,12 @@ module), and when `boundary-run` is used directly.
172149
- **boundary-child**: The child process created within the network namespace
173150
- **target/agent process**: The command you're running (e.g., `curl`, `npm`, `bash`)
174151

175-
The `boundary-run` wrapper script handles privilege escalation automatically using `setpriv` to drop privileges before launching boundary. This ensures all processes run with the minimum required capabilities (`CAP_NET_ADMIN` and optionally `CAP_SYS_ADMIN` for restricted environments) while executing as your regular user account.
176-
177-
If you run `boundary` directly with `sudo` (without `setpriv`), all processes will run as root, which is **not recommended** for security reasons. Always use `boundary-run` or the equivalent `setpriv` command shown in the [Direct Usage](#direct-usage) section.
152+
When using the nsjail backend (default), boundary escalates privileges itself: it re-executes via `sudo` and `setpriv` so that it runs with the minimum required capabilities (`CAP_NET_ADMIN` and optionally `CAP_SYS_ADMIN` for restricted environments) while still executing as your regular user.
178153

179154
## Command-Line Options
180155

181156
```text
182-
boundary-run [flags] -- command [args...]
157+
boundary [flags] -- command [args...]
183158
184159
--config <PATH> Path to YAML config file (default: ~/.config/coder_boundary/config.yaml)
185160
--allow <SPEC> Allow rule (repeatable). Merged with allowlist from config file

0 commit comments

Comments
 (0)