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.
| Column | What it shows |
|---|---|
| Command | The command run with sudo |
| Requester | Who 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 |
| Server | The server it ran on |
| Run as | The account sudo switched to. Shows — when none was recorded |
| Outcome | On Granted: where the decision is now, as a word. See What the outcome means |
| Reason | On Denied, in place of the outcome: why it was refused. See Understanding a denial |
| Risk | The risk band assigned to the command, or Not analyzed |
| Requested | When 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 ownsudo. - 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
sudorequires; 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.
| Reason | What to do next |
|---|---|
| Outside the work session’s scope | Request a work session whose scope includes sudo, or check the session’s scope on its page. |
| Judged too risky | Running it unchanged gives the same result. Review the command and its purpose with an administrator. |
| MFA verification too old | Verify again with your registered method, then run the command again. |
| MFA can’t be completed here | MFA 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 approver | Ask an administrator to add another approver or an auto-approve rule. |
| Already waiting for approval | Wait for the answer in the terminal where the same command is already waiting. |
| Rejected after the request | Check the approval request and discuss the work with your team before running it again. |
| No sudo access | Ask an administrator for sudo access. If an approval request was opened, its state is on the approvals screen. |
| Sudo with MFA is off | Ask an administrator to turn on sudo with MFA for the workspace. |
| No one on record ran it | Run the command from a session you signed in to, so it is on record as yours. |
| Policy needs MFA in a terminal | Run the command in a terminal, where the MFA its policy asks for can be completed. |
| No sudo policy covers it | Ask an administrator for a sudo policy that covers this command, server, and account. |
| Another person’s account | Run it as your own account. No rule or approval allows switching to another person’s account. |
| Target account unreadable | Name the account plainly and run it again, for example sudo -u deploy whoami. |
| No accountable user | Link the server account to an Alpacon user, or run it in a work session assigned to a person. |
| Account bound to an application | The account belongs to an application. Send the command through the application’s service token, not from a terminal. |
| System user not found | Check that the account exists on the server, then run the command again. |
| Session not found | Open a new session and run the command again. |
| Command too long to record | Shorten 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.
Filtering and search
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.