Skip to main content

Vendor & support access during an incident

At 3am, someone from outside your normal on-call needs to act on a tenant. This page is the runbook for that, and the short version is: grant a bounded, time-limited platform grant from your identity provider — do not touch ARCHENSTACK_RBAC_PLATFORM_SUBJECTS.

The rest of this page explains why the obvious lever is the wrong one, because under pressure people reach for the thing labelled platform-subject.

Why not the platform-subject allowlist​

ARCHENSTACK_RBAC_PLATFORM_SUBJECTS exists for exactly one situation: a brand-new deployment with no identity provider yet asserting a platform scope, where somebody has to create the first organization. It is a bootstrap, not an access-management tool.

Three properties make it a poor fit for support access:

  • It is unconditionally unbounded. It grants authority over every tenant in the deployment, ignoring org bounds entirely. A vendor debugging one customer's matrix gets all of them. That is the opposite of what you want at the moment you are least able to reason about how far an incident grant reaches.
  • Arming it needs a restart. It is bound from configuration at startup, so the edit only takes effect on redeploy — during an incident.
  • It does not survive the outage you imagine it surviving. The allowlist is keyed on the caller's OIDC sub, which comes from a validated token. If your identity provider is down, nobody authenticates at all, so there is no sub to match and the allowlist grants nothing. See when the IdP is down.

Because it is so privileged, an armed allowlist now must carry a deadline:

ARCHENSTACK_RBAC_PLATFORM_SUBJECTS=sub-oncall-engineer
ARCHENSTACK_RBAC_PLATFORM_SUBJECTS_EXPIRES_AT=2026-07-22T18:00:00Z # ISO-8601 instant

Set the first without the second and the app refuses to boot. The deadline is checked per request, so the grant switches itself off when it elapses — with no restart, no ticket, and nobody remembering. Arming it takes a deploy; disarming it does not. An already-elapsed deadline is not a boot failure: a stale value degrades to less access, never a refusal to start during an incident.

The runbook​

1. Grant, at the identity provider​

Give the support subject the platform scope your deployment reads, plus a governs_orgs claim naming only the tenant they need — or the parent it sits under, which covers its whole subtree:

{
"sub": "vendor-support-4471",
"scope": "rbac.platform",
"governs_orgs": ["acme-group"]
}

Prefer a dedicated support account over adding claims to a personal one, so the grant can be revoked without touching anyone's day-to-day access, and so the audit trail names the engagement rather than a colleague.

2. They act​

Nothing to restart. Archenstack reads the claim per request, so the grant is live on the next call and constrained to the subtree you named. Every control-plane action they take is recorded with their subject in the platform audit trail.

3. Revoke, and verify​

Remove the claim at the identity provider. The next request resolves no platform authority — revocation takes effect immediately rather than at token expiry, because the grant is re-read per request rather than cached.

Then read back what was done:

curl -s "$BASE/permissions/audit/" -H "Authorization: Bearer $ADMIN_TOKEN"

Every entry carries actor_sub, so a vendor's actions are attributable even though they never had an account in your user table.

Time-bounding the grant itself​

Removing a claim is a step someone has to remember, and at the end of an incident nobody is thinking about cleanup. Two places can end the grant for you; use whichever fits your deployment.

At the issuer (preferred)​

If your identity provider can attach an end date to the grant, that is the single source of truth and every relying party inherits it. Archenstack IdP stores one on the governance row, and a grant past its deadline simply stops appearing in governs_orgs — no sweep job, no cleanup step that can be skipped:

INSERT INTO org_governors (username, org_id, expires_at)
SELECT 'vendor-support-4471', id, now() + interval '8 hours'
FROM organizations WHERE slug = 'acme-group';

The row is deliberately left in place once it expires: it is the record of who was granted what, and until when.

In your resolver (works with any identity provider — or none)​

Archenstack does not require an identity provider, and does not enforce a grant expiry itself — the expiry belongs to the system that issues the grant. What it gives you is the extension point: your resolver returns the grant, so it can also decide when to stop returning it. Read the deadline from wherever you keep it (a claim, a row, a config value):

# settings.py → ARCHENSTACK_RBAC["SCOPE_PLATFORM_RESOLVER"]
from datetime import datetime, timezone

def resolve_platform(request):
grant = load_grant(request.user) # yours: claim, DB row, config…
if grant is None:
return False # no authority
if grant.expires_at and grant.expires_at <= datetime.now(timezone.utc):
return False # past the deadline ⇒ no authority
return grant.org_slugs # bounded; or True for unbounded

Because the resolver runs per request, the grant stops at its deadline with no restart and no cache to invalidate.

Three ways this goes wrong

These are the mistakes worth designing against, and each one fails open:

  • A past deadline must deny, not fall through. Returning the grant anyway — or letting an exception escape into a try/except that yields the old value — turns an expired grant into a live one.
  • A malformed deadline must fail loudly, never be read as "no deadline". Silently treating an unparseable value as "never expires" recreates the permanent grant you were trying to avoid.
  • A naive timestamp must be read as UTC, not the server's local time. A deployment in UTC+13 otherwise grants thirteen extra hours of platform access.

The platform-subject allowlist's own deadline (ARCHENSTACK_RBAC_PLATFORM_SUBJECTS_EXPIRES_AT) follows exactly these rules; match them.

Why the bounded grant is strictly better​

Platform-subject allowlistBounded IdP grant
ScopeEvery tenant, alwaysExactly the subtree you name
Takes effectRestartNext request
Revoked byRedeployRemoving a claim
ExpiresAt its configured deadlineWhen you revoke, or when the IdP expires it
Auditedactor_subactor_sub

The bounded grant wins on every row except the one the allowlist exists for: a deployment with no IdP asserting anything yet.

When the identity provider is down​

Be clear-eyed about this: if your IdP cannot issue tokens, Archenstack authenticates nobody. Every route denies, including the control plane, and the platform-subject allowlist does not help because it still needs a validated sub.

That is a deliberate consequence of Archenstack never validating tokens itself and never holding credentials — the property that keeps it out of the authentication business. The trade is real, and the mitigation is not in Archenstack:

  • treat identity-provider availability as a dependency of your control plane, and give it the redundancy you would give a database;
  • keep the matrix serving reads during an IdP outage where your own gateway can still authenticate (Archenstack resolves against whatever principal your host supplies — it does not require that principal to come from any particular issuer);
  • do not plan to make configuration changes during an identity outage, because the path to doing so does not exist.

If you need a genuinely IdP-independent path for a platform admin, that is a host-side decision — a separate admin surface with its own authentication, calling Archenstack with a machine credential — and it should be designed deliberately rather than discovered at 3am.

See also​

  • Hierarchical organizations — how a governs_orgs bound expands over the tenant tree.
  • Deployment modes — where the platform-subject allowlist legitimately belongs.
  • Security — the threat model, including why a membership-derived bound cannot bound provisioning.