Agent Tier DNS Zone
The AI agent fleet (ruche) answers ACME’s DNS-01 challenge with a Cloudflare API token scoped to its own domain, never the token that guards the parent domain (ADR-0054, ADR-0068):
- Blast-radius containment — a Cloudflare token is zone-scoped, not record-scoped. A token able to complete DNS-01 for the parent domain can rewrite MX and every other record in that zone; a token scoped to a separate domain can only touch the agent tier.
rucheis assumed compromisable (ADR-0054) — the token it holds must cost only the agent tier if it leaks.
Config keys
Section titled “Config keys”| Key | Secret | Holds |
|---|---|---|
agents_domain |
no | the agent tier’s own domain, e.g. agents-example.com |
agents_cloudflare_dns_api_token |
yes | API token scoped to the agents_domain zone only |
aoe_subdomain |
no | the agent tier’s serving gate — host-scope it, see below |
aoe_subdomain decides which Host’s Caddy answers for this zone. Set it under [hosts.<name>], never fleet-wide: a fleet-wide answer points every Host’s Caddy at the agent tier’s token, and the parent domain’s certificates then fail to renew.
Provisioning
Section titled “Provisioning”Getting a domain onto Cloudflare and minting a scoped token both sit behind an interactive Cloudflare login — those steps are the checklist below.
-
Get the domain onto Cloudflare. Either transfer an existing registration in (Cloudflare dashboard → Domains → Add a site → Transfer a domain) or keep it registered elsewhere and just point its nameservers at Cloudflare (Add a site → Connect a domain). Either way it must be a root domain — Cloudflare rejects a subdomain here. Wait for the zone to show Active.
-
Mint the token, scoped to the new zone only:
Permission Level Zone → DNS Edit Zone → Zone Read My Profile → API Tokens → Create Token → “Edit zone DNS” template, with Zone Resources narrowed to the single
agents_domainzone. Copy the token immediately — it is shown only once. -
Store both values:
Terminal window auberge config set agents_domain agents-example.comauberge config set agents_cloudflare_dns_api_token YOUR_TOKEN -
Verify the token authenticates and is scoped to exactly the one zone:
Terminal window curl -s -H "Authorization: Bearer YOUR_TOKEN" \https://api.cloudflare.com/client/v4/zones | jq -r '.result[].name'# expect exactly: agents-example.com -
Point the agent Host’s Caddy at it, by host-scoping the serving gate.
auberge config setwrites only top-level keys, so this one is edited in the file —auberge config edit:[hosts.ruche]aoe_subdomain = "essaim"infrastructure.ymlreads that gate and resolves Caddy’scaddy_dns_api_tokentoagents_cloudflare_dns_api_tokenon that Host alone; every other Host keepscloudflare_dns_api_token(ADR-0072).tests/caddy_acme_token.rsasserts both directions.
Rotation
Section titled “Rotation”Cloudflare tokens carry no forced expiry unless one is set at creation — set a TTL when minting and note the rotation date. To rotate: create a replacement token scoped to agents_domain the same way, auberge config set agents_cloudflare_dns_api_token NEW_TOKEN, revoke the old token, then auberge deploy --tags caddy -H ruche to rewrite /etc/caddy/caddy.env.