omnigraph/crates/omnigraph-server/src
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
..
api.rs Add GET /queries stored-query catalog endpoint 2026-05-31 13:09:03 +02:00
auth.rs (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
config.rs Validate the graph selection in queries list 2026-06-01 11:45:44 +02:00
graph_id.rs (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
identity.rs (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00
lib.rs Surface policy-engine errors from stored-query invoke 2026-06-01 11:45:44 +02:00
main.rs Rename repo terminology to graph (#118) 2026-05-24 16:46:00 +01:00
policy.rs policy: chassis core — omnigraph-policy crate + Omnigraph::enforce() (MR-722) (#102) 2026-05-18 00:36:36 +03:00
queries.rs Collect file-I/O and parse errors in QueryRegistry::load in one pass 2026-05-31 15:40:13 +02:00
registry.rs Add stored-query registry loader and GraphHandle wiring 2026-05-30 15:29:00 +02:00
workload.rs (feat): multi-graph server mode (#119) 2026-05-28 16:19:31 +02:00