You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
f:query policy conditions may read the default graph instead of the judged fact's graph #2289
P2Scheduled: real but not urgentarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expectedtriage:needs-infoBlocked on information from author/owner
QueryPolicyEnforcer::filter_flakes_for_graph and allow_flake_for_graph (fluree-db-query/src/policy/enforcer.rs) build the f:query condition executor with QueryPolicyExecutor::with_overlay(snapshot, overlay, to_t), which reads graph 0. The g_id of the fact being judged is not passed in. A policy condition judging a fact in a named graph may therefore read the default graph instead of the fact's own graph.
Found by code reading while scoping policy-restricted reasoning serving; not yet reproduced. It was left out of that work because the fix changes shared policy semantics, and does not apply only to reasoning.
Proposed:
Reproduce: the same subject in two named graphs, with an f:query condition answering opposite ways in each.
If confirmed, pass the graph through to the executor and test it through batch filtering, single-fact checks and path checks, with and without query-time reasoning.
P2Scheduled: real but not urgentarea:queryQuery execution, planning, fast paths, overlay, result formattingbugSomething isn't working as expectedtriage:needs-infoBlocked on information from author/owner
Activity