Repository navigation
Conversation
A new registration whose content source names share/<shareId> records that deterministic key on the owner's default network in the registration's transaction, under the network row lock and the per-network key limit. The registration already requires its owner to hold decrypt on the exact key, so publishing a share needs no key.create grant. An existing key keeps its state; at the key limit the registration is refused and stores nothing.
This was referenced Nov 7, 2026
This branch has not been deployed
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.
What
A new Policy/v3 registration (
POST /policy/v3/policies) whosecontentSourcenamesencryptionKeyPathshare/<shareId>now records that key on the owner'sdefaultnetwork in the registration's own transaction. A publisher encrypts to the key's public key (served without authentication) and registers; it no longer needs atinycloud.encryption/key.creategrant or a create call before publishing.decrypton the exact key, as the network owner or through the owner's own delegations; a policy session is never that authority (owner_holds_capabilities).EncryptionService::record_deterministic_key_in, which reuses thekey.createpath inside the registration transaction: network row lock, active network, per-network key limit. Only deterministic keys are recorded this way.keyVersion1, stateactive. At the key limit the registration answers 403key_limit_exceededand stores nothing (no registration, roots or key).network_not_found404,network_not_active409).Docs:
docs/encryption-named-keys.md. CHANGELOG updated.Tests
New
policy_v3/share_key_record_tests.rs(SQLite and PostgreSQL where marked):key_limit_exceededand stores neither the registration nor the key; a registration over an already recorded key still succeeds (both backends);The Share decrypt fixture now encrypts to the public key without creating the key, so the existing TC-2192 share tests run on the recorded-key path. The unbound-source fixture creates the owner's
defaultnetwork.Local:
cargo fmt --check,cargo clippy -p tinycloud-node -p tinycloud-core --all-targets(-Dwarnings),cargo test -p tinycloud-node --lib982 passed (PostgreSQL included).Order
Clients stop creating the share key in a follow-up js-sdk change and a Share app change. Those must not be released before this node change is deployed.
Details: TC-2525