Authorization at scale breaks long before logic becomes complex.
It breaks because the data model collapses:
roles, groups, permissions, inheritance, exceptions, conditions β€” they all stack.

Enma is a 12-part series where I rebuild authorization from scratch, step-by-step, ending with a production-ready Zanzibar-style engine.

This page is the master index for the full series.

βœ”οΈ Published Parts (12/12 Complete)

1. Part 1 β€” Why Traditional Authorization Breaks at Scale

Why simple SQL permission tables collapse once you introduce teams, hierarchies, and conditional access.

2. Part 2 β€” Modeling Roles & Memberships (RBAC v1)

How roles actually work, and the hidden assumptions that cause them to fail as systems grow.

3. Part 3 β€” From Roles to Relationships (ReBAC v1)

How relationship tuples replace global roles and enable access flows like Google Docs.
Introduces boolean algebra for relationships (UNION, INTERSECTION, EXCLUSION).

4. Part 4 β€” Hierarchies & Inheritance (ReBAC v2)

Modeling "owner β†’ editor β†’ viewer", multi-level inheritance, and cross-object permission propagation.
Documents inherit viewers from parent folders.

5. Part 5 β€” Conditional Access (ABAC v1)

Making permissions depend on context: time, IP, device, deadlines, and runtime caveats.
Introduces tri-state logic (TRUE, FALSE, REQUIRES_CONTEXT).

6. Part 6 β€” Organization-Scoped Conditions

Wildcard subjects with scoped caveats: "Any user can view HR docs if department = HR."
Introduces namespaced parameters (principal.*, resource.*) for attribute matching.

7. Part 7 β€” Complex Boolean Logic (ABAC v2)

Multi-predicate conditions with Boolean algebra in caveats (AND/OR/NOT).
Introduces function calls (now(), contains(), startsWith()) for expressive policies.

πŸ“š Part 7A β€” Boolean algebra + deterministic function calls inside caveats (ABAC v2) πŸ”— https://submicro.beehiiv.com/p/post-7a-complex-boolean-logic-abac-v2

πŸ“š Post 7B β€” Composite Caveats and Safety Measures (ABAC v2) πŸ”— https://submicro.beehiiv.com/p/post-7b-composite-caveats-and-safety-measures

8. Part 8 β€” Schema-Level Safety Nets

Enforcing required caveats and subject constraints at the schema level.
Ensures all tuples obey mandatory business rules (e.g., "all users must have business_hours caveat").

9. Part 9 β€” Determinism and Tie-Breaks

Ensuring same inputs always produce same outputs across all evaluators.
Canonical signatures, ordering rules, and tri-state algebra for production safety.

10. Part 10 β€” Unknowns, Duplicates, and Fail-Safe Defaults

Handling schema changes, duplicate grants, and DoS protection with evaluation budgets.
Unknown caveats β†’ FALSE, cycles β†’ FALSE, budget exceeded β†’ FALSE.

πŸ“š Post 10A β€” Fail-Safe Defaults: Unknown Caveats and Duplicates

πŸ“š Post 10A β€” Fail-Safe Defaults: Unknown Caveats and Duplicates
πŸ”— https://submicro.beehiiv.com/p/post-10b-budget-limits-and-dos-protection

11. Part 11 β€” Consistency and Revisions

πŸ“š Post 11A - Revision-Based Snapshots
πŸ”— https://submicro.beehiiv.com/p/post-11a-revision-based-snapshots

πŸ“š Post 11B β€” Production Deployment: Revisions at Scale

12. Part 12 β€” Final Model and Invariants

Complete specification of Enma Core Semantics with all invariants (INV-1 β†’ INV-16).
Defines minimal interface surface for production-ready, verifiable implementations.

πŸ“¬ Subscribe

Get notified when new parts are published:
πŸ”— Subscribe to SubMicro

πŸ—οΈ What You'll Build

By the end of this series, you'll understand:

  • βœ… Why traditional authorization models break at scale

  • βœ… How Google Zanzibar works (relationship-based access control)

  • βœ… How to model roles, hierarchies, and conditional access

  • βœ… How to build a production-ready authorization engine

  • βœ… How to ensure determinism, consistency, and safety

Let's build it together.

πŸ“Š Series Structure

Phase

Posts

Theme

Difficulty

Phase I β€” Groundwork

1–2

Simple tuples and roles

🟒

Phase II β€” Graph Logic

3–4

Relationships and hierarchy

🟑

Phase III β€” Attributes & Conditions

5–7

Context-aware caveats

πŸŸ‘πŸ”΄

Phase IV β€” Determinism & Safety

8–10

Constraints, ordering, protection

πŸ”΄

Phase V β€” Consistency & Finalization

11–12

Revisions and invariants

πŸ”΄

🎯 Who This Is For

  • Backend engineers building authorization systems

  • Engineering managers evaluating authorization solutions

  • Staff/Principal engineers designing distributed systems

  • Startup CTOs choosing between build vs. buy

  • Anyone curious about how Google Zanzibar works

Keep Reading