/model

One hierarchy. One place access is decided.

Plat5 owns the tree of nodes and who can reach each one; your services own everything inside a node.

Kind
A configured level in plat5.yml, such as workspace, organization, or project.
Node
One instance of a kind (for example, the Northwind organization or its web project).
Root (tree)
A top-level node with no parent. One root and everything under it is one isolation boundary.
Member
A user or service account inside one root—the caller ID your service receives on routes under that root.
Scope
What a route belongs to: a configured kind, the signed-in user (user), or unauthenticated (public).
organization · root01jbw2k8m4…

Northwind Traders /orgs/northwind

Maya · admin cascades to all children
project01jbx9q3t5…

web /projects/web

Maya · admin inheritedSam · viewer this project only
project01jby1p9k2…

api /projects/api

Maya · admin inheritedSam · no access 403
One root node is one isolation boundary. Org roles inherit downward; project-scoped bindings only grant access to that node.
  • The tree is config; nodes are data.

    Declare the levels your product needs—from a single root level (such as workspace or organization) when your services or external PDP own flexible inner graphs, to nested trees like the starters' organization → project (or environments, teams, and more). Each root node and everything under it is an isolation boundary. An unreachable node looks identical to one that does not exist.

  • Slugs at the edge, ULIDs inside.

    Customers call readable paths like /orgs/northwind/projects/web (or an edge proxy rewrites northwind.api.example.com into that path). The gateway resolves slugs into lowercase ULIDs and rewrites the upstream path. Deletes are soft (30-day default grace), and purged root slugs stay tombstoned so old configs never route to a stranger.

  • Per-tree members, suspension, and org guardrails.

    Services receive a per-tree member id (X-Plat5-Member-Id) on tree routes and a user id (X-Plat5-User-Id) only on user routes; IdP subjects never leave identity. Members can be reversibly suspended inside an org, and each org can enforce IP allowlists, required IdP SSO/MFA claims, and whether personal or user-member API keys are allowed.

  • Inherited access, custom roles, or AuthZEN.

    In built-in RBAC mode, access is the union of unexpired direct, group, and custom role bindings across the node and its ancestors (with optional JIT expires_at and project-scoped grants on root invites). Or replace built-in RBAC with an external OpenID AuthZEN 1.0 PDP. Either way, node lists auto-filter, POST /access/routes keeps UIs in sync, and services can query identity outside a request.

Route scopes

Every route declares one scope: no one's data, the caller's own, or a configured kind. That determines which credentials it accepts and which ids your service receives.

ScopeWhose dataCredentialYour service gets
publicNo one'sNone—
userThe caller's ownIdP token or personal key{user.id}
organization, project, …That node in its treeAny credential with a binding there, or above it{organization.id} {project.id} {member.id}

/request

Eight steps, in the same order, on every request.

Each step can reject a bad request before your service is ever called. Permission checks run before rate limits and audit writes—so unauthorized callers can neither probe node existence nor drain a project's budget. Audit defaults to fail-closed sync mode and can be switched to async or off.

  1. 01404
    Match the routeDeclared route table. Anything undeclared ends here
  2. 02401 · 403
    Authenticate & admitVerify JWT or API key, resolve node chain, and check membership plus org security policy
  3. 03403 · 503
    Check permissionBuilt-in ancestor, group, and custom roles—or an external AuthZEN PDP—intersected with credential scopes
  4. 04429
    Rate limitPer-caller, per-node, or plan-tiered budgets in Valkey—only allowed callers spend them
  5. 05400
    Fill in the pathIds for the organization, project, and member. Slugs never reach your service
  6. 06503
    Record auditOn audited routes, intent written first in sync mode (or queued after response in async mode)
  7. 07502
    Your serviceCredentials removed; request id, trace context, and optional Ed25519 signature added
  8. 08
    Record outcomeFinal status and optional X-Plat5-Audit-Details recorded in the background
Each step can end the request with the status shown. Your service is called at step seven.
A Grafana trace of one request: credential validation, audit intent, the starter API, and audit outcome.
The same steps as a live trace in Grafana, preloaded by plat5 start.
POST /orgs/northwind/projects/web/tasks
HTTP/1.1 422 Unprocessable Entity
X-Request-ID: 7d6f1c2e-4b0a-4e8e-9a51-3f2b8c1d9e04

{
  "error": {
    "type": "invalid_request_error",
    "code": "VALIDATION_ERROR",
    "message": "Title is required.",
    "request_id": "7d6f1c2e-4b0a-4e8e-9a51-3f2b8c1d9e04",
    "details": {
      "fields": [{ "path": "title", "message": "Title is required." }]
    }
  }
}

The same id in

