---
title: "Platform operators"
description: "The operator console of a standalone NHI Security deployment: the first operator, provisioning and suspending organizations, and the platform audit."
keywords: ["platform operator", "operator console", "provision organization", "suspend organization", "bootstrap", "first administrator", "platform audit", "standalone deployment"]
---

A **platform operator** runs a standalone NHI Security deployment. An operator creates organizations, suspends them and reads a deployment-level audit stream. An operator is not a member of any organization and cannot open one.

<Warning>
**The operator console exists only in a standalone deployment** (`AUTH_MODE=local`). Inside TRUSTIVAN (`AUTH_MODE=trustivan`) the console pages under `/nhi/platform` answer not found and every route under `/api/v1/platform` answers `404`, whatever the request carries. There your organization is created the first time one of its members opens NHI Security, and nobody provisions it. If you use NHI Security at `app.trustivan.com`, nothing on this page applies to you.
</Warning>

## Who an operator is

| | Organization user | Platform operator |
|---|---|---|
| Signs in at | `/nhi/sign-in`, with an organization identifier | `/nhi/platform/sign-in`, with email and password only |
| Session cookie | `ags_session` | `ags_platform_session` |
| Authority | Roles and permissions inside one organization. See [Administration](/nhi-security/administration) | Named capabilities across the deployment |
| Session limits | Set per organization: 30 minutes idle and 12 hours by default | Fixed in code: 15 minutes idle, 4 hours in total |
| Lockout | Set per organization: 10 failed sign-ins, 15 minutes by default | Fixed in code: 5 failed sign-ins, 30 minutes |

The two are stored in separate tables and reached through separate database roles. A browser can hold both sessions at once, and neither stands in for the other.

Ten capabilities are defined, and the first operator holds all of them. Routes check five:

| Capability | What it allows |
|---|---|
| `platform:health` | Reading your own operator session and signing out |
| `tenant:provision` | Listing organizations and provisioning one |
| `tenant:suspend` | Changing an organization's state |
| `platform:audit_read` | Reading the platform audit stream |
| `platform:branding` | Changing the deployment's brand |

The other five (`tenant:delete`, `platform:configure`, `platform:licensing`, `platform:feature_flags` and `platform:support_impersonate`) are names only. No route checks them, so none of what they describe exists.

## Create the first operator

A fresh deployment has no accounts. One command creates the first operator, and it works once.

<Steps>
  <Step title="Run the bootstrap">
    From the `nhi/` directory of the deployment's checkout, with your own email and name:

    ```bash
    make bootstrap-admin EMAIL=ops@acme.example NAME="Platform Operator"
    ```

    On Kubernetes, use `make k8s-bootstrap-admin` with the same two arguments. Both run `node packages/db/dist/bootstrap/run.js <email> "<display name>"` in the `migrate` service, because that service holds the database owner connection and the application's own database role cannot write operator tables. See [Deploy NHI Security](/nhi-security/deploy).
  </Step>
  <Step title="Capture the password">
    The command generates a password, prints it once and stores only its verifier. Put it in a password manager before you close the terminal. It never accepts a password as an argument.
  </Step>
  <Step title="Sign in">
    Open `https://<your host>/nhi/platform`. You are sent to the operator sign-in page.
  </Step>
</Steps>

The command refuses to run while any operator exists. It creates no organization and no other data.

Three limits follow from what ships today:

- **There is no route to create a second operator.** The command's refusal message points you to the operator console for that, and the console has no such screen.
- **There is no route to change an operator's password.** The command's output tells you to change it after signing in, and nothing lets you. The generated password is the password.
- **A lost password has no recovery flow.** The supported way out is to remove the unused operator row as the database owner and run the bootstrap again. Do that only for an operator who has never acted, because platform audit records keep pointing at the operator who wrote them.

## Provision an organization

