Repository navigation
feat(TC-821): owner exact-CID revoke grants and canonical CID targets - #357
Merged
Merged
Conversation
Contributor
Author
|
REQUEST_CHANGES: see TC-821 |
sequence_spaces and event_spaces resolve each revocation's signed target through revocation::target_for_cid before the event_order lookup, so a revocation naming an unstored canonical CID takes the space sequence lock and appends to event_order like one naming the stored row. target_for_cid picks the lowest stored alias ID deterministically.
Contributor
Author
|
APPROVE: see TC-821 (reviewed exact head 794d101) |
Contributor
Author
This was referenced Oct 19, 2026
samgbafa
changed the base branch from
skgbafa/tc-1436-revocation-authz
to
main
October 19, 2026 13:52
Contributor
Author
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.
Description
Owner exact-CID revoke grants and canonical CID targets. This PR is stacked on #353 (base
skgbafa/tc-1436-revocation-authz) and follows its revoker rule.urn:cid:<target>revoke grant./delegateadmits a parentless grant whose non-root capabilities are alltinycloud.delegation/revokeon exactlyurn:cid:<target>, when the stored target's abilities name a space the signer owns (revocation::owner_controls_target, used indelegation.rsvalidate).Cannot find parent delegation.packages/cli/src/lib/revoke-delegation.ts:102-105.revocation::target_for_cidresolves the stored historical encoding. The signed CID is kept as signed, and authorization and the revocation row use the stored delegation.target_conditionalso matches the aliascanonicalcolumn.control_proof_decisioncompares canonical identities, not resource strings. Space-scoped controls are unchanged;historical_alias_targets_cannot_widen_a_space_scoped_revoke_controlstill passes.The grantor rule from #353 applies at use time: a control grant authorizes only when its grantor is the target's delegator or the owner of a space the target covers.
Commits:
fdbe687adds the tests alone; on1338d4f(fix(TC-1436): tighten revocation authorization #353) fourhistorical_cacao_revocationtests andowner_activates_a_parentless_exact_cid_revoke_grantfail.248f419makes the change.siwe_issuer_identity::status_signed_invocation_cannot_revoke_but_revoke_signed_invocation_canpreviously expected 404 for a canonical CID; it now expects the resolved status. Its revoke assertions are unchanged.5c8175caddssiwe_issuer_identity::canonical_cid_revocations_are_sequenced_like_raw_ones. For both the owner-direct and the exact-CID grant path, a revocation naming the unstored canonical CID must append exactly oneevent_orderrow, in the target's space, at the same position as the raw-CID revocation. On248f419it fails on both paths (the event count does not change).794d101makessequence_spacesandevent_spacesresolve each revocation target throughrevocation::target_for_cidbefore theevent_orderlookup.target_for_cidnow picks the lowest stored alias ID deterministically.Supersedes the remaining behaviours of #297.
Linear: TC-821 (TC-1436).
Type
Diligence Checklist
historical_cacao_revocation(owner CID control across historical encodings, unstored canonical status, owner direct revoke of an unstored canonical CID, control on canonical revoking raw and the reverse),revocation_scope(owner activation and use, plus refusal for unrelated signer, target delegatee, re-share delegatee, intermediate delegator, unknown target and target without abilities)cargo clippy --workspace --all-targetswith-Dwarnings)Local verification:
cargo test --workspace; Postgres tests skip withoutTINYCLOUD_TEST_POSTGRES_URL.test/m1-realdata-e2epasses.grantRuntimePermissionsfor{service: "tinycloud.delegation", space: "urn:cid:<cid>", actions: ["tinycloud.delegation/revoke"]}, thendelegationManager.revoke(cid, { authorityCid }), as inensureDelegationAuthorityfor local-key profiles.1338d4f: refused,RAW_RECAP_RESOURCE_UNSUPPORTED: The host cannot activate a root raw-CID revoke authority without a parent delegation.{"revoked":true}, and the delegate's read then fails withAUTH_UNAUTHORIZED.