box/host
dan-claude-bot ec5e898094 revoke/grant: survive the live-session case — the review's one real hole (#74)
Supplementary groups are read at LOGIN, so 'gpasswd -d' does nothing to a
session the user already holds — and after --purge, a stale-group process
could touch incus-user and lazily RECREATE the project with stock defaults:
the unhardened NAT bridge, un-narrowed, strictly worse than the granted
state. Adversarial review caught it; verified live, then closed:

- revoke --purge terminates the user's sessions first (loginctl, then
  pkill), and refuses to purge under processes it cannot kill
- bare revoke says out loud that held sessions keep the socket until they
  end, and names the loginctl command — instead of claiming a lockout it
  did not deliver (help/README/design doc reworded to match)
- a failed grant backs out its own group-add on exit (trap, disarmed on
  success): no half-granted user holding an un-narrowed socket while the
  admin reads the error. Verified by injecting a bad profile YAML
- the rehearsal now holds a session open across the purge and demands it
  dies with the tier (criterion l, 42nd check)

Smaller review findings, same pass: the escape-hatch probes assert the
refusal's REASON instead of any nonzero exit (an image hiccup must not read
as 'the escape is closed'); probe_from maps an outer-timeout kill to
dropped, not reachable; the rehearsal cleanup keeps the account when a purge
fails so doctor can name the leftovers; the purge asserts the trust
certificate's absence; cmd_new distinguishes a dead daemon from a missing
stack before prescribing setup-host; grant's success message names the
user-<uid> bridge variant correctly on big-uid hosts.

Rehearsal after: 42/42 (containers). test/cli.sh: 76 checks.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 05:11:20 +00:00
..
box-firewall.service Give box-firewall.service RemainAfterExit so its state means something 2026-07-17 14:05:23 +00:00
box-firewall.sh fix(expose): accept established flows back from boxnet — the input drop was eating the door's replies 2026-07-14 23:13:25 +00:00
grant-user.sh revoke/grant: survive the live-session case — the review's one real hole (#74) 2026-07-18 05:11:20 +00:00
migrate-host.sh test+ci: add CI workflow and a dependency-free test suite 2026-07-18 00:01:15 +00:00
revoke-user.sh revoke/grant: survive the live-session case — the review's one real hole (#74) 2026-07-18 05:11:20 +00:00
setup-host.sh feat: the restricted tier — box grant/revoke converge users onto the hardened boxnet (#74) 2026-07-18 04:09:48 +00:00
teardown-host.sh chore: finish the debrand — env vars, install dir, docs are 'box', not 'claudebox' 2026-07-14 17:44:24 +00:00