CloudSite / Security
Console
Access control for agents

Give the agent a job, not the keys to everything.

CloudSite separates reading from writing at the token, and enforces the difference on the server. The result is boring in the right way: an automation that cannot exceed its scope, and a state you can verify before and after it acts.

scope: write → deploy scope: read → inspect

01 Boundary

Three lines the platform holds for you.

Every operation passes through all three. None of them depend on the client behaving well — the checks happen where the data is.

LAYER 1

Token

A credential is issued as read or write. Write is not a superset you get by asking; it is a separate issuance decision.

LAYER 2

Server

A read token calling a write tool is rejected by the service. Nothing is queued, nothing is written, and the caller receives an error.

LAYER 3

Project

File writes are bounded to one site and one path at a time, capped at 2 MB per file, encoded as UTF-8.

02 Scopes

What each token class can reach.

CapabilityRead tokenWrite tokenNotes
whoami / capabilitiesallowedallowedConfirm identity and scope before doing anything else.
list_sites / get_siteallowedallowedIncludes deployment state and bound domain information.
list_site_files / read_site_fileallowedallowedReturns file text as UTF-8.
write_site_file / delete_site_filerefusedallowedReplaces or removes one path; read first if content matters.
generate_site / chat_siterefusedallowedBoth change the site, so both need write.
deploy_site / bind_domainrefusedallowedBinding writes the CNAME at Cloudflare automatically.
upload_site / create_upload_linkrefusedallowedWhole-site replacement; the root must contain index.html.

A refusal is a normal, documented outcome, not a partial success. If your integration treats every non-empty response as success, test the read-token path once and watch for the error.

03 Before a write

Five habits that prevent most incidents.

  • Call whoami first.Know which scope you actually have, not which one you assume.
  • Read the target file.A write replaces the whole file; diffing needs the original text.
  • Keep index.html at the root.It is the entry point for the site and for whole-site uploads.
  • Write, then deploy once.Deployment is explicit. A saved file is not a live page.
  • Verify with a read tool.Confirm the result instead of trusting the write response alone.
file boundary

2 MB, UTF-8, per file

Large binaries do not belong in a site file write. Use the upload path for whole-site replacement, and keep individual edits as text under the limit.

“The safest automation is the one that can be given a smaller credential than you originally planned.”

04 Data boundaries

What is in scope, and when it is shown.

pii

Visitor contact data appears only when needed

Emails, phone numbers and custom form fields belong to the visitor. They are surfaced only for the task at hand; they are not part of a site listing or a default read.

money

Amounts are stored in cents

Prices are integers in the smallest unit. Formatting is a presentation concern; rounding is never a storage concern.

reach

Preview links are temporary and loginless

A preview URL is valid for one to 72 hours and does not require an account. Treat it as a bearer artifact: anyone holding it can look.

language

Four locales per property

The limit is explicit, which keeps translated copies of a site enumerable rather than open-ended.

05 Visible behaviour

Audit by inspection, not by assurance.

We are not going to print a certification badge here. What we will say is that the state is observable with the same tools that change it: a scoped identity, a site record, a file tree, a task status. Before and after a change, you can read all four.

step 1

Attribute the action

whoami returns the identity and scope behind the token. Record it alongside the change you are about to make.

step 2

Reconstruct the state

get_site plus list_site_files give you the deployed state and the file inventory; get_task reports asynchronous work.

Tokens are read or write, and the server refuses the wrong call. That single rule removes the most common failure mode in agent automation: an assistant with more authority than its task.

Issue a narrow token and see what it refuses.

Open the console