Gateway log
{"request_id":"7d6f1c2e…","route":"…/tasks","status":422}
Your service
{"request_id":"7d6f1c2e…","status":422,"duration_ms":2.4}
Trace
POST …/tasks request_id=7d6f1c2e…
Audit event
{"request_id":"7d6f1c2e…","status":422,…}

A hard box around your service

Whether a handler is written by an engineer or a coding agent, credentials, isolation, rate limits, and audit recording are enforced outside it. The handler focuses on domain rules and filters its queries by the verified node id in the path.

Gateway contract →

Plat5 on every request

  • Sign-in, scoped API keys & org policies
  • Node resolution (slugs → ULIDs)
  • Built-in RBAC or external AuthZEN PDP
  • Per-caller, per-node & tiered rate limits

Your service written by you or your coding agent

POST /projects/01jbx9q3t5/tasks
  • Handlers and business rules
  • Your data, filtered by the project id
  • Errors, lists, logs and audit details in the standard shape
  • Sync fail-closed or async audit logs
  • Request ids, traces & optional Ed25519 signing
  • Credentials removed
  • CORS

/config

Config as code, plus transactional lifecycle events.

Levels, roles (or an external authorizer), rate limits, and every service's routes live in YAML in your repository—layered per environment with -f overlays. Changes are validated and planned before they apply with multi-issuer OIDC read/applyattribution, and every committed tree or member change writes a replayable lifecycle event (including user.deleted and node.purged for GDPR erasure) in the same transaction.

plat5.yml
# plat5.yml: levels, roles, and rate limits in one file
kinds:
  organization:
    path: /orgs/{organization}
    list_permission: organization:read
  project:
    parent: organization
    path: /projects/{project}
    list_permission: project:read
    bind_creator: false     # its creator works through their roles above

roles:
  admin:
    permissions: ["*"]
    bindable_at: [organization, project]
  member:
    permissions: [organization:read]
    bindable_at: [organization]
  developer:
    includes: [member]
    permissions: [project:read, project:write, project:bindings:read]
    bindable_at: [organization, project]
  viewer:
    includes: [member]
    permissions: [project:read]
    bindable_at: [organization, project]
creator_role: admin

rate_limits:
  standard: { requests: 100, window: 1s }
  projects: { requests: 600, window: 60s, count_at: project }
defaults:
  rate_limit: [standard]
plan · apply · roll back
# Add a level to plat5.yml (environment under project), regenerate routes, apply
$ plat5 routes generate
  wrote services/identity.yml
  wrote services/audit.yml

$ plat5 plan -f plat5.yml -f plat5.prod.yml
  + kind environment
      + parent: "project"
      + path: "/envs/{environment}"
  ~ service identity
      + GET /orgs/{organization}/projects/{project}/envs
      + POST /orgs/{organization}/projects/{project}/envs
      …

Plan: 1 to add, 3 to change, 0 to remove.

$ plat5 apply -f plat5.yml -f plat5.prod.yml --auto-approve     --reason "Add environment kind under project" --ref "PR-418"
gateway: 3/3 replicas on revision 42

# Roll back: pull and apply an earlier revision
$ plat5 config pull --revision 41 rollback
$ plat5 apply rollback/plat5.yml --reason "Revert env kind" --ref "INC-91"
identity · /internal/events
GET /internal/events?after=1040

{
  "events": [
    { "id": "1041", "type": "node.created", "kind": "project",
      "node_id": "01jbx9q3t5…", "root_id": "01jbw2k8m4…" },
    { "id": "1042", "type": "member.created",
      "member_id": "01jby4r6v8…", "root_id": "01jbw2k8m4…" },
    { "id": "1043", "type": "user.deleted", "user_id": "01jbz7w2n5…" }
  ],
  "has_more": false
}

/architecture

Four small binaries. Runs on your server.

Gateway (Rust on Pingora), control-plane (Rust), identity (Go), and optional audit (Go), plus Postgres and optional Valkey in one Docker Compose stack. Your services sit on a private network—or verify Ed25519 X-Plat5-Signature headers when running outside it.

Clients

Your web app
Customer integrations
Scripts and CLIs

Edge

gatewayRust, on Pingora. Auth, org policies, RBAC/AuthZEN, rate limits, audit, path rewrite
Your identity providerOkta, Auth0, Clerk, or Plat5 Auth
operator gatewayOptional. Separate admin plane & operator audit

Private network

identityGo. Nodes, members, groups, roles, policies, keys
auditGo. Optional. A log per root and per user
control-planeRust. Kinds, roles or authorizer, routes, limits
AuthZEN PDPOptional. Topaz, Cerbos, OpenFGA
Your servicesAny language. Your databases

