omnigraph/crates/omnigraph-server
Ragnor Comerford 200fcbb215
Surface policy-engine errors from stored-query invoke
The invoke handler mapped every authorize_request failure to 404 ('stored
query not found'), which collapsed the authorization decision (deny -> 403)
together with operational failures (no actor -> 401, Cedar evaluation error ->
500). A real policy-engine 500 was hidden as a missing query.

Separate the two concerns instead of sniffing the masked status. Extract
authorize() returning an Authz { Allowed, Denied(msg) } decision and reserve
Err for operational failures only; authorize_request becomes a thin wrapper
that maps Denied -> 403, so the 16 deny-as-403 callers are unchanged. The
invoke handler now matches the decision directly: a denial stays 404 (deny ==
missing, so the catalog can't be probed without the grant), while a 401/500
propagates with its true status.

500 is now a reachable outcome on POST /queries/{name}; document it in the
endpoint responses and regenerate openapi.json.
2026-06-01 11:45:44 +02:00
..
examples feat: inline query strings in CLI and HTTP server (#110) 2026-05-29 13:41:54 +02:00
src Surface policy-engine errors from stored-query invoke 2026-06-01 11:45:44 +02:00
tests Resolve graph config by identity, not server mode 2026-05-31 15:57:20 +02:00
Cargo.toml (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00