docs: M8a role enforcement shipped — update README + V2-SPEC 👥📊
Flip M8a write-side to ✅ (still one 🔨 on M8 overall): principals + roles + write gate + admin CLI landed, both migrations verified chaining 0→1→2 on a copy of the real hub DB. Device-facing invites + GET /members noted as still-ahead; read-side gating stays M9.
This commit is contained in:
parent
3213149974
commit
a7294fc884
2 changed files with 13 additions and 3 deletions
|
|
@ -49,7 +49,7 @@
|
|||
> | M7 — Hardening: `devbox doctor`, reconnect/backoff, rescan fallback, name-clash, release builds | ✅ done — **doctor/stop/hooks + share-name guard + dead-watcher rescan fleet-verified** 🛡️ |
|
||||
> | M7.5 — Adversarial security/data-loss audit + fixes (path-traversal, blob integrity, never-clobber, safe GC) | ✅ done — **26 findings, all promise-breakers fixed, race-clean** 🔐 |
|
||||
> | M7.6 — Hardening: fsync durability · DoS caps + timeouts · pidfile PID-reuse guard · join proof-of-possession | ✅ done — fleet-verified on arm64 🛡️ |
|
||||
> | 🔮 **M8 — v2 Foundations**: schema migration runner · per-`(share,id)` snapshots · daemon control socket + `pause`/`resume` | 🔨 in progress — **migration runner + control socket shipped; verified on a copy of the real hub DB** 🏗️ |
|
||||
> | 🔮 **M8 — v2 Foundations**: migration runner · per-`(share,id)` snapshots · control socket + `pause`/`resume` · principals/roles + write enforcement | 🔨 in progress — **migration runner, control socket & M8a role enforcement shipped; both migrations verified on a copy of the real hub DB** 🏗️ |
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -534,7 +534,7 @@ flowchart LR
|
|||
| ✅ | **M7 — Hardening** 🛡️ | `devbox doctor`, `stop`/pidfile, `hook edit/list`, SSE backoff+jitter, **60s rescan fallback** (survives dead/limited inotify watchers — PRD risk #1), share-name guard, release builds — fleet-verified |
|
||||
| ✅ | **M7.5 — Audit hardening** 🔐 | adversarial security/data-loss audit + fixes: blob-hash **path-traversal** blocked, **download blob-integrity** check, manifest-path **containment**, secret-guard **case-insensitive** + more patterns, **never-clobber** ignored/guarded files, **GC made safe** vs cross-share refcount undercount — all with regression tests, race-clean, fleet-verified |
|
||||
| ✅ | **M7.6 — Hardening complete** 🛡️ | 💽 **fsync durability** on atomic writes (power-loss safe), 🚪 **request size caps + server timeouts** (DoS), 🆔 **pidfile PID-reuse guard** (start-time token), 🪪 **join proof-of-possession** (ed25519 signature, token not burned on a bad request) — fanned out to parallel worktree agents, regression-tested, race-clean, fleet-verified |
|
||||
| 🔨 | **M8 — v2 Foundations** 🏗️ | 🔑 **schema migration runner** (`PRAGMA user_version`, transactional, `VACUUM INTO` backup, refuses a newer DB) · 🔢 **per-`(share,id)` snapshots** (fixes the cross-share refcount undercount; GC + head-backfill reworked) — **verified on a copy of the real `.10` hub DB** (13 dev / 12 share / 16 chunk preserved, 3 legacy heads repaired) · 🎛️ **daemon control socket** (`internal/control`, Unix socket, HTTP/1.1, `0600`) wiring `devbox pause`/`resume` + live-socket-aware `status`. **Next in M8:** conflict sidecar + `restore`/`deploy` conflict-copy (M8-3), principals/roles/invites (M8a) |
|
||||
| 🔨 | **M8 — v2 Foundations** 🏗️ | 🔑 **schema migration runner** (`PRAGMA user_version`, transactional, `VACUUM INTO` backup, refuses a newer DB) · 🔢 **per-`(share,id)` snapshots** (fixes the cross-share refcount undercount; GC + head-backfill reworked) · 🎛️ **daemon control socket** (Unix socket, HTTP/1.1, `0600`) wiring `devbox pause`/`resume` + live-socket-aware `status` · 👥 **M8a: principals + per-share roles + write enforcement** (`devbox-hub member`/`principal`; legacy shares = v1, first grant flips to deny-by-default; role≥editor AND the writable clamp). **Both migrations verified on a copy of the real `.10` hub DB** (counts preserved, 3 legacy heads repaired, chains 0→1→2). **Next in M8:** conflict sidecar + `restore`/`deploy` conflict-copy (M8-3), device-facing invites + `GET /members` (M8a cont.) |
|
||||
|
||||
<details>
|
||||
<summary>🔮 <b>still ahead in M8 / genuinely v2</b></summary>
|
||||
|
|
|
|||
|
|
@ -135,6 +135,16 @@ because `PRAGMA user_version=1` is the *last* statement (a crash rolls back to 0
|
|||
|
||||
The highest-leverage theme — and the **membership layer E2E + P2P both need underneath them.**
|
||||
|
||||
> ✅ **Shipped (M8a write-side):** migration #2 adds `principals` + `devices.principal_id` (every v1
|
||||
> device backfills to one synthetic `owner` → byte-identical to v1), `members(share, principal_id, role,
|
||||
> can_reshare)`, and `shares.acl_mode`. A share with zero grants is **legacy** (every device an implicit
|
||||
> owner); the first `devbox-hub member set` flips it to **explicit/deny-by-default**. The push gate now
|
||||
> enforces `EffectiveRole ≥ editor AND the writable clamp` (legacy shares reduce to the v1 writable bit
|
||||
> exactly). Admin populate path: `devbox-hub member set/rm/list` + `principal`. Verified chaining 0→1→2 on
|
||||
> a copy of the real hub DB. **Still ahead in M8a:** the device-facing **invite** flow (bind `(principal,
|
||||
> share, role)` via the existing `/v1/join` PoP) + `GET /v1/members` / `POST /v1/members/role` endpoints +
|
||||
> `+s` reshare delegation. **Read-side gating stays M9.**
|
||||
|
||||
- **Principals.** Insert a *principal* (person/account/service) above the device:
|
||||
`devices.principal_id`. The **device stays the auth + revocation unit** (its ed25519 key never
|
||||
leaves the box); the **principal becomes the authorization subject**. (Tailscale's identity↔node
|
||||
|
|
@ -268,7 +278,7 @@ flowchart LR
|
|||
|
||||
| Milestone | Ships | Gated by |
|
||||
|---|---|---|
|
||||
| 🏗️ **M8 — Foundations** 🔨 | ✅ migration runner (`PRAGMA user_version`) · ✅ per-`(share,id)` snapshots + reworked GC (refcount undercount fixed; verified on a copy of the real hub DB) · ✅ daemon **control socket** + real `pause`/`resume` · ⬜ principals/roles/invites + **write** enforcement (M8a) · ⬜ conflict sidecar + `Entry.Binary` + pin + conflict-copy on `restore`/`deploy` (M8-3) · ⬜ `snapshot_chunks` edge table (deferred to M9 — no consumer yet) | — |
|
||||
| 🏗️ **M8 — Foundations** 🔨 | ✅ migration runner (`PRAGMA user_version`) · ✅ per-`(share,id)` snapshots + reworked GC (refcount undercount fixed) · ✅ daemon **control socket** + real `pause`/`resume` · ✅ **M8a: principals/roles + write enforcement** (admin CLI; invites/`GET /members` still ahead) · ⬜ conflict sidecar + `Entry.Binary` + pin + conflict-copy on `restore`/`deploy` (M8-3) · ⬜ `snapshot_chunks` edge table (deferred to M9 — no consumer yet) — **both migrations verified on a copy of the real hub DB, chaining 0→1→2** | — |
|
||||
| 🔐 **M9 — Trust & durability** | **read-side ACL** (deny-by-default) · **E2E** per-share keyed-convergent encryption · **S3/R2** blob backend + **Litestream** HA | M8 (membership, migration runner, refcounts) |
|
||||
| 🤝 **M10 — Cluster & merge** | **LAN peer chunk-exchange** (P2P, hub-authoritative) · **interactive conflict resolver** + **diff3 3-way text merge** | M8 sidecar · M9 convergent-encryption co-design |
|
||||
| ✨ **M11 — Polish** | **full TUI** dashboard · **power** sanity (battery/metered/windows) · groups · packfile batching | M8 control socket |
|
||||
|
|
|
|||
Loading…
Reference in a new issue