Limit what a CI job or agent can do
A machine is any OAuth client that is not a person: a CI job, an LLM agent, a producer or a provisioning broker. What a machine can do starts with its scopes, which are fixed when the client is created. Machine access narrows that further, one feature area at a time, without issuing a new credential.
The rule is simple: a machine can do something only if its scopes allow it and the area is allowed for it. Machine access never gives a machine a scope it was not issued.
How the setting is decided
There are eight areas:
| Area | Covers |
|---|---|
sites | Sites, Site Insights, hosted apps and their sign-in, error tracking, the email they send |
reporting | Analytics queries, reports, measurement, time plans, workflow timings |
privacy_erasure | Privacy settings, subject erasure and export, retention, data labels |
destructive_jobs | Cleanup, offboarding, data space erasure, the scheduled jobs that run them |
users_access | Users and roles, support access, data scopes, the audit trail, these settings |
provisioning_credentials | Machine clients, producers, data spaces, storage locations |
ingest_schemas | Sending and reprocessing events, ingest diagnostics, event types, schemas, parsers |
usage_billing | Usage, accounting, storage usage |
- The company default sets each area to
allowedorblockedfor every machine. - Each machine can
inheritthe company default (the start for every machine), or beallowedorblockeditself. A machine's own setting wins over the company default. - Nobody configured anything? Every area is allowed, so turning this on changes nothing.
A change reaches every Custd service within 10 seconds. Tokens already issued are checked against the new setting on their next request; you do not need to rotate anything.
You need tenant administrator access. custdctl uses your signed-in profile (see
Use the custdctl client).
See what your machines can do
Console: open Admin → Identity → Machine Access. The top shows the company default. Below it, each machine has one line such as "Can do 6 of 8 areas". Select Review on a machine to see each area, whether it is allowed now, what decided it (the machine’s scopes, its own setting, or the company default). The summary counts areas with a matching scope and an allowed setting. Individual operations can still require a resource binding or additional authority. From Machine Clients, the shield button on a row opens the same panel.
CLI:
custdctl machine-access get --profile acme
custdctl machine-access get --profile acme --client-id ci-deploy
The first prints the company default and the support automation setting. The second prints
what one machine can do in each area and what decided it. Add --json for automation.
Example 1: a read-only reporting agent
You want an LLM agent that answers questions from your reports and can change nothing.
- Create the machine client with read scopes only, for example
events.readandmeasurement:read. Read-only starts with the scopes: an area setting does not separate reading from writing inside an area. - Block every area except reporting for this one machine.
Console: in Machine Access, select Review on reporting-agent. Set Reporting to
Allowed and every other area to Blocked, then select Save machine setting. Its line
now reads "Can do 1 of 8 areas".
CLI:
custdctl machine-access set --profile acme --client-id reporting-agent \
reporting=allowed sites=blocked privacy_erasure=blocked destructive_jobs=blocked \
users_access=blocked provisioning_credentials=blocked ingest_schemas=blocked usage_billing=blocked
Areas you do not name keep their current setting.
Example 2: a CI deploy credential that cannot erase data
Your CI job deploys and manages sites, and must never erase subjects or run cleanup.
Console: select Review on ci-deploy. Set Privacy and erasure and Cleanup and
destructive jobs to Blocked, leave the rest on Company default, and save.
CLI:
custdctl machine-access set --profile acme --client-id ci-deploy \
privacy_erasure=blocked destructive_jobs=blocked
If the job later tries an erasure, it gets 403 with code machine_access_blocked, and the
problem names the area and what blocked it:
{
"status": 403,
"code": "machine_access_blocked",
"machineAccess": {
"area": "privacy_erasure",
"blockedBy": "machine",
"companySlug": "acme",
"clientId": "ci-deploy"
}
}
blockedBy tells the person reading the CI log what to change: machine is this machine's own
setting, company is the company default.
Example 3: block destructive jobs for everyone except one maintenance job
No machine should run cleanup or offboarding, except the one nightly maintenance job.
Console: in Company default, set Cleanup and destructive jobs to Blocked and
select Save company default. Then select Review on nightly-maintenance, set Cleanup and
destructive jobs to Allowed and save. Its panel shows the area as allowed, decided by the
machine's own setting; every other machine shows it blocked, decided by the company default.
CLI:
custdctl machine-access set --profile acme destructive_jobs=blocked
custdctl machine-access set --profile acme --client-id nightly-maintenance destructive_jobs=allowed
To hand a machine back to the company default, set the area to inherit:
custdctl machine-access set --profile acme --client-id nightly-maintenance destructive_jobs=inherit
Custd support automation
Allow Custd support automation is on by default. It lets Custd's own platform machine act inside your company, for example to repair a stuck job for you. Turn it off to refuse that machine everywhere it names your company; Custd staff then need a support grant you approve.
Console: clear Allow Custd support automation in Company default and save.
CLI:
custdctl machine-access set --profile acme --support-automation block
Every change to machine access is recorded in the audit log with who changed it, and the old and new values.