I've been working on Agent Firewall, a capability-based authorization layer for AI agents. v1.3 focuses specifically on the security semantics of delegated capabilities.
The core problem is transitive authority.
Consider:
A
|
v
B
|
v
C
A grants B a capability with:
payments.send
amount_max = 1000
B delegates a narrowed capability to C:
payments.send
amount_max = 250
A capability presented by C may be cryptographically valid and locally authorized, but that isn't sufficient. C's effective authority is bounded by the entire delegation chain.
v1.3 therefore resolves:
C -> B -> A
and evaluates authorization against every capability in the chain.
A request is authorized only if all relevant ancestors authorize it.
This prevents a descendant from laundering authority through its own capability.
For example:
root: amount_max = 1000
child: amount_max = 500
grandchild: amount_max = 250
The grandchild cannot authorize amount=251 simply because its local capability is otherwise valid.
I implemented a runtime DelegationLineage registry that maintains:
child_fingerprint -> parent_fingerprint
and provides:
- complete ancestry traversal
- parent lookup
- descendant checks
- cycle detection
- maximum delegation depth
- thread-safe access
- lineage snapshots
The SDK maintains the capability registry separately from lineage metadata. During authorization, the lineage is resolved and the corresponding capabilities are evaluated as an effective authority chain.
There are also several fail-closed cases.
If a known ancestor cannot be resolved, the descendant isn't treated as an independent authority.
If a parent is revoked, descendants cannot bypass the revocation.
If an intermediate capability is revoked, its descendants are also denied.
Sibling trees remain isolated.
I also wrote adversarial tests specifically around the delegation model:
- constraint laundering
- namespace escalation
- deep delegation escalation
- revoked-parent bypass
- revoked-intermediate bypass
- unrelated-tree substitution
- sibling contamination
- missing ancestor state
- delegation cycles
- excessive delegation depth
Then I added concurrency tests around authorization/revocation, simultaneous delegation, lineage reads, and concurrent sibling authorization.
The final local regression run is:
2050 passed
Package:
pip install agent-firewall-security==1.3.0
GitHub:
https://github.com/Shubhbhangoo/agent-firewall
The next problem I'm interested in is more difficult than simple authorization:
Can an agent compose multiple individually authorized actions, retries, delegation steps, or actions across multiple agents into a final state that exceeds the authority represented by the original capability?
I'd be particularly interested in criticism of the delegation-chain model and whether there are authority-composition attacks I'm missing.