Operate
Access reviews and 2FA rules
Check on a schedule that everyone with access to a project still needs it, require a second factor for changes, and do the same for operators.
Over time people and API keys pile up in a project and keep access long after they need it. An access review is a quick, recorded check: for each person and key, someone decides keep or remove, and removing takes effect straight away.
How to do it: open the project, go to Settings, find Access reviews and press Start a review. You can also set reviews to start on a schedule, and require everyone in the project to use a second sign-in step (an authenticator app or a passkey) before they change anything.
Finished reviews are kept, which is what an auditor or a customer's security team will ask to see.
People join projects, keys get made for a job, and both tend to stay long after the job is done. An access review is a short, recorded check that every person and API key with access to a project still needs it. This page covers project reviews, reviews of the platform's operators, and rules that require a second factor.
Project access reviews
A review is a snapshot of everyone who can touch the project when it starts:
- People, with their role and whether they have a second factor.
- API keys that are still active, with their name, scopes, when they were made and last used, when they expire and their spending cap.
For each entry, someone decides keep or remove. Removing takes effect at once: the person is taken out of the project, or the key is revoked. A finished review is kept as a record, which is what an auditor asks to see.
Owners and admins run reviews. The Access reviews panel on the project page is only shown to them.
Start a review
In the dashboard: open Access reviews and click Start a review now.
With the API:
POST /v1/projects/:id/access-reviewsA project can have one open review at a time; starting another answers CONFLICT with the open one's id in details.reviewId. A review is due 14 days after it opens.
GET /v1/projects/:id/access-reviews lists recent reviews and the schedule, and GET /v1/access-reviews/:id shows one.
Decide each entry
In the dashboard: click Keep or Remove next to each person and key.
With the API:
POST /v1/access-reviews/:id/decide
{"principal": "email:[email protected]", "keep": false}principal is the entry's principal as the review lists it (a key looks like key:…).
Some rules keep a review honest:
- Nobody reviews themselves. Deciding your own entry answers
FORBIDDEN: someone else has to. The dashboard shows "Someone else reviews you" instead of the buttons. - The last owner stays. Removing the project's only owner answers
CONFLICT. Make someone else an owner first. - A person decides. Starting, deciding and finishing a review, and setting the schedule, need a signed-in person. An API key gets
FORBIDDEN.
Finish the review
Once every entry is decided, finish it.
In the dashboard: click Finish the review.
With the API:
POST /v1/access-reviews/:id/completeIf anything is still undecided, CLI answers VALIDATION with the undecided entries in details.undecided. A finished review records who finished it, when, and how many entries were kept and removed. The dashboard lists the last five.
Review on a schedule
Set how often a review should happen, and CLI opens one when it's due and tells the project's owners with an access_review_due event (see /docs/monitoring). The event says how many people and keys to check and the date it's due by.
In the dashboard: under Access reviews, pick Every month, Every quarter, Every six months or Every year. When we choose turns the schedule off.
With the API:
PUT /v1/projects/:id/access-reviews/schedule
{"accessReviewDays": 90}Any number of days from 7 to 365 works; null turns it off. CLI checks daily. The next review is due that many days after the last one opened. If one is still open when the next is due, CLI doesn't open another.
Operator access reviews
Operators with the admin role (everyone in CLI_OPERATORS, and anyone given the admin role; see /docs/compliance) can review the operator list the same way. The review lists every operator: those in CLI_OPERATORS and those given a role in the app. Each entry shows the operator's role, whether they come from CLI_OPERATORS, and whether they have a second factor.
In the dashboard: on the Operations page, Operator access reviews shows the last finished review and Start a review; an open review lists each operator with Keep and Remove, like a project's.
With the API:
POST /v1/admin/access-reviews
GET /v1/admin/access-reviews
PUT /v1/admin/access-reviews/schedule
{"accessReviewDays": 90}Deciding and finishing use the same /v1/access-reviews/:id/decide and /complete as projects, and the same rule that nobody decides their own entry.
Require a second factor for a project
An owner can require everyone who changes anything in the project to have a second factor: an authenticator app or a passkey (see Teams and security for setting one up).
In the dashboard: under Access reviews, tick Require a second factor to make changes.
With the API:
PUT /v1/projects/:id/security
{"requireTwoFactor": true}GET /v1/projects/:id/security shows whether it's on.
What the rule does:
- Only an owner can change it. An admin gets
FORBIDDEN. - You need a second factor yourself first. Turning it on without one answers
MFA_REQUIRED, so you can't lock yourself out. - Viewing still works. People without a second factor can read everything their role allows. Anything that changes something answers
MFA_REQUIREDuntil they set one up. - API keys aren't affected. Keys don't have second factors; their limits come from their role, scopes and caps (see /docs/agent-permissions).
- It covers environments too.
An agent that gets MFA_REQUIRED can't fix it. It should tell you what it was trying to do.
Require a second factor for operators
The operator of a CLI server can require every operator to have a second factor before any operator-only route works:
CLI_REQUIRE_OPERATOR_2FA=trueAn operator without one gets MFA_REQUIRED and sets one up on their account page. npm run preflight warns while it's off. See Running CLI yourself and SOC 2 readiness.
Where reviews show up later
Finished reviews, from projects and operators, are part of the evidence export operators download for audits, along with each person's second-factor status and which projects require one. See SOC 2 readiness.