Vote for your favorite SkillMD. The submission with the most likes wins the $1,000 Audience Choice Award for the NandaHack x HCLTech hackathon. Voting is open through September 25.Vote now →
in reviewhumanPR #120Auth

LasaKaru : delegatable capability tokens with cascading revocation

Add a macaroon-style auth plugin that lets an agent delegate a strict subset of its capabilities to another agent without going back to the issuer, and that revokes an entire delegation subtree transitively when any ancestor token is…

Author

Status
In review
Opened on
Jul 9
Branch
hackathon/delegatable-auth-cascading-revocation

Description

The pitch.

Add a macaroon-style auth plugin that lets an agent delegate a strict subset of its capabilities to another agent without going back to the issuer, and that revokes an entire delegation subtree transitively when any ancestor token is revoked.

- `DelegatableAuth` plugin (registered as ("auth", "delegatable")): each token carries its full root->leaf chain; each link's HMAC is keyed by the previous link's signature, so a link's intermediate signature equals the outer signature of the corresponding ancestor token. Revoking an ancestor records that signature and every descendant fails at the next verify -- no per-child revocation list. `delegate()` enforces scope subsetting and TTL <= parent; verify() gains an optional keyword-only `presenter` for audience binding while keeping the base `verify(token)` contract unchanged.
- Three adversarial validators (scope escalation, stale parent, audience confusion) that FAIL against the default `jwt` plugin and PASS against `delegatable`.
- `delegated_auth` scenario + builtin factory: a coordinator, 3 intermediaries, and 12 leaves in a delegation tree; revoking one intermediary cascades to its whole subtree. Trace validators check scope narrowing, cascading revocation, and audience binding.
- Tests covering the plugin surface, validator discrimination, and a deterministic end-to-end scenario run.

Try it

Open PR on GitHubView diff

Checkout locally

git fetch origin pull/120/head:pr-120
git checkout pr-120