State

PostgresIdentity, control plane (+ audits)
ValkeyOptional. Shared rate-limit counters

Explore the interactive modular map (defaults, swaps, and toggles) →

Bring any identity provider—swap any time.

Point the gateway at any provider that issues signed JWT access tokens, or run self-hosted Plat5 Auth. Your services only ever see Plat5 member and user ids, so changing providers requires zero application changes.

Bring your identity provider →
gateway environment
# Start with Plat5 Auth: email sign-in, runs anywhere
AUTH_ISSUER=https://auth.acme.com
AUTH_JWKS_URI=https://auth.acme.com/.well-known/jwks.json
AUTH_SUBJECT_CLAIM=sub

# Or use Okta. Your services don't change.
AUTH_ISSUER=https://acme.okta.com/oauth2/default
AUTH_JWKS_URI=https://acme.okta.com/oauth2/default/v1/keys
AUTH_SUBJECT_CLAIM=sub
  • Plat5 Auth
  • Auth0
  • Okta
  • Keycloak
  • Entra ID
  • Any JWT issuer
  • Identity provider

    Start with self-hosted Plat5 Auth, or point AUTH_ISSUER and AUTH_JWKS_URI at any issuer of signed JWT access tokens. Orgs can require specific IdP claims (SSO/MFA) and IP allowlists via their security policy.

  • External AuthZEN authorizer

    Replace built-in RBAC across the deployment with Topaz, Cerbos, OpenFGA, or any OpenID AuthZEN 1.0 PDP — including record-level resources — without losing edge 403s, node list filtering, or /access/routes.

  • Audit & rate limits

    Both are on by default. Choose sync fail-closed, async, or off via AUDIT_MODE—with Owner/Writer DB role separation, pull export (GET /internal/events), and partition prune. Set per-caller, per-node, or tiered rate limits over Valkey (with rediss:// TLS, or RATE_LIMIT_ENABLED=false).

  • Operator plane & telemetry

    Optional second headless gateway with AuthZEN 1.0 authorization, TRUSTED_PROXIES, X-Plat5-Operator-Reason, X-Plat5-As-Member, and operator-audit in its own Postgres (with export and prune). Every component emits JSON logs, Prometheus /metrics, and opt-in OTLP traces.

Read the full self-hosting guide →

/boundaries

Deliberate boundaries.

Plat5 stays small and predictable by refusing to grow into a policy engine or a framework. Here is what it intentionally does not do—and what is on the roadmap next.

  • A bundled policy engine or hardcoded role names

    Built-in access is strictly additive from ancestor, node, group, and custom role bindings. When you need ReBAC, ABAC, or explicit denies, attach an external AuthZEN 1.0 PDP (Topaz, Cerbos, OpenFGA) rather than bloating the core runtime.

  • Domain state rules inside a node

    Plat5 enforces who can reach a node or record resource at the gateway. Business state rules ("you cannot approve your own change", "cannot archive a live release") stay in your service where domain data lives.

  • Billing or product-specific org settings

    Plat5 stores only what access, routing, and security policies need — plus an opaque rate_limit_tier on roots so your billing service can switch plan budgets without putting pricing logic in Plat5.

  • Drop-in auth-library swap

    Adopting Plat5 means putting your isolation boundary under it—whether a single root level (workspace or organization) or a multi-level tree—so routes, credentials, and audit line up with your kinds config. Moving off it later is a migration of nodes, members, and bindings, not swapping an auth SDK.

Where Plat5 sits alongside existing tools

  • vs. Auth providers (Okta, Auth0, Clerk)

    Identity providers prove who a person is. Plat5 sits in front of your services, accepts JWTs from any IdP, and owns the resource tree, per-org policies, API keys, access enforcement, and audit logs.

  • vs. API gateways (Kong, Envoy, NGINX)

    Generic gateways route HTTP and validate tokens. Plat5 understands your org/project hierarchy, resolves slugs to ULIDs, enforces inherited access, and records organization-scoped audit logs.

  • vs. Policy engines (Topaz, Cerbos, OpenFGA)

    PDPs answer authorization questions you wire into every handler. Plat5 includes built-in hierarchical RBAC—or calls your AuthZEN 1.0 PDP at the gateway so services stay auth-free.

  • vs. Building it yourself

    Rolling organizations, API keys, custom roles, CIDR/IdP policies, fail-closed audit, SIEM export, and governed operator tooling takes months—and drifts across every service you add. Plat5 makes it one reviewed config file.

Coming next

None of this ships today. It is the planned direction so what you build against now stays compatible.

  • Kubernetes and Helm
  • Turnkey SCIM directory sync
  • Plat5 Cloud

See it running in minutes.