Umbral Tenants
Official by Umbral contributorsschema/shared-table tenancy, request resolution, membership
About
Turn one app into a multi-tenant SaaS without forking it per customer. Umbral Tenants routes each tenant to its own Postgres schema (or scopes them by a tenant column), resolves the active tenant from the request, and binds it to the caller through a membership check so nobody reads across the wall. Pick the isolation strategy that fits — a schema per tenant for hard separation, a shared table for density — and the framework handles the routing.
Install
Wire it up
Choose which apps are tenant-scoped, the isolation strategy, and how the tenant is identified.
use *;
use ;
let app = builder
.database
.plugin
.build?;
Target: hard isolation with a safety net
Run TenantStrategy::Schema for separation and layer umbral-rls underneath, so the database enforces the tenant boundary even if request routing has a bug.
What you get
- Schema-per-tenant or row-per-tenant (shared column) strategies
- Tenant resolved from the request (header or your own resolver)
- Membership binding so a caller can't read another tenant's data
- Choose which apps are tenant-scoped and which stay shared
- Pairs with umbral-rls for database-enforced defence in depth
Usage
On `TenantsPlugin::new()` pick a `.strategy(...)` (schema-per-tenant or shared-column), list the `.tenant_apps([...])` that are scoped, and set how the tenant is resolved (`.tenant_header(...)` or a membership guard). Layer umbral-rls for database-enforced isolation.
cargo add umbral-tenants
Feature tracker
Per-feature shipping status, recorded in the directory.
Route tenant-scoped apps into isolated Postgres schemas.
Scope rows by tenant key when density matters more than schemas.
Resolve tenants from headers, subdomains, or custom policy.
Bind resolved tenants to callers through a membership check.
Choose tenant-scoped apps and shared apps explicitly.
Handlers can read the active tenant from request-local context.
Compatibility
Declared support per Umbral version and database backend.
No compatibility rows declared yet.
Community notes
0 notes in the discussion thread.
No notes yet. Be the first to share how this plugin works for you.
Reported issues
Bugs and abuse reports filed against this plugin.
No open issues
No issues have been reported against this plugin. Track upstream bugs on the maintainer's tracker, or report a directory problem to the Umbral team.