Repository navigation
Add a live probe for delegated SQL caveats (TC-1791) - #699
Merged
Merged
Conversation
- test/caveat-probe: throwaway wallet + key, one probe space; checks (e) tables grant, (e-reg) [{}] grant, (e2) constrained-statements, (g) unstored parent; prints status lines only.
- Local proof: flag on all PASS; flag off only e-delegate FAILs with unsupported-caveat.
Details: TC-1791
Details: TC-1791
Details: TC-1791
Details: TC-1791
…adable one - Bobbie #699 LOW: no umask window, no concurrent-first-run race, refuse mode & 0o077 on load. Details: TC-1791
…robe # Conflicts: # CHANGELOG.md
…uild never needs it - #699 Docker build failed: cargo chef prepare loads every workspace member, and the Dockerfile copies only the node's crates. - Root `exclude` like test/load/signer; own Cargo.lock (pruned from the root lock, same versions) and the root's slab patch. - Root Cargo.lock back to main's; releasing.md builds with --manifest-path. Details: TC-1791
- Root Cargo.lock drops the probe's entries (now identical to main); test/caveat-probe/Cargo.lock pruned from the root lock. Details: TC-1791
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.
Test-only: a live probe for delegated SQL caveats, the runbook line that says when to run it, and a CHANGELOG entry. No node change. Low priority; merges after #695 under a Naomi GO naming the head.
What
test/caveat-probe(cratetinycloud-caveat-probe, outside the node workspace liketest/load/signer: rootexclude, its ownCargo.lock, so the image build never sees it; build withcargo build --manifest-path test/caveat-probe/Cargo.toml) signs as a throwaway wallet that owns one probe space,caveatprobe, delegatestinycloud.sql/readon itsprobe1791database to a throwaway ed25519 key under each caveat form, and invokes as that key:[{"tables":["p_a"]}]grantp_aread 200;p_bread 403sql_caveat_violation[{}]grantsql-raw-query-blockedIt prints one
step status= expected= code= PASS|FAILline per step and exits 0 only onresult PASS. It prints no keys, tokens or bodies;codeis only the leading refusal identifier.State file: the caller names a path outside any repository. The first run creates it with mode 0600 (wallet hex and delegatee JWK). Later runs reuse it, so the same probe space is used each time.
docs/releasing.mdsays not to commit or paste it.Why
js-sdk refuses caveated delegations (
refuseCaveated), andtest/load/signersigns sessions only. Before this probe, nothing could sign the 1.26.19 live checks (e), (e-reg), (e2) or (g).Proof
sql.delegated_caveats_enforcedon: every step PASS. A rerun reuses the space and still passes.e-delegateFAILs, with 401unsupported-caveat(the 1.26.18 behaviour). Every other step PASSes.result PASS, exit 0.Invoking a constrained-statements grant needs the grant's own profile as the invocation caveat. With
[{}]instead, the node answers 401invocation-caveats-not-subset-of-chainon both settings, which matches the SDK.Review
Bobbie reviews alongside: throwaway keys and state-file handling.
No existing test file is edited.
Details: TC-1791