Privilege elevation

Review sudo decisions for your servers and see why each attempt was allowed or denied.

Recorded decisions

Every time someone runs sudo on one of your servers through Alpacon, the decision is recorded here: in a web terminal, inside a command, or from a service token. Use this page to see who elevated, on which server and account, and what allowed it or stopped it.

How to get here

Open the sidebar and go to Audit → Events → Privilege elevation (or My events → Privilege elevation if you’re a regular user).

Granted and denied

The page has two tabs.

  • Granted holds every sudo the workspace decided on: ones that were allowed and used, ones still waiting for an approval or MFA, and ones that were rejected or expired. The Outcome column tells them apart.
  • Denied holds sudo requests that were refused outright, and requests turned down after they were asked: an approver’s rejection, a failed MFA verification, or a re-check when the approval landed. A request turned down after it was asked also appears in Granted as Rejected.

The selected tab stays in the page URL, so a link can open either one.

What’s in the list

Each row is one sudo, newest first.

ColumnWhat it shows
CommandThe command run with sudo
RequesterWho ran it, as an icon and a name. The icon shows the kind: a person’s avatar, a bot for an AI agent or an application’s service token, or a key for a personal API token. A sudo inside a command carries that command’s path and agent, so an agent working on a person’s account shows as an agent
ServerThe server it ran on
Run asThe account sudo switched to. Shows — when none was recorded
OutcomeOn Granted: where the decision is now, as a word. See What the outcome means
ReasonOn Denied, in place of the outcome: why it was refused. See Understanding a denial
RiskThe risk band assigned to the command, or Not analyzed
RequestedWhen it was requested (Refused on the denied tab). The header names the time zone. The only sortable column: click it to switch between newest and oldest first

On the denied tab, the same refusal repeated within one minute is folded into one row, with a count such as ×3 next to the time.

On a self-hosted deployment without AI analysis, the Risk column does not appear, the side panel leaves out the risk, and the filter bar has no Risk filter.

What the outcome means

  • Used: the sudo was allowed and ran.
  • Allowed: the sudo was allowed and can still be used.
  • Awaiting approval: an approver has not answered yet.
  • Awaiting MFA: the requester has not completed MFA yet.
  • Rejected: an approver rejected it, or it was turned down after it was asked. The denied tab has the reason.
  • Expired: it was allowed but not used before it expired.

Waiting outcomes are colored amber and rejections red. The rest are not colored.

Record details

Click a row to open the record in a side panel. The title is the command. The line under it repeats the outcome and the risk, and links to the work session the sudo ran in, or says Not run in a session. For a denied sudo, the outcome is a red Refused, and the session link reads “In a work session” without the session’s title.

For a granted sudo, the panel shows:

  • Requester, Server, Run as, and Signed in as (the server account the requester was signed in as, when recorded).
  • Path: Web terminal, Command, or Service token.
  • Allowed by: how the sudo was allowed. See What allowed it. A grant good for a single run adds one use.
  • Expires, once it was allowed: when the grant stops working, or No expiry.
  • A link to the command the sudo ran inside, where its output and how it ended are. A sudo typed in a web terminal has no such record; its output is in the session recording.
  • The rule that decided it, when one did.
  • Decision: each step with its time, from Requested to Allowed or Rejected, then Used or Expired. A step still to come shows what it waits for. The time of use is not recorded, so Used says Time not recorded.

For a denied sudo, the panel shows:

  • Reason: why it was refused and what to do next. See Understanding a denial.
  • The requester, server, run-as account, signed-in account, and path, as for a granted sudo. The path can also be Request, for a request refused before it reached a terminal or a command.
  • Stopped at: the check that refused it. See Where it was stopped.
  • Rule: the name of the policy that refused it, when one did.
  • Refused, and for a folded row, how many times it was refused and Last refused.
  • A note when the command was cut to the length the record keeps, a note that the output is in the session recording when the sudo was typed in a web terminal, and a link to the command it ran inside, if any.

There is no separate detail page. The panel stays in the page URL, so a link opens the list with that record’s panel already open.

What allowed it

Allowed by takes one of six values:

  • Direct permission: the user has standing privilege on the server (staff, superuser, or server manager).
  • Predefined policy: a sudo policy matched the user, server, and command.
  • Admin approval: an admin reviewed and approved a one-off request, or approved a held command whose line runs sudo; that approval covers the command’s own sudo.
  • Session-authorized sudo: a session-scoped policy where the session approval takes the place of MFA for sudo.
  • Low-risk command: the command’s assessed risk stayed under the workspace ceiling, so it was allowed automatically, with no person’s approval. This applies to a command from a person or an AI agent in a work session as well as to a service token. See Command patterns and sudo.
  • Advisory (not gated): the workspace’s execution control is set to Advisory, so risk did not decide this sudo. The command still had to clear the authority sudo requires; what the mode removed is the risk gate on top of it.

