Repository navigation
fix(policy-v3): refuse new registrations with an unbound content source - #485
Merged
Merged
Conversation
…ce. Details: TC-2242
Contributor
Author
|
APPROVE: see TC-2242 (reviewed exact head 8302ed2) |
…ration. Details: TC-2242
Contributor
Author
|
APPROVE: see TC-2242 (reviewed exact head 3d80b4a) |
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
Contributor
Author
|
APPROVE: see TC-2242 (reviewed exact head bdbdc6d) |
samgbafa
marked this pull request as ready for review
October 29, 2026 21:49
This was referenced Oct 29, 2026
Merged
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.
New Policy/v3 registrations must now name their share key and its digest.
POST /policy/v3/policiesanswers400for a content source withoutencryptionKeyPath, and for any source (mutable or immutable) withoutencryptedSymmetricKeyDigestHex. Nothing is stored on a refusal. The check runs only when a registration is stored, for every credential requirement: a replay of an already-stored registration still answers200, and stored registrations validate and open as before (registration_projectionsis unchanged by this PR).Tests (
policy_v3/unbound_source_tests.rs, SQLite and PostgreSQL):content-source-invalidby the validation merged in PolicyV3: bind Share decrypt to registered named keys #481, ahead of this check);share/<shareId>, with its digest, mutable or immutable) is stored and admits decrypt on that leaf only.Existing-test setup changes (no assertion changed; all under the ruling below):
encryptionKeyPaththat existing tests make throughHarness::register_withare stored as already-stored rows (Harness::store_registration_on); path-bound ones still go through the route. This covers the revocation andrun_policy_v2_flowtests and PolicyV3: bind Share decrypt to registered named keys #481's legacy decrypt fixtures.run_policy_v2_flowtests box their future (the merged tree overflowed the 2 MiB test stack).ShareDecryptinnamed_keys_gate_tests.rsbecomespub(super)(visibility only) so the legacy decrypt test can reuse it.test-ruling: TC-2242
Details: TC-2242