The staff console is how the people who run a TRUSTIVAN deployment act on the organizations in it: assign a plan, grant an entitlement exception, suspend an organization or a person, end someone’s sessions, and look inside a customer organization when that customer has consented. It is a separate identity plane. A staff member is not a user, belongs to no organization, signs in at a different page with a different cookie, and resolves to a different kind of principal. No customer credential reaches a staff route, and no staff credential satisfies a customer route. For what a customer sees of all this, and how they grant or revoke consent, see Support access.

Off until you create an account

A new deployment has no staff accounts. The routes exist, and nothing can sign in to them. The console starts existing, in any useful sense, when you run staffctl bootstrap. If you operate a single organization for yourself, you may never need it. You need it when you run TRUSTIVAN for other people: several customer organizations, plans assigned by contract, and support requests.

Enable it

1

Restrict where the console is reachable

Do this first. See the next section.
2

Create the first administrator

The command prints a generated password once. It cannot be recovered afterwards, only replaced with staffctl reset.
3

Sign in and enrol a second factor

Open /staff/login on the dashboard’s origin and sign in with the printed password. The first sign-in shows a TOTP secret to add to an authenticator app, then asks for a code from it. No session is issued until that code verifies.
4

Create the accounts people will actually use

As the administrator, create one account per person with the least role that does their job, on the Staff tab. Each password is generated and shown once. Keep at least two platform_admin accounts.

Restrict where the console is reachable

The console is denied by default. Until STAFF_ALLOWED_CIDRS lists at least one address the staff API refuses every request, sign-in included, and the API logs that the console is disabled when it starts. To open the console to every network, set the single value any:
The API logs a warning at every start while any (or a /0 prefix, which means the same thing) is set. Use it only where another control already bounds who can reach the API.
Upgrading from a release where empty meant “anywhere”? If you have a staff account and never set STAFF_ALLOWED_CIDRS, set it before you deploy this release. Otherwise the console answers 404 to your own operators after the restart.
The restriction covers the whole staff API, the sign-in routes included. A request from any other address is answered 404, the same as a route that does not exist, so an outside address learns nothing about whether the console is there. Three things to get right:
  • Set TRUSTED_PROXIES too. The address checked is the client address the API resolves. Behind a reverse proxy that is the proxy’s own address unless the proxy is listed in TRUSTED_PROXIES, and then every request either passes or fails together. See Environment variables.
  • An invalid entry stops the API from starting. A value that is neither an IP address nor a CIDR is a startup error naming the entry, so a typo cannot silently open the console or lock your support team out mid-incident.
  • It filters the API, not the page. The dashboard still serves the /staff/login page to anyone who can load the dashboard. What an outside address cannot do is submit it.
Empty is the right value for a deployment with no staff accounts. Set it before you run bootstrap, not after.

Roles

Three roles. Each is a fixed list of capabilities, not a rank. support_viewer holds only capabilities that read; platform_admin holds every capability. Anything not in a role’s list is refused with 403 and recorded as staff.denied. GET /api/v1/staff/me returns the signed-in account’s capabilities, and the console hides what a role cannot do.

What the console covers

The dashboard’s console is four pages: /staff/login, the home page at /staff, one page per organization at /staff/organizations/{id} and one per person at /staff/users/{id}. The home page opens with the platform overview (organizations, people, live sessions, scans per day, failed and queued scans, Ask AI tokens this month, and the API’s database and cache health), then tabs for Customers, People, Trials, API keys, Usage, Settings, Staff and Audit log, each shown only to a role that can use it. Everything the staff API offers has a screen.

What staff can do

Every action that changes something requires a reason. A request without one is refused with 400, and the reason is written into the audit trail beside the action.

Find a customer

Search organizations or people by name or email. A search returns 25 results by default and at most 100. An organization’s page shows its commercial position and nothing else: plan, subscription status, trial and renewal dates, seats, asset count, open-finding count, scans in the last 30 days, failed scans in the last 7, the time of the last scan, the number of API keys, and any entitlement overrides in force. It does not show a finding, a secret, a credential, a policy, or anything a scan read. Viewing the page is itself recorded.

Add a customer

Add customer on the console’s home page takes the organization name, the owner’s email and a reason. It creates the organization on Free and the owner’s account, and shows the owner’s password once: it is not stored in a readable form and cannot be shown again. An address that already has an account is refused rather than made the owner of a second organization. Only a platform_admin can do this, because it creates an owner and a credential. The audit record is written first: if it cannot be written, nothing is created. The organization’s slug comes from its name. NHI Security copies the slug on the owner’s first visit and keeps it.

Run a trial

A customer’s page has a Trial card: pick pro or enterprise and an end date, at most a year away. The customer has that plan until the end of that day (UTC), and is on Free from then on, with nothing having to run. Their data stays. The customer’s owners are mailed three days before the end and again in its last 24 hours, once each, if this deployment has mail. A new end date means new notices. Staff are not mailed: the Trials tab is where staff see what is ending. Changing the date on the same card extends a running trial. End trial now moves the customer to Free. To keep them, assign the plan. The Trials tab on the home page lists every trial, soonest end first. An ended trial stays listed until somebody assigns a plan, so the decision is not lost. The console sends no notification when a trial ends. On a deployment that sells through Stripe, a trial started here is replaced by what the provider next reports for an organization that has a Stripe subscription, as an assigned plan is.

Assign a plan

Set an organization to free, pro or enterprise. The subscription becomes active on that plan immediately. This is how plans are assigned on a deployment without a payment provider configured, which is the default: see Billing provider. On a deployment that sells through Stripe, the provider’s webhooks and the hourly reconciliation write through the same path. For an organization that also has a Stripe subscription, the provider’s next report replaces what you assigned.

Grant an entitlement override

An override is a per-organization exception to its plan: one limit raised or lowered, or one feature switched on or off, with an optional expiry. Name exactly one of the two. A key the product does not have is refused with 400. On the customer’s page, Features shows a switch for each feature as it stands for them, and Entitlement overrides offers the limits by name. Withdraw on an override puts the customer back on what their plan gives. Through the API, that is granting it again with an expiry in the past. Overrides are superseded rather than edited, so the table reads as a history of what was granted and when it stopped. There is no customer-facing route that grants one. See Billing and plans for what each limit and feature means.

Invite somebody into an organization

Invite someone on a customer’s page takes an email address, a role and a reason. It offers admin, member or viewer, because no invitation can confer owner. It uses a seat like any other invitation, and an address that is already a member is refused. The link is shown once, with wording to send alongside it, and is mailed as well if this deployment can send mail. The customer sees the invitation in their member list and in their audit log, with the reason. A staff member never becomes a member of the organization. The invitation is issued on the authority of its longest-serving owner, so it stops working if that person stops being able to grant the role.

Suspend an organization

Suspension refuses every way into the organization at once: member sessions, API keys and workload credentials all stop authenticating. Nothing is deleted, and restoring the organization brings everything back as it was.

Reset a person’s password

Reset password on the People tab gives a one-time link that lasts 24 hours and is also mailed if this deployment can send mail. Whoever opens it chooses the new password, so nobody at your company learns it, and any second factor on the account still applies. Using it ends every session the account has. It is refused for a suspended or deleted account, and for one whose organization requires single sign-on. Only a platform_admin can do this, and it appears in the customer’s audit log with the reason.

Suspend a person or end their sessions

Suspending a person disables their account in every organization they belong to and revokes their sessions immediately. Ending their sessions without suspending them is the separate “they lost their laptop” action: they sign in again normally. Both are on the People tab.

Change a person’s role or reset their second factor

On a person’s page a platform_admin can change their role in any organization they belong to, to admin, member or viewer. Owner is never offered and an owner’s role cannot be changed: ownership moves only between the customer’s own people. Reset two-factor removes their authenticator and recovery codes and signs them out everywhere; they enrol again at their next sign-in, or are made to if their organization requires a second factor. Confirm who is asking before you do it: the reason field is where you say how. Resend verification mails a fresh link to the person; you never see it. Each lands in the customer’s audit log.

Revoke an API key

The API keys tab lists every customer’s keys by prefix, name, creator and last use, searchable by any of them or by organization name. It never shows a secret or a hash: nobody holds the secret after the key is created. Revoke takes a reason and stops the key on its next request, CI jobs and MCP clients included. The request names the key’s organization and runs inside it, so a key from another customer matches nothing. A revoke goes ahead even if the staff trail cannot be written, like a suspension. A key’s scopes are also capped by its creator’s current role: demote the person who made it and their keys lose what the new role does not include.

Read usage

The Usage tab shows, for one calendar month (UTC), each customer’s scans started, findings first seen, Ask AI tokens and seats now. Export CSV downloads the same rows, with any cell a spreadsheet would run as a formula prefixed with an apostrophe. Ask AI tokens are kept for the current month only: an earlier month shows “Not kept”, and the CSV leaves the cell empty. ASSISTANT_MONTHLY_TOKENS is the per-organization monthly budget. 0 turns Ask AI off for every organization; -1 is no limit.

