Snapshot access is decided on the snapshot, and absence is no oracle
The rule
- Reading or deleting a snapshot loads it by execution id and asks it for view or delete authority.
- A snapshot that does not exist MUST be answered
404with the codeNOT_FOUNDto a caller holding blanket authority over snapshots, and403with the codeACCESS_DENIEDto every other identified caller (a request without accepted credentials gets401, conventions). - A snapshot that exists but that the caller is not allowed to reach MUST be answered
403with the codeACCESS_DENIED. - The two
403answers MUST be indistinguishable, so that the endpoints cannot be used to learn which snapshots exist. - A read by a caller allowed to reach the snapshot that finds the record but no readable payload MUST answer
404with the codeNOT_FOUND. - A read MUST NOT answer a partial document.
- The list endpoint does not ask per record: it narrows the query by ownership.
- A snapshot belonging to another principal MUST be absent from the list.
- 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
GET /api/flowdrop-runtime/snapshot/{execution_id}
{ "success": false, "error": "Snapshot not found", "error_code": "NOT_FOUND" }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.