Skip to content

Allow a delegator to revoke its delegation with a proof that grants no revoke - #443

Merged
samgbafa merged 8 commits into
mainfrom
tc-721-session-revoke
Oct 27, 2026
Merged

samgbafa merged 8 commits into
mainfrom
tc-721-session-revoke

Conversation

@samgbafa

@samgbafa samgbafa commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Session-signed revocation of a sub-delegation failed when the session delegation was carried as a proof granting no revoke ability.

Change: a valid proof with no grant for the target now yields ControlProofDecision::Ungranted, which adds no authority and falls back to "revoker == delegator". Invalid, expired and revoked proofs remain Denied. delegation_status does not widen.

Tests: unit tests in the revocation module and route tests in revocation_scope. Three refusal tests, each returning 403: the recipient presents the target itself as its proof; the delegator presents an expired proof (the proofless form still works); the space owner presents a valid grantless proof for a delegation it did not issue. Existing assertions are unchanged.

Details: TC-2132

dryrun added 2 commits October 24, 2026 20:34
A valid proof that carries no revoke grant for the target was treated as
a denial, so a delegator could not revoke a sub-delegation it issued when
its own delegation arrived as that proof. A valid proof with no grant now
adds no authority and leaves the signer's party authority in force.
Invalid and revoked proofs are still refused.

Details: TC-721
Cover the share-link shape: a session grant carrying notes/ and kv/get,
read-OK before revoke, read-refused after, owner still reads. Add core
tests for the Scoped fallthrough when a proof's space does not cover the
target, and a status-path test for the Ungranted arm.

Details: TC-721
@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-721 (reviewed exact head 1ad7ba6)

@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-721 (reviewed exact head 49b30f6)

@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-721 (reviewed exact head ac7815e)
This head is a plain merge of main 9f889ae into the approved head 49b30f6; the non-CHANGELOG patch-id is unchanged (fc2478f0...), behind main 0.

@samgbafa samgbafa changed the title Allow delegator to revoke sub-delegation when session proof grants no revoke Allow a delegator to revoke its delegation with a proof that grants no revoke Oct 26, 2026
@samgbafa
samgbafa marked this pull request as ready for review October 26, 2026 22:50
@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-2132 (reviewed exact head 1197ecb)
Source change is 3 lines in db.rs plus the revocation.rs decision: a valid proof with no revoke scope (and a Scoped proof that does not cover the target) falls back to the signer being the delegator of the target, which the signer already holds without a proof; revoked or expired proofs stay Denied; delegation_status does not widen; the delegatee and a space owner presenting a grantless proof stay refused. Tests are additive (no existing assertion edited), including the three refusal cases required by the design gate (recipient presenting the target as its proof, delegator with an expired proof, owner with a grantless proof). 0 behind main (1a69eb6). CI pending; Amos merges on green.

@samgbafa

Copy link
Copy Markdown
Contributor Author

APPROVE: see TC-2132 (reviewed exact head 3202ffc)
Merge-up of main (4d21ee9, release 1.25.8) into the branch approved at 1197ecb: the non-CHANGELOG patch-id is unchanged (4fc2230fd89ff270 at both heads; git diff -- :!CHANGELOG.md | git patch-id --stable); only CHANGELOG.md differs. 0 behind main. The earlier review applies. Ships in 1.25.9 with #468.

@samgbafa
samgbafa merged commit 1212904 into main Oct 27, 2026
22 checks passed
This was referenced Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant