Skip to content

BuildNot yet confirmed elsewhere1 publisher3 min readPublished

API keys are not an authorisation model for an agent that can move money

A single developer's capability layer for AI agents is pre-1.0 and self-reviewed. The primitive it argues for is still the floor: scoped, signed, dated, revocable, recorded.

The Engineer · Build desk

How we use AISend a correction

Illustration accompanying API keys are not an authorisation model for an agent that can move money
Generated illustration

What happened

  • A developer published Agent Firewall, a capability layer that gives each AI agent cryptographically signed, narrow permissions instead of one key that opens everything.
  • Its sample code issues a finance agent a payments.send capability bounded by a spend ceiling and a fixed expiry date.
  • Each capability carries eight explicit states, including replayed and revoked, held as queryable security state rather than log lines.
  • Version 0.8 moves the revocation registry and lifecycle history into SQLite so both survive a restart.
  • Incoming HTTP requests and Model Context Protocol tool calls are mapped to capability namespaces and checked before the call executes.

Compiled by The EngineerSomething wrong?How this is made

Why it matters

  • constraint With an API key there is nothing to narrow and no date to shorten, so the only response to a suspected leak is rotating a credential every consumer shares.
  • capability One agent's authority can be killed mid-incident, and its replayed requests refused, without disturbing the other agents on the same tool surface.
  • decision Anyone who wants this in production picks between depending on a library whose API is not frozen until v1.0 and building the same properties into their own gateway.
  • contradiction The design case is strong while the evidence for the code is entirely the author's own, which points to adopting the model now and the package later.

The arithmetic is left implicit in the post, so here it is. The example capability lets finance-agent send payments up to a ceiling of 100, valid until 30 August 2026 [5]. That agent can hand a sub-agent the same payments.send capability narrowed to 50 [9], which caps a compromised sub-agent at half the parent's per-payment authority [14]. Set that against the two failure cases the post opens on: a leaked finance key that drains the account, and a compromised code-review agent pushing malicious commits [c2b]. In both, the loss is bounded by the resource rather than by the token. Attenuation is the property that changes that number, and it is the one an API key has no syntax for [3].

The second thing worth reading closely is where the risk moves rather than disappears. The SDK's issue call takes a private_key argument, and the post says nothing about where that key lives or how it is rotated [6]. Every capability the system will ever honour is minted with it. The operating systems work the author draws on, where permissions are unforgeable tokens that can be delegated and attenuated [12], treats custody of the root as somebody else's chapter. In deployment it becomes an environment variable on whichever box does issuance, and at that point the signing key carries the blast radius the API key used to have. Better, because minting is now a recorded act, but not smaller.

Third, the expiry in the example is an absolute timestamp, not a lifetime [5]. A capability issued in a hurry and forgotten is good until that date. Time-bound by default only holds if callers pass short dates, and the sample code invites the opposite habit.

The implementation deserves cautious reading. The author reports 1,438 passing tests including adversarial regression coverage, plus architecture docs and a threat model [1], and describes himself as a recent CS graduate who was building coursework COVID detection models six months earlier [11]. A test count is evidence of care, not of correctness. The failure mode that would hurt here is not a signature bug but a revocation store that answers stale while a tool call is in flight, and nothing visible from outside the repo speaks to that.

None of this argues against the primitive. If an agent can move money or write to a repository, the object it presents should name the agent, the action, the ceiling and the deadline, and it should be killable on its own with a record of what it did. That is a short specification, and it is implementable against a gateway you already run if you would rather not take a pre-1.0 dependency at your authorisation boundary. The thing not to keep doing is handing an autonomous process the same static key you gave your CI job and calling the result access control [3].

What to watch

  • Whether the v1.0 API freeze keeps delegation and attenuation intact, and whether its docs finally specify custody and rotation for the signing key.
  • Any independent review of the threat model or the adversarial test suite, or a named production deployment putting real payment volume behind it.
  • Whether MCP tool hosts add per-call authorisation checks natively, which would make a separate boundary layer redundant for that path.

Clarity's read

What the record supports and how the coverage leans. The claims behind it follow.

Reality

Evidence24
Adoption7
Hype gap+28
Incentives74
Confidence58
Why these scores

Claim ledger

Ranked by verification strength, evidence, and original report placement.

  1. [1]

    The author reports 1,438 passing tests including adversarial regression coverage, plus architecture docs and a threat model, and says he shipped v0.8 with SQLite-backed lifecycle persistence.

    ReportedSupportedSource: Shubh Bhangoo, dev.to2 sources— create a free account to open themView cited source
  2. [2]

    A dev.to post by Shubh Bhangoo describes Agent Firewall, a capability-based security layer for AI agents that issues fine-grained, cryptographically signed permissions with full lifecycle tracking, instead of a key that unlocks everything.

    ReportedSupportedSource: Shubh Bhangoo, writing on dev.toView cited source
  3. [3]

    The post argues that most people authorise agents with API keys, and that an API key is binary access: no built-in expiration, cannot be narrowed, no audit trail, revocable only wholesale.

    ReportedSupportedSource: Shubh Bhangoo, dev.toView cited source

Sources

1 independent publisher whose own reporting we read for this story.

  1. dev.to

    1 article · August 22, 2026

    I Built a Capability-Based Security Layer for AI Agents — Here's Why It Matters

Share your take

Let Clarity write the post for you.

Signed-in readers get a short post drafted on this story in the register they choose — narrative, analytical, or a direct position — editable to the last word before it goes anywhere. The share buttons at the top of this story work without an account.

Topics and entities

Follow any of these and your For You feed starts watching them — no settings page required.

Topics

Loading related stories