Repository navigation
answer a policy fault the same way at every consumer - #2880
Merged
Merged
Conversation
shivamka1
force-pushed
the
fix/policy-fault-answers
branch
from
November 3, 2026 15:55
f4b98fd to
cc84a32
Compare
Contributor
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rust Benchmark'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.
| Benchmark suite | Current: cc84a32 | Previous: a05fce6 | Ratio |
|---|---|---|---|
lotr_graph/num_edges_temporal |
365 ns/iter (± 0) |
136 ns/iter (± 0) |
2.68 |
lotr_graph/num_edges_temporal_cached |
364 ns/iter (± 0) |
139 ns/iter (± 1) |
2.62 |
lotr_graph_window_100/num_edges_temporal |
372 ns/iter (± 3) |
149 ns/iter (± 0) |
2.50 |
lotr_graph_window_100/num_edges_temporal_cached |
373 ns/iter (± 1) |
150 ns/iter (± 1) |
2.49 |
lotr_graph_subgraph_10pc/num_nodes |
16 ns/iter (± 0) |
4 ns/iter (± 0) |
4 |
lotr_graph_subgraph_10pc/num_nodes_cached |
17 ns/iter (± 0) |
4 ns/iter (± 0) |
4.25 |
This comment was automatically generated by workflow using github-action-benchmark.
The write gate resolved the caller's grant itself and answered a policy fault with the fault's own message under ACCESS_DENIED, and a caller with no grant at all with "WRITE permission required", which names a graph the read gate would hide. Both gates now resolve the grant through one function, so a fault and a missing grant are answered on a write exactly as on a read.
The namespace write gate, the graph listing check and the metadata summary passed the policy's own error text through to the caller, the listing check without logging it. They now answer with the generic "access policy is misconfigured" error like the read gate does.
The comment claimed a caller who can see the namespace could learn the name from a listing; the listing hides graphs they have no grant on. The denial is safe because a path with no graph behind it is denied the same way.
shivamka1
force-pushed
the
fix/policy-fault-answers
branch
from
November 5, 2026 13:12
cc84a32 to
222d0e4
Compare
ljeub-pometry
approved these changes
Nov 5, 2026
ljeub-pometry
enabled auto-merge (squash)
November 5, 2026 14:42
ljeub-pometry
disabled auto-merge
November 5, 2026 14:43
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #2868; retarget to
db_v4once it merges.#2868 answers a policy fault (the policy itself failing, as opposed to a denial) on the read path with a generic "access policy is misconfigured" error and logs the detail. This applies the same rule to the places that still passed the policy's own error text through to the caller.
Write gate built on the read gate
The write gate resolved the caller's grant itself and answered a policy fault with the fault's own message under
ACCESS_DENIED, and a caller with no grant at all with "WRITE permission required", which names a graph the read gate would hide. Both gates now resolve the grant through one function, so a fault and a missing grant are answered on a write exactly as on a read.The generic error where a fault still leaked
The namespace write gate, the graph listing check and the metadata summary now answer with
PermissionError::AuthPolicyError.updateGraphon a graph whose policy faultsACCESS_DENIEDInternal server error, access policy is misconfiguredupdateGraphwith no grant, namespace not visibleWRITE permission required for graph 'g'Graph does not existupdateGraphwith no grant, namespace visibleAccess denied: no permission for graph 'g'graphs.listwith one graph faultingInternal server error, access policy is misconfigurednewGraphwhen the namespace faultsACCESS_DENIEDInternal server error, access policy is misconfiguredgraphMetadatacounts whenfull_readfaultsInternal server error, access policy is misconfiguredThe last row has no test here: it is reachable only through a policy that overrides
full_read, which the default policy does not.Also corrects the comment on why a denial may name the graph: a listing hides graphs the caller has no grant on; the denial is safe because a path with no graph behind it is denied the same way.