Global Relationship-Based Access Control Engine (Zanzibar-Style)
Design a Google Zanzibar / SpiceDB-style global permissions service evaluating nested group-membership and folder-inheritance relation tuples (`doc:readme#viewer@group:eng#member`) at 180k+ Check RPS while preventing the "New Enemy" stale-ACL bug via consistency tokens (`zedtoken` / `zookie`).
Functional Requirements
- FR-1POST /v1/permissions/check — Evaluates transitive relation graph for `(object, relation, subject)` honoring caller consistency token.
- FR-2POST /v1/permissions/tuples — Atomically writes or revokes ACL relation tuples and emits monotonic revision token (`zookie`).
- FR-3GET /v1/permissions/expand/{object_id} — Expands effective subject tree for sharing-dialog previews and security audits.
- FR-4Must guarantee revoked users never read post-revocation content ("No New Enemy" invariant) at p99 <= 45 ms across node failures.
Workload Profile
Consistency Model
Bounded snapshot reads gated by caller revision token (`at_least_as_fresh >= zookie`) so ACL revocations take immediate effect on protected objects.
Relevant practice for
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.
Write under ### Architecture for Diagram to take that up directly