Announcement and maintenance mode

The Settings tab holds the announcement and maintenance mode. They are fixed, typed fields, so no secret can be stored there. Deployment settings that include secrets (mail relay, Stripe, the Anthropic key, backups) are on the separate platform setup page, platform admins only:
  • Announcement, up to 500 characters, as information or a warning, shown at the top of every customer page and the console.
  • Maintenance mode. Every customer write (POST, PUT, PATCH, DELETE) is refused with 503, code unavailable, Retry-After: 300 and your maintenance message. Reads, sign-in and sign-out, and this console keep working. Pipelines that start scans fail while it is on.
Saving needs settings:manage and a reason. Each API replica picks a change up within 10 seconds. GET /api/v1/platform/notice returns both, without signing in, for anything that wants to show the banner.

Open a support session

A support session is a read-only view inside one customer organization: its members and their roles, its assets, and the status of its scans, including a failed scan’s error. It shows no finding content and no secret. It needs the customer’s consent. An owner of the organization grants a time-boxed window, from 1 to 168 hours, in their own settings. Only then can a support_engineer or platform_admin open a session, naming a reason. The session:
  • ends after 60 minutes or when the customer’s window closes, whichever is first;
  • is checked against the live consent on every request, so revoking consent ends it on the next one;
  • reads inside a READ ONLY database transaction, so the database refuses a write rather than the application remembering not to make one.
An attempt with no consent in place is refused with 403 and recorded.

Manage staff accounts

A platform_admin adds accounts, changes their role, suspends or restores them and resets their passwords on the Staff tab. Through the API: role is one of support_viewer, support_engineer or platform_admin. Nobody chooses a staff password. Changing a role, suspending an account or resetting its password ends that account’s sessions, so the change applies to the next request. A password reset leaves the second factor as it is. Each of these is written to the staff trail. A second platform_admin. Add one on the Staff tab with the role Platform admin. Give them the generated password over a channel you would use for any credential; they sign in at /staff/login from an allowed address and enrol their authenticator before their first session exists. You cannot do any of these to your own account, so the last platform_admin cannot lock everybody out. Keep at least two: another admin can reset a lost password or second factor in the console. With only one, a lost password needs staffctl reset on the host, and a lost second factor a change to the database.

Sign-in rules

What the sign-in page says when it refuses: The lockout is per account. The per-address limiter that covers every sign-in endpoint applies as well.

The two audit trails

Every staff action is recorded twice. The staff trail is the deployment’s own record, readable by any role through GET /api/v1/staff/audit with the query parameters staff_id, organization_id, user_id, action, since, until (RFC 3339 or YYYY-MM-DD, until exclusive), limit and offset, and as CSV through GET /api/v1/staff/audit/export with the same filters (at most 10,000 rows; the X-Truncated header says when more matched). An export is itself recorded. Reads are recorded too. Opening an organization, a person, the API key list or the usage is written to the staff trail before the answer is returned, and refused with 503 (audit_unavailable) if it cannot be. Actions that grant something are refused the same way; actions that take access away (suspend, sign out, revoke a key) go ahead. It is append-only, enforced by a database trigger that binds the schema owner as well, and each entry carries the hash of the one before it. To check the chain, as the schema owner:
It returns ok, the number of rows checked, and the sequence number of the first broken row if there is one. The customer’s trail receives a copy of every action taken against their organization, attributed to an actor of kind staff. A customer can see what your staff did without asking you. Deleting an organization does not remove the staff trail’s record of what was done to it.

What the console does not do

  • No impersonation. Staff cannot act as a customer’s user, and cannot write anything inside an organization. A change a customer needs is made by the customer.
  • No finding or secret content, with or without consent.
  • No staff single sign-on and no staff API key. Every staff action is a person’s, behind a password, a second factor and a session that expires.
  • No secrets in settings. Runtime settings are an announcement and maintenance mode. Keys, provider credentials and mail settings stay in the deployment’s environment.
  • No notification when a trial ends. The Trials tab is the prompt.

API surface

The console is a client of these routes. All are under /api/v1/staff, all except the two sign-in routes need a staff session, and each is in the API reference. GET /api/v1/platform/notice is outside the staff group and needs no session.
  • staffctl: the host command behind steps 2 and password recovery.
  • Support access: the customer’s view of consent and the audit trail.
  • Sign-up and sign-in: closing open sign-up, which is when staffctl org create becomes necessary.