If you’ve ever given an AI agent access to GitHub, Slack, your cloud account, or an internal MCP server, you’ve probably hit the same uncomfortable question: who exactly is making this request?
Not “which app.” Not “which team.”
Which agent instance, acting under whose authority, with what permissions, and for how long?
That question gets urgent the moment agents stop being toy demos and start doing real work: opening PRs, querying production data, rotating secrets, or triggering deployments. At that point, a bearer token stuffed into an environment variable stops looking like “developer velocity” and starts looking like an incident report waiting to happen.
The core problem is simple: autonomous or semi-autonomous agents need identity, not just access. And once you give them identity, you also need RBAC to constrain what they can do.
Why “just use an API key” breaks down
A lot of current agent systems still rely on one of these patterns:
- a shared API key for all agents
- a long-lived service account token
- a human user’s personal credentials reused by an agent
- broad OAuth scopes with no downstream policy checks
These approaches work for prototypes. They fail in production for a few reasons:
1. No per-agent accountability
If five agents share one token, your audit trail is basically useless.
You can see that something called your API. You can’t reliably answer:
- Which agent did it?
- Was it acting on behalf of a user?
- Was it delegated by another agent?
- Was the action approved?
- Was the request expected?
2. No safe delegation
Real agent systems are multi-step.
A planning agent may delegate a code-change task to a coding agent, which may call a testing agent, which may request deployment approval. Without explicit delegation chains, every hop either inherits too much privilege or loses context entirely.
3. No policy boundary
Agents are probabilistic software. Even good ones make surprising choices.
That means “this token can do everything the workflow might ever need” is exactly the wrong security model. What you want is:
- least privilege
- task-scoped permissions
- time-bound credentials
- approval gates for sensitive actions
That’s where RBAC starts to matter.
Why cryptographic identity is the missing primitive
For sovereign agents—agents that can act, coordinate, and make bounded decisions independently—you need a way to represent them as first-class actors.
A cryptographic identity gives you that.
In practice, that usually means an agent has a public/private keypair, signs requests, and can be issued credentials or tokens tied to that identity. Ed25519 is a common fit here because it’s fast, modern, and straightforward to use.
Once an agent has a cryptographic identity, you can build the rest of the control plane around it:
- authenticate the specific agent instance
- issue short-lived tokens
- attach roles and policy constraints
- support delegated authority
- log exactly who did what
- revoke or rotate credentials cleanly
Without cryptographic identity, RBAC is mushy. You’re assigning permissions to abstractions that aren’t strongly bound to the caller.
With cryptographic identity, RBAC becomes enforceable.
What RBAC actually gives you for agents
RBAC is not a complete authorization strategy by itself, but it’s still a very practical foundation.
For AI agents, RBAC lets you define things like:
-
research-agentcan read docs and query approved knowledge bases -
coding-agentcan read/write in a specific repo and open PRs -
release-agentcan create release candidates but not deploy to prod -
ops-agentcan inspect metrics but needs approval for remediation actions
That matters because agent workflows often span multiple tools with very different risk profiles.
An agent that can summarize Jira tickets probably shouldn’t also be able to:
- read production secrets
- approve invoices
- terminate cloud instances
- merge directly to
main
RBAC gives you a clean first cut at separating those duties.
If your environment is more complex, policy engines like OPA are often the right next step. RBAC handles broad permission grouping well; OPA helps when you need context-aware decisions like:
- only allow deploys during business hours
- only allow writes to repos owned by the requesting team
- require approval if the target environment is production
- deny access if the delegation chain exceeds a certain depth
It’s not RBAC or policy. In practice, it’s often RBAC plus policy.
A simple model: identity + delegation + RBAC
Here’s a practical way to think about agent authorization:
- Each agent gets a cryptographic identity
- The platform issues a short-lived token bound to that identity
- The token includes roles or claims
- Delegation is explicit and traceable
- Sensitive actions go through policy and approval checks
For example, imagine a planning agent delegates a code fix to a coding agent.
The coding agent should not become “whoever the human user is.” It should become:
- itself
- acting on behalf of a user or upstream agent
- with a limited delegated scope
- for a limited amount of time
That’s the difference between controlled autonomy and credential laundering.
Example: signing an agent request
Here’s a minimal Python example using Ed25519 to sign a request payload:
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PrivateKey
import base64
import json
private_key = Ed25519PrivateKey.generate()
public_key = private_key.public_key()
payload = {
"agent_id": "agent:codefixer-17",
"action": "repo.pull_request.create",
"repo": "acme/payment-service",
"timestamp": 1711645200
}
message = json.dumps(payload, separators=(",", ":"), sort_keys=True).encode()
signature = private_key.sign(message)
print("payload:", payload)
print("signature:", base64.b64encode(signature).decode())
On the receiving side, you verify the signature against the registered public key for that agent identity before evaluating authorization.
That gives you strong proof that the request came from the expected agent, not just from “something that had a token.”
Example: RBAC check in policy
Whether you implement this in your app directly or with OPA, the check should be explicit.
Here’s a tiny Rego example:
package agentauthz
default allow := false
allow if {
input.agent.role == "coding-agent"
input.action == "repo.pull_request.create"
}
allow if {
input.agent.role == "research-agent"
input.action == "docs.read"
}
And an input document might look like:
{
"agent": {
"id": "agent:codefixer-17",
"role": "coding-agent"
},
"action": "repo.pull_request.create",
"resource": "acme/payment-service"
}
That’s intentionally simple, but the pattern scales well: authenticate first, then authorize based on role, resource, context, and delegation chain.
Getting started: a practical path
You do not need a giant platform migration to improve agent identity.
Here’s a good incremental path:
Step 1: Stop sharing credentials across agents
Even if you do nothing else, give each agent or agent class its own identity boundary.
If an agent can act independently, it should not be borrowing a human developer’s long-lived token.
Step 2: Use short-lived credentials
Issue credentials per session, task, or sprint rather than baking static secrets into agent runtimes.
This limits blast radius and makes revocation realistic.
Step 3: Define a small role model
Start with 3–5 roles, not 30.
For example:
readerresearch-agentcoding-agentrelease-agentadmin-approval-required
You can refine later. Early on, clarity beats granularity.
Step 4: Add delegation metadata
Track:
- who initiated the task
- which agent delegated to which other agent
- allowed scopes
- expiration
- approval requirements
Standards like RFC 8693 token exchange are useful here because they formalize delegation and actor chains.
Step 5: Put policy in one place
If your authorization logic is spread across ten tools and three prompt templates, you don’t have authorization—you have vibes.
Centralize policy evaluation where possible. For many teams, OPA is a strong choice. For teams building agent-heavy systems, platforms that combine cryptographic identity, delegation, audit logging, and policy can reduce a lot of glue code.
This is the area where tools like Authora Identity are useful: cryptographic agent identities, RBAC, delegation chains, MCP authorization, approval workflows, and audit logging are all problems you’ll otherwise end up rebuilding. But the important thing is the architecture, not the vendor: agents need first-class identity and enforceable authorization boundaries.
The bigger shift
We’re used to thinking about auth in terms of users and services.
Agents don’t fit cleanly into either bucket.
They are not humans, but they do act with delegated human intent.
They are not just backend services, but they do execute machine-speed operations across real systems.
That means they need their own security model.
Cryptographic identity gives agents a verifiable self.
RBAC gives them bounded authority.
Delegation and policy make multi-agent systems governable.
If you want sovereign agents, you need more than tool access. You need to know exactly who is acting, under what authority, and within what limits.
Otherwise, “agentic” quickly becomes another word for “unattributable root access.”
-- Authora team
This post was created with AI assistance.
Top comments (0)