<Steps>
  <Step title="Open the form">
    On **Tenants & Organizations**, select **Provision Organization**.
  </Step>
  <Step title="Fill it in">
    | Field in the console | API field | Rules |
    |---|---|---|
    | Organization Legal / Company Name | `organizationName` | Required, up to 200 characters |
    | Organization Identifier (Slug) | `slug` | Required, 1 to 63 characters: lowercase letters, digits and hyphens, starting and ending with a letter or digit. People type it at sign-in. No route changes it afterwards |
    | Tenant Environment Name | `name` | Required by the API, up to 200 characters. The console fills in `<organization name> Primary` when you leave it empty |
    | First Administrator Email | `firstAdministratorEmail` | Required |
    | Mark as Demonstration Tenant | `isDemoTenant` | Optional, `false` by default. Marks the organization as holding demonstration fixtures, and its **Settings** screen says so |
  </Step>
  <Step title="Deliver the invitation link">
    The console shows the first administrator's invitation link once. **NHI Security sends no email**, whatever the form's hint says. Copy the link and deliver it yourself.

    The link the console shows carries only the token. The acceptance page also needs the organization identifier and reports "This link is incomplete" without it, so add `&org=<slug>` to the end before you send it.
  </Step>
</Steps>

The same request over the API:

```http
POST /api/v1/platform/tenants
Content-Type: application/json

{
  "organizationName": "Acme Corporation",
  "slug": "acme",
  "name": "Acme Primary",
  "firstAdministratorEmail": "admin@acme.example"
}
```

The answer carries the new `tenant`, the `firstAdministratorEmail` and an `invitationToken`, returned this once. A `slug` that is already taken answers `409`.

Provisioning creates the organization with its default security settings and an `invited` account for that address, with an invitation for the Organization Admin role. The invitation works once and expires after seven days. No password is set by anyone but the invitee. From there the organization runs itself: see [Administration](/nhi-security/administration).

<Note>
Whoever holds the invitation link can become that organization's first administrator. Send it only to its recipient. If it is lost or expires before it is used, nothing in the operator console issues another, and the organization has no administrator who could.
</Note>

## Organization states

**Tenants & Organizations** lists each organization with its identifier, whether it is marked demonstration or production, how many accounts it has, its state and its creation date. The screen shows the first 100; `GET /api/v1/platform/tenants` takes `limit` (up to 100) and `offset`.

| State | Meaning |
|---|---|
| `provisioning` | Created, contents not finished. Nobody can sign in. An organization left here means provisioning failed part-way |
| `active` | In use |
| `suspended` | Stopped by an operator |
| `decommissioned` | Closed. Its records stay |

**Suspend** and **Reinstate** on a row call `PATCH /api/v1/platform/tenants/{tenantId}/state` with `{"state": "suspended"}` or `{"state": "active"}`. Decommissioning has no console control: send `{"state": "decommissioned"}`.

In any state other than `active`:

- Nobody in the organization can sign in, and every existing session is refused on its next request. Sessions are not revoked one by one; the state is checked every time.
- Invitations to it cannot be accepted.
- Scheduled synchronization skips it, so NHI Security stops reaching into that organization's connected environments on a timer.
- Its agents stop too. A runtime credential that belongs to it is refused with `401`, exactly as an expired or revoked one is.

What a state change does not do:

- **It deletes nothing.** No route deletes an organization or its data, and `decommissioned` removes no records.
- **`decommissioned` is not final.** The route accepts any of the three states from any state, so a decommissioned organization can be set back to `active`.
- **It does not revoke runtime credentials.** It refuses them. While an organization is in any state other than `active`, every runtime credential it holds answers `401` at the [runtime gate](/nhi-security/runtime-gate), on the next request. Nothing is revoked, so setting the organization back to `active` restores exactly the credentials it had. To stop an organization's agents and keep a decision record of what each one tried, use the kill switch instead: a refused credential leaves no decision record.

## Change the brand

