--- id: PIPE-6 family: RT-PIPE level: core profiles: [runtime] posture: normative-target added: "1.0" changed: "1.0" source: https://flowdrop.io/spec/rules/rt-pipe/pipe-6 specification: FlowDrop Workflow Specification 1.0 licence: CC BY 4.0 --- # PIPE-6 — Authorization is decided before the handler, and travels with its cacheability *RT-PIPE (Part II) · level: core · profiles: runtime · added in 1.0* A response cached for one principal is never served to another. That holds only if the authorization decision and the cache metadata describing what it depended on stay together. ## The rule > **Normative.** This is the rule. > > 1. Authorization for a run's job surfaces is decided before the handler runs, and the decision's cache metadata travels with it. > > 2. A response cached for one principal MUST NOT be served to another. > > 3. The decision is the entity's own authorization result, forwarded unchanged rather than reduced to a boolean. > > 4. Re-implementing a subset of the model in a handler both locks out principals the surface admits and ignores extension points the model honours. > > 5. Authority over a job is not authority over a run. > > 6. A run the caller is not allowed to view MUST be refused before anything about it (its jobs, its summary, its label) is assembled. > > 7. Absence is answered before denial, so a request for an identifier that does not exist MUST be answered with `404` even where a caller holding the surface's authority could not have viewed it. > > 8. Identifiers MUST therefore carry no information beyond their existence. ## What it means Absence is answered before denial: a job identifier that resolves to nothing gets the documented not-found response even for a caller who, had the job existed, could not have viewed it. That is a deliberate trade — identifiers carry no information beyond their existence — not an oversight, so which is why an identifier's shape alone reveals nothing. 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 gets the same shape regardless of what the caller could have seen had it existed. ```http title="A job identifier that does not exist" verdict="404 refused" GET /api/flowdrop/job/{job_id} {"error": "Job not found", "message": "…"} ``` ## Why Recorded under [OPEN-25](https://flowdrop.io/spec/rulings/open-25). ## Related rules - Names: PIPE-5, SNAP-2 - Referenced by: SNAP-2 --- Rule identifiers are permanent and are never renumbered. This specification carries no implementation status: each implementation publishes its own standing against these rules. Licensed CC BY 4.0.