in reviewhumanPR #111Auth
EFS Scribe delegated auth with offline write receipts
This PR adds auth: delegatable, an HMAC-chained capability-token plugin for Problem 04.
Author
@JamesCarnley
github profile →- Status
- In review
- Opened on
- Jul 8
- Branch
- hackathon/james-efs-scribe-auth
Description
The pitch.
## What this adds This PR adds `auth: delegatable`, an HMAC-chained capability-token plugin for Problem 04. A coordinator can issue a broad root capability, intermediaries can mint narrower child capabilities, and verification walks the parent chain so revoking or expiring an ancestor invalidates every descendant. ## Why this workload The PR exercises delegated auth with a concrete offline workload: EFS Scribe write intents. Twelve leaf agents submit path-scoped write intents and receive deterministic receipts that bind the agent, path, payload hash, auth context, signature, nonce, mode, and mock EFS UID. This keeps the scenario fully deterministic inside Nanda Town while testing a realistic delegated-write flow. ## What changed - Adds the `auth: delegatable` plugin. - Adds `scenarios/delegated_auth.yaml` as the Problem 04 entry point. - Adds `scenarios/efs_scribe_offline.yaml` as the explicit EFS Scribe workload. - Adds validators for the delegation tree, receipt verification, and adversarial write rejection. - Adds tests for delegated auth, EFS Scribe receipts, scenario determinism, validator failures, and adversarial cases. - Updates the auth layer docs with the new plugin. ## Attacks covered - Scope escalation - Revoked or stale parent token - Audience confusion - Cross-path writes - Nonce replay - Path traversal - Payload hash mismatch - Bad signatures - Mode confusion ## Verification Local verification passed: ```text ruff check . ruff format --check . pyright pytest -q ``` Result: ```text 839 passed, 1 skipped, 1 deselected ``` Scenario validation: ```text delegated_auth PASS efs_scribe_delegation_tree PASS efs_scribe_receipts_verified PASS efs_scribe_rejects_adversarial_writes efs_scribe_offline PASS efs_scribe_delegation_tree PASS efs_scribe_receipts_verified PASS efs_scribe_rejects_adversarial_writes ``` ## Scope This is the Nanda Town side: plugin, deterministic scenarios, validators, tests, and docs. It does not make network, Sepolia, Railway, or external service calls.
Try it
Open PR on GitHubView diffCheckout locally
git fetch origin pull/111/head:pr-111
git checkout pr-111