Provisioning & self-service
When someone signs up and pays, they should arrive in a tenant that already works — their organization exists, they're its admin, and their permissions resolve on the very first login. This page follows that journey across the three systems it touches, on both the automatic path (pricing page → sign-up → pay) and the one done by hand (a platform admin onboarding a customer). It's the companion to Organizations (multi-tenancy) and Wiring multi-tenancy.
This is the platform path: an IdP-backed deployment with the orchestrator in front of it, which is what the platform overview describes. A standalone deployment has neither — you own authentication, the first administrator is established at boot, and the libraries' own management API covers everything this page routes through a coordinator. See Deployment modes.
Three systems, one coordinator
Provisioning touches three systems, and the clean rule is each owns exactly one thing:
| System | Owns (system of record) |
|---|---|
| Identity provider (OIDC) | Users (sub), org membership (drives the org claim), and OAuth clients (apps). |
| Archenstack | Authorization: roles, features, the matrix, and (org, sub) → role assignments. |
| Orchestrator | Nothing of its own — it coordinates. In this mode it is the single component that writes to both the IdP and archenstack-rbac. |
The orchestrator is a separate service, not a module of the IdP: it is Archenstack-aware and billing-aware, and the IdP must stay vendor-neutral and auth-focused. It talks to the IdP over standard SCIM 2.0 and to Archenstack over its HTTP API — so a login never depends on billing or provisioning, and each scales and fails independently.
Wherever an IdP is in play, the orchestrator is the component that writes to both it and Archenstack; neither of those ever calls the other.
Because when an IdP owns identity, creating a tenant is a cross-system act: it needs an IdP org + membership (so the org claim can be issued) and an Archenstack matrix + admin role. A UI that did only the Archenstack half would produce a tenant whose users can never get an org claim. So in this mode tenant creation belongs to the coordinator, and the matrix UI inside an application stays the tenant admin's authorization surface.
A standalone deployment has no second system to keep in step, so the cross-system argument doesn't apply: the platform-scoped POST /permissions/orgs/ (Django) / POST /orgs/ (Java) creates a tenant directly, and ARCHENSTACK_RBAC_PLATFORM_SUBJECTS names the subjects allowed to call it until a token can assert the scope.
Who does what, where
Each row names the principal who initiates the task. The orchestrator's control-plane paths are
named for the authority they require — /platform/** needs the platform scope, /product/** the
product scope — so a tenant admin's own actions reach them through their application's backend,
which holds a platform service account.
| Actor | Task | Surface | Writes to |
|---|---|---|---|
| Platform admin | Create tenant + first tenant admin | Platform console / POST /platform/api/tenants | IdP and Archenstack (one step) |
| Platform admin | Hosts and their capacity, plans and what each buys, products, fleet rollouts, backups, moving or closing a tenant | Platform console / /platform/api/** | the orchestrator's own ledger and the hosts' agents |
| Platform admin | Review a product's request to change its apex | Platform console / POST /platform/api/products/{slug}/rebrands/{id}/approve | the orchestrator's product registry |
| Product owner | Ask to change their product's apex | Product console / POST /product/api/products/{slug}/rebrands | the orchestrator's product registry (a request, applied only on approval) |
| Product admin | Read the product: its domains, their customer counts, a request in flight | Product console / GET /product/api/products/{slug} | nothing — the narrower of the two product levels asks for nothing |
| Buyer | Buy a tenant | /signup/** → the billing provider → the webhook | nothing directly; the webhook provisions |
| Tenant admin | Invite / remove members | the application's Members panel → orchestrator POST /platform/api/orgs/{slug}/members | IdP membership (the Archenstack roster reconciles) |
| Tenant admin | Register apps (OIDC clients) | the application → orchestrator POST /platform/api/orgs/{slug}/apps | IdP (DCR) → Archenstack binds org ↔ client_id |
| Tenant admin | Roles, matrix, assign roles to members | the application's PermissionsAdmin | Archenstack |
| Tenant admin | Whether copies of the tenant's data are kept | the application, calling PUT /tenants/{slug}/backups/consent with the tenant's own client credentials | the orchestrator's record of what that tenant decided |
| Product developer | Define the application's features | the application's /permissions/features/** | Archenstack |
| Tenant user | Sign up / log in | IdP | IdP |
The principals themselves — what proves each one, what it may do, and which surface it operates on
— are listed in the suite's USERS.md.
The first tenant admin — created and linked atomically
The central step of provisioning is one idempotent, fail-closed step the orchestrator runs — Archenstack's provision_org(slug, first_admin_sub, plan?) combined with the IdP writes:
- IdP — SCIM
POST /Groupscreates the org;PATCH /Groups/{id}adds the first admin as a (primary) member. Now the IdP will issue that user anorgclaim. - Archenstack —
provision_orgcreates the tenant inactive, seeds a lock-out-safe matrix, binds the first admin'ssubto theadministratorrole, then flips it active.
So the org, the membership, and the first-admin role assignment are created and linked in one unit. An org that isn't lock-out-safe never goes active (it stays inactive and denies at the resolver). The exact same step serves both paths below — the manual path is just the automatic path without the billing trigger.
Self-service (automatic)
-
The user signs up at the IdP (stable opaque
sub, verified email) — they have no org yet; that's correct.Before that, the pricing page hands them off to the orchestrator's signup BFF with their intent as query parameters:
product,plan,org, andbackup_copies.@archenstack/pricing-webbuilds that URL, and there is no email parameter — the buyer's address comes from the verified sign-in that follows, so a typed one would bill and provision under an address nobody proved. -
On a successful payment, the billing provider calls the orchestrator back at
POST /webhooks/billing/{billingProviderKey}. The billing provider is named in the path, not read out of the body, because which one sent the callback decides which secret authenticates it. -
The orchestrator authenticates the callback by that billing provider's own scheme, requires a paid signal and
email_verified, dedupes on the event/payment id (redelivery-safe), then runs the atomic provision above with its two machine tokens (a SCIM provisioning scope for the IdP, a platform scope for Archenstack). -
On the invited member's next login the IdP issues the
orgclaim; Archenstack resolves them toadministrator. -
If the pricing page asked about backups, that answer is recorded against the tenant as it is built — and only then, so a redelivered callback cannot undo a decision the tenant has made since. A page that did not ask records nothing, which leaves the question to the application. See Packaging a product for provisioning.
Billing in the orchestrator is a port with one adapter per billing provider, so both shapes a payment can take are supported and neither is assumed:
- A hosted checkout page (a card vendor). The orchestrator starts the payment server-side and redirects the browser to the vendor's page. Its callback carries an HMAC signature header computed over the raw body, which is what authenticates it.
- A prompt pushed to the buyer's handset (a mobile-money vendor). There is nothing to redirect to: checkout answers a prompt is on your phone, the buyer confirms it with their PIN, and the payment is confirmed asynchronously when the callback arrives. Such a vendor signs nothing, so the authentication is a secret in the callback URL registered with it, compared in constant time.
The provisioning step is identical either way. What differs is how the payment starts, and how the callback proves who sent it.
By hand (a platform admin)
Identical outcome, no billing trigger. A platform admin uses the orchestrator's platform console (a small Thymeleaf UI behind an OIDC login, platform-authority only) or its API:
# the same provision the webhook runs, triggered by a platform admin
POST /platform/api/tenants { "slug": "acme", "label": "Acme Inc.", "first_admin_sub": "<the first admin's sub>", "plan": "pro" }
# → SCIM create-org + add-member, then Archenstack provision_org — atomic + idempotent
Use this to onboard a customer whose first admin you already know, or to provision without a payment step.
Membership & invites
Membership authority is the IdP (user_organizations → the org claim). Archenstack's OrgMember registry is a reconciled roster — the source for the assignment subject picker — filled three ways:
- JIT on first authenticated request — anyone who logs in to the org becomes assignable, using the
subalready in hand. - Invite by email — a tenant admin invites in the application's Members panel; the invite delegates to the orchestrator (
POST /platform/api/orgs/{slug}/members), which does a SCIM add-member on the IdP so the person actually becomes a member and gets theorgclaim. On their first login, JIT reconcilesemail → sub, and any pre-made role assignment binds to the realsub. - SCIM reconcile (optional) — pull the roster from the IdP.
The subject picker therefore only ever shows real members — you can't assign a role to someone the org doesn't know.
Apps (OIDC clients)
A tenant admin registers an app for their org through the orchestrator (POST /platform/api/orgs/{slug}/apps): it dynamically registers a client at the IdP (RFC 7591) and records the org ↔ client_id binding in archenstack-rbac. The IdP owns the client; Archenstack owns the tenancy binding.
The binding half is native to the libraries — the library's own POST /orgs/{slug}/apps/ accepts either that org's own tenant admin or a platform principal, so a deployment that registers its OIDC clients some other way (the identity console, its own provider's dashboard, no IdP at all) records the org ↔ client_id link directly. Only the client-creation half needs a coordinator, and only because it writes to a second system.
Alongside label and redirect_uris, the request takes post_logout_redirect_uris (for RP-initiated logout) and a client_metadata map. That map is a vendor-neutral passthrough: its keys are merged into the RFC 7591 registration and forwarded verbatim, so an IdP-specific client setting — an MFA requirement, for instance — can be requested at registration without Archenstack having to model it. The structured fields win the merge, so client_metadata can only add keys, never redirect the client or widen its scopes.
Integration credentials (machine members)
An integration credential is the API key + secret a tenant hands to an external system that integrates with its app. It is not a separate concept — it is a non-human member of the org, role-controlled by the same access matrix as a person. Archenstack authorizes every principal by (org, sub) → role, so a machine is just another member; giving it roles, auditing it, and revoking it all reuse the member roster.
- Two kinds, one authorization. Members carry a
principal_kind:human(the default — invited/JIT, authenticates with password + MFA) orservice_account(an integration credential, created active with a client secret). Authorization is identical — only authentication differs, so aservice_accountis inherently exempt from MFA. - What it is internally. A
service_accountmember is the Archenstack projection of an OAuth2client_credentialsclient at the IdP, bound to exactly one org. Theclient_idis the API key; theclient_secretis the secret key (shown once). Minting is dual-authorized: a tenant admin (a token that administers the org) or a machine broker (theintegrations.managescope). The credential's token self-describes —sub=client_id,org= the tenant — so Archenstack authorizes it with no extra header. - In the UI. Created from the Archenstack web Members surface (a "service account" alongside people), with a create dialog that reveals the secret once and rotate / revoke controls; role assignment is the same matrix.
Trust boundary, fail-closed, anti-abuse
- The billing callback is the trust boundary. Archenstack never trusts a raw callback — the orchestrator authenticates it by the sending billing provider's own scheme (an HMAC signature over the raw body, or the URL secret for a billing provider that signs nothing), then authenticates to Archenstack and the IdP with its own machine credentials (client-credentials). Archenstack is out of billing and out of authentication entirely.
- Fail-closed / partial failure. Every org is created inactive and becomes active only after the matrix seed and the first-admin binding both succeed. A half-provisioned tenant stays inactive and denies at the resolver; the orchestrator returns a retryable error and the billing provider redelivers the (idempotent) callback. There is no window where an active org lacks an admin.
- Anti-abuse. Tenant creation is reachable only by a platform-scoped principal, never an ordinary user — the orchestrator's machine credentials here, or the
ARCHENSTACK_RBAC_PLATFORM_SUBJECTSallowlist in a standalone deployment. Provisioning fires only on a verified email + paid plan; a per-subject tenant quota and rate-limiting bound it.
See also
- Packaging a product for provisioning — the other half: what your image must carry for a machine to build the tenant's stack, and what your application offers its customer afterwards.
- Deployment modes — the standalone alternative to everything on this page: no IdP, no orchestrator, first admin at boot.
- Organizations (multi-tenancy) — the tenancy model.
- Wiring multi-tenancy — the per-backend resolvers, the org picker, and the assignment/member flow in the admin UI.
- Security — the fail-closed posture this extends.