Skip to content

A run's job surfaces authorise first, and never share one caller's answer

A caller is authorised before anything is read, a cached answer for one caller is never served to another, and a surface admits exactly whom the authority it checks admits, no more and no fewer.

The rule

Normative: this is the rule
  1. On a run's job surfaces, the caller MUST be authorised before anything about the run or its jobs is read.
  2. A response served to one caller MUST NOT be served from a cache to another caller.
  3. Each surface MUST admit exactly the callers that the authority over the run, or over the job, admits wherever else it is checked: a surface MUST NOT admit fewer callers, or more, by applying a narrower check of its own.
  4. Authority over a job is not authority over a run.
  5. A run the caller is not allowed to view MUST be refused before anything about it (its jobs, its summary, its label) is assembled.
  6. A request naming a run that does not exist MUST be answered 404 with the code NOT_FOUND only to a caller holding blanket authority over runs, and one naming a job that does not exist only to a caller holding blanket authority over jobs (conventions); every other identified caller MUST get the same 403 with the code ACCESS_DENIED that a run or job it may not view gets, so these surfaces cannot be used to learn which runs or jobs exist (PIPE-1).

What it means

A missing run or job is answered the way a run or job the caller may not view is answered: 403 ACCESS_DENIED. Only a caller with blanket authority over runs learns that a run identifier names nothing, and only one with blanket authority over jobs learns that a job identifier does (404 NOT_FOUND), because for that caller existence is no secret. Anyone else cannot tell "does not exist" from "not yours", so the job surfaces cannot be used to find out which runs or jobs exist. The run reads (PIPE-1), snapshots (SNAP-2) and signals (INT-16) answer the same way.

Authorisation comes first, and it is the same answer the authority gives anywhere else: a surface that checked a narrower condition of its own would turn away callers the authority admits, or let in callers it does not. And because two callers can be told different things, an answer cached for one is never served to the other.

Authority over a job and authority over the run it belongs to are separate questions: holding one is not evidence for the other, so a run the caller may not view is refused before anything about it, its jobs included, is assembled.

Example

A job identifier that does not exist, asked for by a caller without blanket authority over jobs, gets the same answer as a job it may not view.

A job identifier that does not exist403 — ACCESS_DENIED
GET /api/flowdrop/job/{job_id}

{"success": false, "error": "Access denied", "error_code": "ACCESS_DENIED"}

The path is an example of the route API-9 names job.

Why

Recorded under OPEN-25, OPEN-61, OPEN-65.

Rule identifiers are permanent and are never renumbered. Each implementation publishes its own standing against these rules; this specification does not.spec 1.0 · PIPE-6 · changed in spec 1.1