Where it was stopped

Stopped at names the check that refused a sudo: Work session, Risk, Identity check, Approval, Sudo policy, or Other for a refusal outside those checks.

Understanding a denial

The Reason column names why a sudo was refused. Open the row for the same reason with a suggested next step.

ReasonWhat to do next
Outside the work session’s scopeRequest a work session whose scope includes sudo, or check the session’s scope on its page.
Judged too riskyRunning it unchanged gives the same result. Review the command and its purpose with an administrator.
MFA verification too oldVerify again with your registered method, then run the command again.
MFA can’t be completed hereMFA for sudo can’t be completed on this deployment. Use a work session with a sudo policy that doesn’t ask for MFA.
No other approverAsk an administrator to add another approver or an auto-approve rule.
Already waiting for approvalWait for the answer in the terminal where the same command is already waiting.
Rejected after the requestCheck the approval request and discuss the work with your team before running it again.
No sudo accessAsk an administrator for sudo access. If an approval request was opened, its state is on the approvals screen.
Sudo with MFA is offAsk an administrator to turn on sudo with MFA for the workspace.
No one on record ran itRun the command from a session you signed in to, so it is on record as yours.
Policy needs MFA in a terminalRun the command in a terminal, where the MFA its policy asks for can be completed.
No sudo policy covers itAsk an administrator for a sudo policy that covers this command, server, and account.
Another person’s accountRun it as your own account. No rule or approval allows switching to another person’s account.
Target account unreadableName the account plainly and run it again, for example sudo -u deploy whoami.
No accountable userLink the server account to an Alpacon user, or run it in a work session assigned to a person.
Account bound to an applicationThe account belongs to an application. Send the command through the application’s service token, not from a terminal.
System user not foundCheck that the account exists on the server, then run the command again.
Session not foundOpen a new session and run the command again.
Command too long to recordShorten the command, or put it in a script and run that.

A reason the console does not recognize shows as its raw code, with no next step.

On Granted, the filter bar narrows the list by Server, Requester, Outcome, Risk, and Date. The + button adds Allowed by. The search box matches the command once you type at least three characters.

On Denied, the filter bar narrows the list by Server, Requester, Stopped at, Risk, and Date. The + button adds Path and Reason. There is no search box.

Each tab keeps its own filters, and they stay in the page URL, so you can share a filtered list as a link. Links from elsewhere in the console, such as the dashboard’s sudo summary, can open the list with extra filters already applied.

Who sees what

The page is open to all users, but the rows scope to your role.

Superusers see every record across the workspace.

Everyone else sees their own records, plus the records on servers they own or manage. Without workspace-wide sudo read, the page is named My privilege elevation.

On the Free plan, both tabs show only your own records from the last 7 days, for superusers too, and there is no requester filter.

On paid plans, both tabs reach back 120 days on Essentials and 365 days on Enterprise. That is how far the page looks, not how long the records are kept.

The narrowing is enforced server-side, and direct URLs follow the same rule.

How sudo gets recorded

There are three paths:

In a web terminal. A user runs sudo <command> in a Websh terminal. Alpacon checks standing permission first, then matching policies, then asks an admin for one-off approval. Whichever check allows or refuses it is recorded here. Its output is in the session recording.

Inside a command. A command sent through Alpacon (from the console, the CLI, MCP, or an API) runs sudo. The record links to that command, where its output and result are.

From a service token. A service token runs a command that needs sudo. Outside a work session there is nobody to answer an approval prompt, so the decision is made from the command’s assessed risk and recorded as Low-risk command, attributed to the application. A token command bound to a work session can instead be held for a person to approve, and that approval covers its sudo, recorded as Admin approval. See Command patterns and sudo.

A sudo inside a work session is checked against that session’s scope and policies too, and its record links back to the session.

  • Approval history: a sudo allowed by Admin approval links to an approval decision. The reviewer, the timing, and the justification live there.
  • Commands: a sudo inside a command links to it for the output and the result.
  • Sessions: a sudo inside a work session links back to that session.
  • Command patterns and sudo: how elevation is decided for a token, and what each denial code means.
Last updated: