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 #99Auth

Hackathon/amit auth delegation

DelegatableAuth Plugin Problem 04

Author

Status
In review
Opened on
Jul 8
Branch
hackathon/amit-auth-delegation

Description

The pitch.

DelegatableAuth Plugin Problem 04

Adds HMAC-chain delegation and prefix-trie cascading revocation to Nanda Town's auth layer. The reference jwt_auth plugin issues flat tokens with no delegation, no scope monotonicity, and no audience enforcement.

Key features:
- delegate() creates constrained child tokens with an HMAC chain proving ancestry
- Prefix-trie revocation: revoking "alice" cascades to all "alice.*" delegates
- Scope monotonicity: delegates can't grant scopes they don't own
- Audience enforcement: verify requires resource_id to match aud
- 3 adversarial validators proving jwt_auth fails all three attacks while DelegatableAuth blocks them
DOD: 820 tests pass, ruff/pyright clean, scenario YAML included.

Try it

Open PR on GitHubView diff

Checkout locally

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