**Branding** in the operator console changes what every organization in the deployment sees: the product and company name, a support address, the logo, a logo for dark mode, the browser tab icon, both colour palettes, the corner radius and the fonts. There is one brand per deployment. Organizations cannot have their own, and no organization role can change it.

Saving calls `PUT /api/v1/platform/branding` (`platform:branding`). Read the current brand from `GET /api/v1/branding/current`, which needs no session because the sign-in page uses it.

- **Every colour is checked before it is stored.** A colour is `#rgb`, `#rrggbb`, `rgb()`, `hsl()` or `oklch()` of plain numbers. Named colours, `var()`, `calc()` and `url()` are refused, and so is anything that could end the stylesheet rule. The corner radius is one length, and a font is a list of family names. A refusal answers `422` and names the value, for example `brand theme light.accent is not a valid colour`.
- **An image is stored inline or served by you.** It is a base64 `data:image` URI (PNG, JPEG, GIF, WebP or SVG) of at most 24 kB, which is about 18 kB of image, or a path on the console's own origin such as `/brand/logo.svg`. An address on another site is refused: the console would not load it, and a logo fetched from elsewhere reports every page view to whoever hosts it.
- **The dark-mode logo is shown in the dark theme.** The console's side rail, the sign-in page and the operator header show the logo for dark mode when the reader chose the dark theme, and the logo otherwise. Without a logo for dark mode, the logo is shown in both themes, so a logo drawn in a dark ink needs one.
- **Both palettes are always saved whole.** Ten colours each, light and dark.
- **The change is audited** as `brand.updated` in the platform audit stream, with the names of the fields that changed.
- **A running console shows a saved brand within 30 seconds.** The settings screen shows it at once.

NHI Security checks that each value is a colour. It does not check that the palette is readable: choose text and background colours with enough contrast.

<Note>
Inside TRUSTIVAN the operator console does not exist, so there is no brand screen there. The NHI Security brand in a merged deployment is the row the database migrations set.
</Note>

## The platform audit stream

**Platform Audit Stream** (`GET /api/v1/platform/audit`, `limit` and `offset`) lists operator activity newest first: timestamp, action, capability, result, affected organization, source address and detail. The screen shows the newest 100.

It records `platform.signed_in`, `platform.sign_in_failed`, `platform.signed_out`, `tenant.provisioned`, `tenant.state_changed`, `brand.updated`, and `authz.denied` when an operator calls a route without its capability.

It is a separate stream from every organization's [audit trail](/nhi-security/governance-and-audit). No organization role can read it, and operators cannot read an organization's trail. The database refuses updates to it, and refuses deletes outside a declared retention operation that nothing in the product performs. The operator database role holds only read and insert on the table. No route verifies its hash chain or exports it; the integrity check and evidence export in the console cover an organization's trail only.

## What an operator cannot do

- **Read or change anything inside an organization.** Every organization route requires an organization session, and an operator session never satisfies one. The operator database role has no privilege on the tables that hold identities, credentials, findings, connectors or users. The account count on the list comes from one function that returns a number.
- **Sign in as a customer.** There is no impersonation. **Sign In** on a row opens the ordinary sign-in page in a new tab.
- **Set or reset anyone's password**, or invite a second administrator into an organization.
- **Change feature flags or licensing.** No route exists for either.
- **Delete an organization.**

## Where to go next

<Columns cols={2}>
  <Card title="Deploy NHI Security" icon="server" href="/nhi-security/deploy">
    Stand up a standalone deployment before you bootstrap an operator.
  </Card>
  <Card title="Configuration" icon="sliders-horizontal" href="/nhi-security/configuration">
    `AUTH_MODE` and the other environment variables.
  </Card>
  <Card title="Administration" icon="user-cog" href="/nhi-security/administration">
    What the first administrator does after accepting the invitation.
  </Card>
  <Card title="Limitations" icon="triangle-alert" href="/nhi-security/limitations">
    What NHI Security does not do yet.
  </Card>
</Columns>
