|
| 1 | +# Device allowlisting |
| 2 | + |
| 3 | +When you share an environment, you can require **device approval**: only devices you explicitly approve can join. No one with the share code can connect until you approve their device. |
| 4 | + |
| 5 | +## Create a share with approval required |
| 6 | + |
| 7 | +```bash |
| 8 | +connect share --require-approval |
| 9 | +# → Share code: abc123 |
| 10 | +``` |
| 11 | + |
| 12 | +Teammates who run `connect join abc123` will see: |
| 13 | + |
| 14 | +``` |
| 15 | +This share requires host approval. |
| 16 | +Ask the host to approve your device. |
| 17 | +They can run: connect share --pending abc123 |
| 18 | +Then: connect share --approve <code> --agent <your-agent-id> |
| 19 | +``` |
| 20 | + |
| 21 | +They stay in a pending state until you approve them. |
| 22 | + |
| 23 | +## As the host: see pending requests |
| 24 | + |
| 25 | +```bash |
| 26 | +connect share --pending abc123 |
| 27 | +``` |
| 28 | + |
| 29 | +Example output: |
| 30 | + |
| 31 | +``` |
| 32 | + Pending join requests for abc123: |
| 33 | +
|
| 34 | + a1b2c3d4-... (Bob's laptop) |
| 35 | + Requested: 3/9/2026, 2:30:00 PM |
| 36 | + Approve: connect share --approve abc123 --agent a1b2c3d4-... |
| 37 | + Deny: connect share --deny abc123 --agent a1b2c3d4-... |
| 38 | +``` |
| 39 | + |
| 40 | +## Approve or deny a device |
| 41 | + |
| 42 | +**Approve** (they can join now): |
| 43 | + |
| 44 | +```bash |
| 45 | +connect share --approve abc123 --agent <agent-id> |
| 46 | +``` |
| 47 | + |
| 48 | +**Deny** (removes them from pending; they cannot join unless they request again and you approve): |
| 49 | + |
| 50 | +```bash |
| 51 | +connect share --deny abc123 --agent <agent-id> |
| 52 | +``` |
| 53 | + |
| 54 | +Use the `agent-id` (UUID) shown in `connect share --pending abc123`. |
| 55 | + |
| 56 | +## List your shares (includes pending count) |
| 57 | + |
| 58 | +```bash |
| 59 | +connect share --list |
| 60 | +``` |
| 61 | + |
| 62 | +If a share has `--require-approval` and there are pending join requests, you’ll see something like `2 pending approval` next to that share. |
| 63 | + |
| 64 | +## Summary |
| 65 | + |
| 66 | +| Who | Action | |
| 67 | +|-------|--------| |
| 68 | +| Host | `connect share --require-approval` — create share with approval required | |
| 69 | +| Host | `connect share --pending <code>` — list devices waiting for approval | |
| 70 | +| Host | `connect share --approve <code> --agent <id>` — allow a device | |
| 71 | +| Host | `connect share --deny <code> --agent <id>` — deny a device | |
| 72 | +| Joiner| `connect join <code>` — request access; if not approved, they see instructions to ask the host | |
| 73 | + |
| 74 | +Once a device is approved, it can join that share anytime until the share expires or is revoked. You don’t need to approve them again for the same share. |
0 commit comments