# Platform administration (/docs/self-host/platform-admin)



The **platform administration** area is the cross-tenant view of the installation, for the people
who run it: support, audit and operations. It is deliberately separate from workspace and project
access — a platform administrator reaches `/admin` without being a member of anyone's workspace,
and a workspace owner sees nothing of it.

Open it from the **Administration** group in the console sidebar. The HTTP surface is
`/api/v1/admin`, documented with the rest of the API at `/api/v1/docs`.

## The platform role [#the-platform-role]

Every account carries a platform role, above the workspace and project roles:

| Role      | What it may do                                                                                                |
| --------- | ------------------------------------------------------------------------------------------------------------- |
| `USER`    | Nothing in `/admin`. The default for everyone.                                                                |
| `SUPPORT` | Read the directory, workspaces, projects, executions and audit, and force a sign-out. Cannot change accounts. |
| `ADMIN`   | Everything, including changing roles, suspending accounts and resetting two-factor authentication.            |

The role is stored on the user row and resolved to a set of **platform permissions**
(`platform.overview.read`, `user.read`, `user.manage`, `session.revoke`, `platform.workspace.read`,
`platform.workspace.manage`, `platform.project.read`, `platform.project.manage`, `execution.read.all`,
`audit.read.all`, plus the `platform.*` read/manage pairs for observability, logs, workers, outbox,
jobs, catalog, announcements, invitations, config and limits); `SUPPORT` holds the read ones, `ADMIN`
all. Role bundles live in `@decision-control/core`, next to the
project permissions. `/auth/me` returns `user.platform_role` so the console only offers the area to
people who can use it.

### How it is checked [#how-it-is-checked]

<Diagram node="platform-check" kind="example" />

* **Who can reach `/admin`?** Only a signed-in session whose platform role holds at least one
  platform permission. API keys are refused, and a plain `USER` gets `403` on every route.
* **Where does the role come from?** The row on the user, except that an address matched by the
  bootstrap rule is always `ADMIN`.
* **Does an administrator see tenant data?** No. Platform permissions open the installation-wide
  views (directory, audit, executions for support); they grant nothing inside any workspace or
  project, which are still checked by membership.
* **Can a workspace owner use it?** No. The platform role is independent of workspace and project
  roles; see [Permissions](/docs/reference/permissions) for how the three levels fit.

### Bootstrapping the first administrator [#bootstrapping-the-first-administrator]

A fresh installation has no administrator and no seed in production. Set
`PLATFORM_ADMIN_DOMAIN` (default `decisioncontrol.io`): an address at that domain always holds the
`ADMIN` role, so whoever signs up with it reaches `/admin` and can promote others from there.
`PLATFORM_ADMIN_EMAILS` lists extra addresses (comma separated). Empty `PLATFORM_ADMIN_DOMAIN`
disables the rule.

## What the panel shows [#what-the-panel-shows]

* **Overview** — account, workspace, project, decision and execution counts; execution traffic
  from the rollups; sign-ins and failed sign-ins from the audit log; the busiest workspaces; and a
  “needs attention” list of suspended accounts and repeated failed sign-ins.
* **Users** — the whole directory, searchable and filterable by role and status, with each
  account's workspaces, projects and live sessions. This is where support acts.
* **Workspaces** — every tenant with its owner, member and project counts — archived and
  soft-deleted ones included, flagged. Opening one shows tabs for its summary, members (with SCIM
  state), roles, invitations, SSO, SCIM, HTTP log settings and security — metadata only, never
  secrets. `ADMIN` can also archive or restore it, require two-factor, lift an enforced SSO lock
  during an identity-provider outage and revoke a SCIM token; each is audited.
* **Projects** — every project across every workspace, archived and soft-deleted ones included,
  with the 24-hour execution volume and failure rate. Opening one shows tabs for its summary,
  members (role, custom role and source), per-decision access grants, invitations, governance
  (publish approval, retention and publish requests), environments, API keys (prefix, scopes,
  CIDRs), connections and credentials, webhooks, catalog counts, scheduled jobs, public forms and
  cases — metadata only, never a secret. `ADMIN` can also archive or restore it, drop the publish
  approval, revoke an API key and deactivate a public form; each is audited.
* **Platform audit** — every audit line from every workspace, plus the platform-level ones.
* **Executions** — the execution trail across tenants, for support.
* **Usage limits** — platform quotas on `execute`, `ingest`, `simulate` and `backtest` per minute,
  hour, day or month, for the whole installation, the default of a scope (workspace, project, API
  key or person) or one subject. `ENFORCE` answers `QUOTA_EXCEEDED` (429) past the cap; `WARN`
  only counts and flags it; a max of `0` pauses the subject, and an expiry makes a temporary
  throttle. A subject's effective limits and spend are explained next to it. Changes reach every
  process within seconds and are audited with a reason (`platform.limits.manage`).
* **Runtime settings** — the effective operational configuration (retention, execution, rate
  limits, sessions, registration, observability, alerts), with secrets shown only as booleans. An
  administrator can override an editable key for every process, within its bounds, or reset it to
  the environment value; each change is audited with a reason (`platform.config.manage`). The
  [environment variables](/docs/self-host/configuration) remain the defaults.
* **Announcements and maintenance** — platform-wide notices (`INFO`, `WARNING`, `CRITICAL`, with an
  optional start and end) and a maintenance state with its window and message.
* **Background work** — the outbox and webhook deliveries across tenants (retry, cancel), scheduled
  jobs (pause, resume, run now, cancel a run), and the system status: database and Redis health,
  rollup lag and every live API replica or worker. Each process refreshes a **heartbeat** row
  every `HEARTBEAT_INTERVAL_MS` (15 s), with its role, version, draining flag and outbound
  breakers; a stale one is a process that stopped.
* **Email logs** — recent email sends with recipient, subject, transport and outcome, never the body.
* **Personal data deletion requests** — data-subject erasure requests with their status, requester
  and executor. An administrator reviews one, then executes it (the content is erased, the rows and
  their place in the audit chain stay) or cancels it; both are audited (`platform.project.manage`).
* **HTTP logs** — every workspace's captured requests, with stats, filters, export and an archive,
  plus the platform retention and archive settings. This is the global view; workspaces only see
  their own logs.

## Suspending an account [#suspending-an-account]

Suspending (**ban**) is a global block: sign-in is refused everywhere — before email verification
is even checked — and every session of the account ends at once, so a live cookie stops working.
It is reversible, the row is kept, and the reason and optional expiry are recorded. A suspension
with a past `until` lapses by itself. Memberships are left untouched: lifting the suspension
restores access exactly as it was.

## Auditing [#auditing]

Every platform action — a role change, a suspension, a sign-out, a two-factor reset — is written to
the audit log with the acting administrator, the target and the reason, so the platform audit page
is the record of who did what to whom.
