Skip to content
All work

03 / Enterprise panels

Access Control

Who can do what, tested before it ships, across about 80 OpenAPI operations

In short · Control plane for relationship based authorization: versioned schemas, a test harness with proof traces, tenant isolation backed by row level security.

Client
Enterprise platform teams
Role
Engineer, design and build

How it fits together

control planedeploytry itDraftschema editorValidateReviewPublishedimmutable · hashedAuthorization enginelive decisionsTest harnessdecision + proof traceAudit and diffimpact before releaseTenant isolationrow level security
Schemas move from draft to an immutable published version before they reach the engine; tests explain decisions, and every step is audited.

Outcome

  • ~80 operations in the OpenAPI contract
  • 17 normalised entities behind the lifecycle
  • 0 test fixtures allowed into production

Product work for banks and enterprises. Client and product names are not disclosed.

The challenge

Access rules lived as static lists in the panel while the gateway made the real decisions. Modelling who can do what across people, teams, places and documents was guesswork, and a mistaken rule could only be found after it reached production.

The approach

  1. 01

    A control plane, not another engine

    The designer models and publishes; the authorization engine decides. It never replaces the identity provider or the gateway, which keeps every system responsible for one thing.

  2. 02

    A lifecycle with immutable versions

    Draft, validate, review, publish, deploy. A published version is frozen with its schema, canonical form and hash; fixing it means branching a new draft, and every step is audited with a diff and impact analysis before release.

  3. 03

    Tests that explain themselves

    Pick a subject, a resource and a permission and get the decision with a proof trace. A deny says whether a relation is missing or a condition failed, and test fixtures can never reach production.

  4. 04

    Tenant isolation in depth

    The tenant comes from the verified session, never the request. Every table carries it, keys are scoped by it, and PostgreSQL row level security backs up the application checks.

  5. 05

    An editor built for the model

    Explorer, graph canvas and inspector side by side, an expression builder that shows errors where they are, and five distinct error classes so people know what to fix.

Results

~80

operations in the OpenAPI contract

17

normalised entities behind the lifecycle

0

test fixtures allowed into production

Stack

SpiceDB, PostgreSQL, CEL, OpenAPI, Next.js, TypeScript

Written about it

Next project

Branch Liquidity

How much cash each branch holds today, in production at a national bank