Skip to content

A refused schema read is a bare error document that hides existence

The rule

Normative: this is the rule
  1. A schema read for a workflow that does not exist MUST answer 404 with the code NOT_FOUND to a caller holding blanket authority over workflows, and 403 with the code ACCESS_DENIED to every other identified caller (a request without accepted credentials gets 401, conventions).
  2. A schema read for a workflow that exists but that the caller may not view MUST answer 403 with the code ACCESS_DENIED.
  3. The two 403 answers MUST be indistinguishable, so that the schema route cannot be used to learn which workflows exist.
  4. Each refusal MUST be a bare error document like META-4's bare success document: an object carrying error and error_code, with no success key.
  5. Each MUST be answered before anything else about the workflow is read, so a refused identifier never reaches the schema version or the entity tag.

What it means

A refused identifier is answered before the schema version or the entity tag is worked out at all — there is nothing the caller may see to version or tag, so nothing downstream of the lookup is reached. Which refusal comes back depends on who is asking, as it does for a run (PIPE-1): a caller with authority over every workflow is told 404 for a workflow that does not exist, and everyone else gets the same 403 for a workflow that does not exist as for one they may not view. The schema route would otherwise tell anyone which workflow identifiers are in use.

The body is bare, like the schema document itself (META-4): error and error_code, not the {success, error} envelope other endpoints on this API return. A caller that reads success to decide whether a response failed finds nothing there to read, and reads the status and error_code instead.

Example

The schema of a workflow that does not exist, asked by a caller with authority over every workflow404 — refused
GET /api/flowdrop/workflows/{workflow_id}/schema

{"error": "Workflow not found.", "error_code": "NOT_FOUND"}
The same request from any other caller, or a workflow they may not view403 — refused
GET /api/flowdrop/workflows/{workflow_id}/schema

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

The paths are examples of the route API-9 names workflow_schema.

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 · META-5 · changed in spec 1.1