Archenstack
A reusable role × feature access-control matrix, and a platform that runs your product one tenant at a time. The two are separate things that fit together, and either is usable without the other.
The libraries are one small, ordered model — written once per language and shared over a language-neutral wire — so the same permissions back your services, in Python, Node, Go, Rust or on the JVM, and your TypeScript front-end, and they all agree down to the byte. They aren't a framework and they aren't a database: a resolving core in each language, thin adapters for the frameworks you already use, and a front-end library. You bring the storage, the HTTP, and the auth.
The platform takes a paid signup and produces a running instance of your product for one customer, on a machine it manages — with that tenant's own OIDC client, its own first administrator bound in its own matrix, its own secrets, its own network, its own name and certificate, and its own backups. You bring an image that says how to run your product; it brings the machines, the placement, the routing and the lifecycle.
The archenstack-rbac-web React demo — the whole org-admin UI (org
picker, roles & groups, members & assignments, and the editable role × feature
matrix), served by any Archenstack backend. It lives in the archenstack-demo repo as
archenstack-rbac-web-demo; get started →.
The model in a nutshell
Authorization is a grid of roles × features, and every cell resolves to one of
four ordered levels:
| Level | Value | Means |
|---|---|---|
NONE | 0 | no access |
VIEW | 1 | read only |
PARTIAL | 2 | write, but scoped (your own records, your own department, …) |
FULL | 3 | unrestricted read + write |
Because the levels are ordered, "can they?" is just a comparison: level >= VIEW
is can read, level >= PARTIAL is can write. A default ships in your
source; an admin layers overrides on top at runtime; and two rules sit above
the grid — superusers are always FULL, and aliases let one role borrow
another's permissions. That's the whole thing. It stays small on purpose, so it
ports cleanly and you can keep it in your head.
One deployment can serve many organizations at once, each owning its own isolated matrix — see multi-tenancy.
Learn the model → · Get started → · Run it as a platform →
Pick your stack
- 🐍 archenstack-rbac — the pure, dependency-free core and the reference implementation. Drops into FastAPI, Flask, or anything else.
- 🎸 archenstack-rbac-django — a batteries-included Django/DRF adapter: ORM storage, a management API validated against the lock-out invariant, and DRF permission classes.
- ☕ archenstack-rbac-java — a zero-dependency JVM core plus a Spring Boot starter; the core is just as happy in Quarkus, Micronaut, or plain Java.
- 🟩 archenstack-rbac-nodejs — a zero-dependency TypeScript core for the server, plus an Express adapter — the back-end counterpart to archenstack-rbac-web.
- 🦀 archenstack-rbac-rust — a zero-dependency core crate plus an optional axum adapter behind a cargo feature.
- 🐹 archenstack-rbac-go — a standard-library-only core plus a net/http adapter, with no third-party dependencies at all.
- 🟦 archenstack-rbac-web — a framework-agnostic TypeScript client, a headless admin editor, React components, and a permission layer for your own UI.
- 🔐 archenstack-instance-env — the instance-side reader for
wrapped secrets, in five languages. A provisioned tenant's
.envholds ciphertext; this exchanges it for the real value at boot, and uses a plain value as-is with no call at all. - 💳 @archenstack/pricing-web — the pricing page's half of the
platform handoff: the checkout URL builder, a themeable
<Pricing>, and a subscription banner.
Selling it as a product
If you are not just embedding the libraries but selling your product as a tenanted service, the platform is the other half of this documentation:
- Overview — what the control plane, the per-machine agent and the two edges each own.
- Tenancy & placement — what a plan buys, and why a production tenant gets a machine to itself.
- Packaging a product — what your image has to declare before a machine will build it.
- Data & backups — whose decision a copy of a customer's data is, and how one is put back.
One contract, many languages
Every implementation speaks wire_version 1 and is checked against the same
shared conformance corpus, so their canonical JSON matches byte-for-byte. Define a
matrix in one service and any other language's tooling — an editor, a policy export,
a front-end client — understands it perfectly.
- The wire protocol — envelopes, endpoints (including the batch
/check/), theAccessLevelencoding, and the error taxonomy. - Security model — fail-closed scoping, the caller-must-have-a-role rule, the lock-out escape hatch, and why the client is a hint and never the authority.
- Versioning — libraries use semver; the wire uses an
integer
wire_version; resolution semantics are pinned to the wire major.
What we believe
- Fail closed. Unknown feature, malformed scope, no role, a request still in flight — every one of those denies. Access is never granted by accident.
- The server decides. Client checks choose what to show; the server re-authorizes every real action. Object-level decisions are the server's alone.
- Small and explicit. Four levels, an ordered grid, a handful of rules. No hidden inheritance, no surprise wildcards.
- The spec wins. If an implementation and the specification ever disagree, the spec is right and the implementation has a bug.
These packages are published to Archenstack's private GitLab Package Registry while the open-source decision is pending — you install them by name once your package manager points at the registry (see Installation). The docs describe the current, tested behavior.