The admission matrix guide: deciding how far automation may go in each zone of Cloudflare

The admission matrix is a list, kept by the Detect kit, that says how far edge-response may go in each Cloudflare zone. It is how you stay in charge of automation: nothing runs in a zone until you admit it, and you can take it back at once. It is built and tested. It has not been deployed.

The treatment ladder and how it moves Four rungs from store-only at the bottom to enforce-block at the top. Lowering a zone, or pulling the stop switch, drops it immediately. Raising is one rung at a time, in two steps. enforce-block a person still approves enforce-log rules may be written in log mode detect rules run, signals raised store-only stored, nothing else (the default) Raise: one rung, two steps, audited Lower or stop switch: at once
Raising climbs one rung at a time, in two steps. Lowering, or the stop switch, drops straight down at once.

The rungs

Each zone has one of four levels, called rungs, from least to most automation: store-only, detect, enforce-log and enforce-block. The concept page explains each one. A record with no zone, such as an audit event or an Access sign-in, is keyed by its source instead, and the same rules apply to a source key. The matrix also accepts a queue key, but nothing in the kit looks one up yet.

How the effective level is worked out

The level that actually applies, the effective level, is the lower of two things: a ceiling for the whole deployment, and the setting stored for the zone. Four facts follow.

Lowering is immediate

Anyone you have admitted as an operator can lower a zone, and it takes effect straight away. A lowering must go strictly below the current setting. It needs a reason, and the request must name the version it expects to change, so that two people lowering at once cannot overwrite each other: exactly one succeeds. Every change is added to a history that refuses edits and deletes.

Raising is two steps, one rung at a time

Raising is slower on purpose, and the whole thing is audited.

  1. Propose. An administrator, signed in within the last 10 minutes, proposes raising a zone by exactly one rung. Two rungs at once is refused, and so is anything above the ceiling.
  2. Confirm. The same administrator confirms, not sooner than 60 seconds and not later than 600 seconds (10 minutes) after proposing. If anyone lowers the zone in between, or the version has moved, the proposal is cancelled and the confirmation refused.

To go from store-only to enforce-log takes two raises, first to detect and then to enforce-log, each in its own two steps. A service token can read the matrix but can never change it. Who made a change always comes from the verified Access sign-in, never from what the request says, and a request that names an actor is refused.

The stop switch

The stop switch stops all automation at once. Any operator can stop, immediately. Resuming is two steps by an administrator, with the same 60 to 600 second wait. While stopped, every zone is store-only. The switch starts stopped on a new deployment, and a missing or unreadable switch counts as stopped.

The fast copy is never the authority

For the busy path, where rules decide whether to run, Detect keeps a fast copy of the matrix in Workers KV, Cloudflare's key-value store. It can lag, a scheduled job rewrites it from the recorded matrix every five minutes, and a missing or unreadable copy means store-only. The recorded matrix, held in D1, Cloudflare's SQL database, is the authority. Before Respond changes anything it reads the recorded matrix again through Detect's AdmissionRead capability, and never the fast copy.

Where the interface is

The matrix is changed through an HTTP interface behind Access, and through the AdmissionOperator capability for a console. The routes are GET /v1/admission, GET /v1/admission/{kind}/{id}, POST /v1/admission/lower, /v1/admission/raise/propose, /v1/admission/raise/confirm, /v1/admission/stop, /v1/admission/resume/propose and /v1/admission/resume/confirm. Requests must be JSON of at most 1 KB with strict fields, and a browser request from another site is refused. See the Detect kit. When Detect is not deployed, Respond uses its own list of zones and levels with the same ceiling rule, and nothing can raise it except a change in its configuration.