Repository navigation
Conversation
Details: TC-1718
An owner with no ordinary authority over a space can be authorized by a parentless tinycloud.policy/register grant from the space owner, bound to the exact policy template digest (SHA-256 over JCS of the policy minus policyId, createdAt, expiresAt, signature). Classifier version 3; the grant is not persisted. register_policy refuses roots that outlive the grant with policy-root-outlives-register-grant in both modes. Background classification maps such roots to unknown(OutlivesAuthority). Details: TC-1718
A delegation carrying any tinycloud.policy/ ability must have no parents. Rejected with policy-register-grant-must-be-parentless so the register grant closure is exactly the grant itself. Details: TC-1718
Registers the register ability in capabilities.json and regenerates the TypeScript and Rust outputs. gen-capabilities.mjs --check passes. Details: TC-1718
Covers template binding, revocation, root lifetime refusal in both modes, reclassification and background backfill, parentless guard, and expiry ending authority. Runs on SQLite and Postgres. Details: TC-1718
Adds the register-grant section to policy-owner-authority.md and a 1.21.8 CHANGELOG entry. No migration. Details: TC-1718
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3
…8-c2-register-grant-n3; neutral wording; check the decrypt request passes authorization before the revoke
This was referenced Oct 24, 2026
added 2 commits
October 24, 2026 10:52
Contributor
Author
|
APPROVE: see TC-1718 (reviewed exact head e8b877a) |
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.
Policy registration accepts a space-owner register grant as an authorization fallback. No database migration. Stacked on #362.
What the new right allows
tinycloud.policy/registeron<space>/policy/<digest>lets its holder register a policy root whose template digest equals<digest>. The template digest is SHA-256 over the domainxyz.tinycloud.policy/RegisterTemplate/v1\0followed by the JCS encoding of the policy withpolicyId,createdAt,expiresAtandsignatureremoved.The fallback runs only when ordinary owner authority selection fails. Owners with ordinary authority take the existing path.
Who can grant it
Only the space owner, as delegator, to the policy owner. The grant must be a root delegation with no parents. Core
/delegaterequires the space owner as issuer for this ability, and refuses any delegation with parents that carries atinycloud.policy/*ability (policy-register-grant-must-be-parentless; the check runs after main's key-delete refusal and before the parent-based authorization).Properties
[nbf, exp). A root that expires after the grant is refused (policy-root-outlives-register-grant) in both modes.register_grantin memory only. Rollback is the previous image with no database step.Tests
owner_authority_tests.rs, on SQLite and on PostgreSQL (CI-only): a register grant authorizes the owner for its template; a grant on another template digest does not; a revoked grant does not; a root that outlives the grant is refused in both modes; the authority ends with the grant; re-classification against a remaining grant (background and backfill); a delegation with parents carrying atinycloud.policy/*ability is refused.child_policy_grant_is_refused_before_parent_check(core,models/delegation.rs) pins the policy code for a child delegation that has no other violation.The closure check of rule 4 (
closure == {D}) is a second line behind the core rule above: no stored delegation with parents can carry the register ability, so no test reaches it without writing rows directly.Verification
At this head, on SQLite:
cargo fmt --all -- --check;cargo clippy --workspace --all-targetsandcargo clippy -p tinycloud-core --features duckdb --all-targets, both withRUSTFLAGS=-Dwarnings;node scripts/gen-capabilities.mjs --check(the capability registry files are regenerated); and every test binary oftinycloud-core,tinycloud-nodeandtinycloud-authpass, except the threestartup_identitycases (the host has a dstack socket, so the node binary refuses to create an identity) and the threeaccount_alias_tests, which time out when other jobs share the host and pass when thetinycloud-nodelib tests run alone. PostgreSQL-backed tests run in CI.Details: TC-1718