hack-house/hh/src
leetcrypt f73c23bf57 feat(hh): P4 — permissions (owner/superuser + drive delegation) ⛧
App-level RBAC over the single shared PTY, enforced by the broker:
- The sandbox launcher becomes owner (superuser) and first driver; broadcasts
  an encrypted {"_perm":"acl",owner,drivers} frame all clients track.
- /grant <user> and /revoke <user> (owner-only) delegate/withdraw drive rights
  = delegating control of the shared (root) shell — the superuser-delegation ask.
- The broker honors {"_sbx":"input"} only from permitted drivers, keyed on the
  SERVER-AUTHENTICATED sender (the message username the Sanic session stamps),
  not a spoofable self-asserted field — closes the spec's identity-binding gap.
- F2 is gated: non-drivers get 'ask the owner to /grant you'; revoke drops drive
  live. Roster shows roles: ⛧ owner · ◆ driver · • member.

Verified live (two TUIs): member blocked pre-grant, owner /grant member, member
then drives a command in the sandbox; roster + permission messages all correct.
cargo test: 4 pass.

Note: per the single-shared-PTY decision, drive-grant *is* the permission model;
per-user unix accounts/sudo would need per-user shells (future mode).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-30 16:41:34 -07:00
..
app.rs feat(hh): P4 — permissions (owner/superuser + drive delegation) ⛧ 2026-05-30 16:41:34 -07:00
crypto.rs test(hh): stable python->rust fernet interop vector 2026-05-30 14:01:03 -07:00
main.rs feat(hh): P3 — summonable sandbox + shared PTY ⛧ 2026-05-30 14:26:14 -07:00
net.rs feat(hh): P4 — permissions (owner/superuser + drive delegation) ⛧ 2026-05-30 16:41:34 -07:00
sbx.rs feat(hh): P3b — multipass lifecycle + PTY resize sync 2026-05-30 16:34:08 -07:00
theme.rs feat(hh): ratatui TUI client — chat, live roster, themes 2026-05-30 13:57:07 -07:00
ui.rs feat(hh): P4 — permissions (owner/superuser + drive delegation) ⛧ 2026-05-30 16:41:34 -07:00