Skip to content

Snapshot access is decided on the snapshot, and absence is no oracle

The rule

Normative: this is the rule
  1. Reading or deleting a snapshot loads it by execution id and asks it for view or delete authority.
  2. A snapshot that does not exist MUST be answered 404 with the code NOT_FOUND to a caller holding blanket authority over snapshots, and 403 with the code ACCESS_DENIED to every other identified caller (a request without accepted credentials gets 401, conventions).
  3. A snapshot that exists but that the caller is not allowed to reach MUST be answered 403 with the code ACCESS_DENIED.
  4. The two 403 answers MUST be indistinguishable, so that the endpoints cannot be used to learn which snapshots exist.
  5. A read by a caller allowed to reach the snapshot that finds the record but no readable payload MUST answer 404 with the code NOT_FOUND.
  6. A read MUST NOT answer a partial document.
  7. The list endpoint does not ask per record: it narrows the query by ownership.
  8. A snapshot belonging to another principal MUST be absent from the list.
  9. The list MUST NOT carry a denial on such a snapshot.

What it means

Reading and deleting a snapshot both load the record first and ask it whether this caller may view or delete it. What a caller learns from a refusal depends on who is asking. A caller with authority over every snapshot is told plainly when an id was never stored: 404, since existence is no secret from someone who could reach any snapshot. Everyone else gets the same 403 for an id nobody stored as for a snapshot that exists but is not theirs, so the endpoints cannot be used to find out which execution ids have snapshots. A caller who may reach a snapshot whose payload cannot be read gets 404: the record is theirs, and a partial document is never an answer.

A denial carries nothing about the record it denied: not the workflow that produced it, not any other trace, only the fixed refusal message. Distinguish this from the list endpoint, which never reaches a per-record denial at all — it narrows its query by ownership up front, so a snapshot belonging to someone else is simply absent from the page rather than a 403 entry on it.

Example

A snapshot nobody stored, asked by a caller with authority over every snapshot404 — refused
GET /api/flowdrop-runtime/snapshot/{execution_id}

{ "success": false, "error": "Snapshot not found", "error_code": "NOT_FOUND" }
The same id from any other caller, or a snapshot that belongs to someone else403 — refused
GET /api/flowdrop-runtime/snapshot/{execution_id}

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

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

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 · SNAP-2 · changed in spec 1.1