Deployment modes: with an IdP vs standalone
Archenstack is authorization only — it never authenticates a caller, runs a login, or talks to an identity provider. Two things therefore live outside the core, and each has two shapes. Together they decide how you deploy:
- Where the authenticated principal comes from — an IdP (OIDC) whose token your framework validates, or your own auth (session, API key, gateway header, mTLS).
- How tenants and the first admin get created — a separate orchestrator that provisions them, or by hand at boot.
This page contrasts the two ends of that spectrum: a full IdP-backed deployment, and a standalone / bring-your-own-auth one. It builds on the OIDC claim contract and Provisioning & self-service; the exact variables each mode reads are in Configuration & environment variables.
Everything below is described against the standards contract — an OIDC provider that emits a stable opaque sub and an org/orgs[] claim behind an organization scope, over JWKS-validated tokens. Any standards-compliant IdP satisfies it. Archenstack stays vendor-neutral and names no specific product.
One extension point, the same in every adapter
Whichever mode you run, every adapter exposes the same pluggable resolver — the one that answers "who is this caller, and which tenant?" by mapping the request to a (role | subject, org, [platform]) tuple. The mode only changes what you supply as that resolver:
- With an IdP, the shipped claims resolver fills it by reading claims off the token your framework already validated.
- Standalone, you fill it from whatever your own auth layer attached to the request.
Either way the resolver is fail-closed: the library's shipped default resolver resolves no role (deny), so a deployment that wires nothing denies every caller. You opt into access by supplying a resolver — never out of it. See the "caller must have a role" contract.
Mode A — with an IdP (OIDC)
Identity. Your framework's resource server verifies the token — signature against the issuer's JWKS, plus iss (config-pinned), aud, and exp/iat/nbf. Only then does Archenstack read the principal. Validation is always the host's job; Archenstack never validates a token.
The claims resolver. Each language ships a ready-made resolver that reads the identity claims (sub, org, and optionally a platform claim) off that already-validated principal — you turn it on rather than writing your own:
| Language | Turn it on with | Reads |
|---|---|---|
| Java / Spring | archenstack-rbac.jwt-resolver.enabled=true (JwtClaimsRoleResolver) | sub / org / email / optional role, platform |
| Node | ARCHENSTACK_RBAC_JWT_RESOLVER_ENABLED=true (jwtClaimsRoleResolver) | the role claim (single-org core) |
| Go | ARCHENSTACK_RBAC_CLAIMS_RESOLVER_ENABLED=true (ClaimsRoleResolver) | the role claim (single-org core) |
| Rust | claims_role_resolver(ClaimsResolverConfig) | the role claim (single-org core) |
| Django | point SCOPE_*_RESOLVER at the jwt_claims callables | sub / org / role / platform off the validated claims mapping |
The resolver decodes and reads the token but never verifies it — that already happened upstream. A missing token, malformed JWT, or absent claim resolves to deny, never a silent default.
Provisioning. Tenants and the first admin are created by a separate orchestrator, not by Archenstack's admin UI. The orchestrator is the only component that writes to both systems — it creates the org and membership at the IdP over SCIM 2.0 and seeds the matrix + binds the first admin at Archenstack via provision_org(slug, first_admin_sub, plan?), atomically and idempotently. A login never depends on billing or provisioning. The whole flow — self-service and manual — is Provisioning & self-service.
And optionally the machines too. That same orchestrator is the control plane of the platform: if your product is sold as a tenanted service, it also places each tenant on a machine, builds its stack from your image, routes its hostname, bounds it to what its plan bought, and keeps its backups. Mode A does not require any of that — an orchestrator that only provisions orgs is a complete Mode A deployment — but everything in the platform section assumes this mode.
Mode B — standalone / bring-your-own-auth
No IdP, no orchestrator. Archenstack slots into a service whose authentication you already own.
Fill the resolver against your own auth. Implement the same pluggable resolver, reading the caller from whatever your stack authenticated — a session user, a validated API key, a trusted gateway header, an mTLS identity. The library asks only for a role (or a stable sub) and, for multi-tenant deployments, an org slug; it makes no assumption about how you established them.
Bootstrap the first admin. A bare deployment faces a chicken-and-egg problem: every management route requires rbac.manage FULL, so there is no in-matrix way to create the first admin assignment. The bootstrap-admin-subject knob solves it — at startup, Archenstack binds a stable subject you name to the admin role in the default org, before any orchestrator or IdP platform admin exists:
| Language | Knob | Notes |
|---|---|---|
| Java / Spring | archenstack-rbac.bootstrap-admin-subject (+ archenstack-rbac.bootstrap-admin-role) | empty ⇒ no bootstrap; role defaults to administrator |
| Django | ARCHENSTACK_RBAC_BOOTSTRAP_ADMIN_SUBJECT (+ ARCHENSTACK_RBAC_BOOTSTRAP_ADMIN_ROLE) | empty ⇒ no bootstrap; requires ARCHENSTACK_RBAC_DEFAULT_ORG |
| Go | ARCHENSTACK_RBAC_BOOTSTRAP_ADMIN_SUBJECT (+ ARCHENSTACK_RBAC_BOOTSTRAP_ADMIN_ROLE) | empty ⇒ no bootstrap |
It is an opt-in toggle: an empty value is the explicit "off" state (no startup bind), never a crash.
Platform-subject the first platform admin. The cross-org control plane (tenant creation, platform-scoped routes) sits above any org's rbac.manage and is never granted by the matrix. For a standalone deployment with no IdP asserting a platform scope, the platform-subjects allowlist (ARCHENSTACK_RBAC_PLATFORM_SUBJECTS — a comma-separated list of stable sub strings) is the auditable env-sourced bootstrap for the very first platform admin. It is an explicit empty allowlist by default: with nothing set there is no bootstrap platform subject, and the platform check fails closed. This allowlist is always unbounded — the first platform admin must be able to create the first org.
It is a bootstrap, not an access-management tool: unconditionally unbounded (every tenant, ignoring org bounds), arming it needs a restart, and it does not survive an identity-provider outage — it matches on the caller's sub, which only exists once a token has been validated. An armed allowlist must therefore carry ARCHENSTACK_RBAC_PLATFORM_SUBJECTS_EXPIRES_AT; without it the app refuses to boot, and once the deadline elapses the grant goes inert with no restart.
For support access, grant a bounded governs_orgs from your identity provider instead — see Vendor & support access during an incident.
Platform authority need not be deployment-wide. A grant may be bounded to an explicit set of org slugs — a parent organization governing exactly its own subsidiaries and no other tenant — enforced on every control-plane route against that route's target org. Asserting no bound keeps the full, unbounded reach. See Hierarchical organizations.
Both modes share one posture: deny unless something explicitly grants. The shipped resolver denies; the platform allowlist is empty; a half-provisioned org stays inactive and denies. Standalone simply means you are the trusted upstream that establishes identity, instead of an IdP + orchestrator.
The second axis: single-org vs multi-tenant
Independent of where identity comes from, either mode runs single-org or multi-tenant — the wire is byte-identical whether or not a deployment serves many orgs (see Organizations):
- Single-org. Never emit an
orgclaim; the app lives in one org, by default the reservedroot. The org resolver returns nothing and the runtime uses the default org (ARCHENSTACK_RBAC_DEFAULT_ORG/archenstack-rbac.default-org) — but only for seed and backfill, never as a request-time fallback. - Multi-tenant. Emit an
org/orgs[]claim (IdP mode) or have your resolver return the caller's org (standalone). Each request selects that org's snapshot; a missing or unknown org fails closed.
ARCHENSTACK_RBAC_DEFAULT_ORG is env-sourced with no inline default — an unset value fails loudly at boot — and is never substituted for a missing claim at request time.
The two modes at a glance
| With an IdP (OIDC) | Standalone / BYO-auth | |
|---|---|---|
| Who validates identity | your framework's resource server (JWKS) | your own auth (session / key / gateway / mTLS) |
| Resolver | shipped claims resolver (opt-in toggle) | you implement the same resolver |
| First admin | orchestrator via provision_org | bootstrap-admin-subject at boot |
| First platform admin (control plane) | IdP platform scope / claim | platform-subjects platform-subject allowlist |
| Tenant provisioning | separate orchestrator over SCIM + provision_org | by hand (bootstrap + admin UI) |
| Tenancy | single-org or multi-tenant | single-org or multi-tenant |
| Default posture | fail-closed | fail-closed |
Both are supported by the same libraries at the same time — an IdP-backed multi-tenant SaaS and a standalone single-org internal tool are the same core with different resolvers supplied.
A third, independent choice: how strictly to enforce
Orthogonal to identity and tenancy is enforcement mode — whether a denial actually blocks. The default enforce blocks it (403); shadow instead logs the would-be denial and lets the request through, so you can turn Archenstack on over an existing, live app, watch the logs for what it would have blocked, correct the matrix, then flip to enforce. It applies to both the object authorizer and the coarse feature check, and never loosens the policy-admin feature rbac.manage. Set it with archenstack-rbac.enforcement-mode / ARCHENSTACK_RBAC["ENFORCEMENT_MODE"] (or the adapter's config).
See also
-
The platform — Mode A taken all the way: the control plane also owning the machines each tenant runs on.
-
Configuration & environment variables — every
ARCHENSTACK_RBAC_*var each library reads, required vs optional. -
Provisioning & self-service — the orchestrator, SCIM, and
provision_org(IdP mode). -
Organizations (multi-tenancy) — the tenancy model and the OIDC claim contract.
-
Wiring multi-tenancy — the per-backend resolver and the org picker.
-
Security — the fail-closed threat model both modes extend.