Skip to content
Smartplane

RBAC vs ABAC for AI Agents

RBAC vs ABAC for AI agents: roles decide which tools an agent can see, and attributes decide which calls may run.

By Smartplane team

Back to blog

RBAC vs ABAC for AI agents is a choice between two questions, and a production agent needs an answer to both. Role-based access control decides which tools an identity may see. Attribute-based access control decides whether one call, with these arguments, in this situation, may run. A role that can refund any amount, and a rule that never looks at the amount, each leave a hole.

What does RBAC decide?

Role-based access control assigns privileges to roles, then assigns people to those roles. The NIST model for RBAC, adopted as ANSI/INCITS 359-2004 and revised as INCITS 359-2012, states it directly: each user is assigned one or more roles, and each role is assigned the privileges for that job. Administration is deciding which operations a job must perform, and putting people in the role.

For an agent, the object is a tool. The user is the member who signed in, or a machine identity such as a CI job. Support may include orders.read and stripe.refund. Platform may include github.write. Move someone from Support to Platform and the tool list moves with the membership. Remove the membership when they leave and the tools go with it.

That is the first question in a security review: which agents can touch production data, and who gave them that access? How to secure AI agent access in your company starts there. A laptop of one-off MCP servers cannot answer it. A role model can, if every call presents that membership. People already sit in jobs in Okta, Entra ID, or Google Workspace, so an agent that acts for a member should follow that directory over SSO and SCIM.

The decision stops at the bundle. Everyone in the role may call every tool in it, with every argument the tool accepts. The NIST model can keep mutually exclusive roles apart, so one person is kept out of two jobs that should stay separate. A refund amount and a git ref sit outside the bundle. Who may change the bundle is a separate decision: Admin RBAC vs agent permissions separates registering a server, editing a policy, or viewing audit from the tools that person's agent may call.

What does ABAC decide?

Attribute-based access control evaluates the request. NIST SP 800-162 defines ABAC as authorization determined by attributes of the subject, the object, the operation, and in some cases the environment, checked against policy. The subject might be a Support member on a contractor account. The object might be the Q3 reports folder. The operation might be delete. The environment might be the time, or an approval from Finance.

A rule in that shape can say what a role bundle cannot:

  • Deny deleting any file under /reports/q3.
  • Refunds over $500 need Finance.
  • Nobody force-pushes to main.

Those attributes have to be present, and trusted, when the call arrives. A rule that names a folder needs the folder on the call, or a pin that ties "the Q3 reports" to the page id the tool actually sent. Take identity from the sign-in and the resource from the tool and the arguments. The model's account of what it meant to do is a claim, and a claim is a weak attribute.

If the amount is missing, or the check does not answer, you still owe a decision. For an agent that will retry, deny. A check that cannot run must stay a denial, or the gap becomes a bypass. How to write AI agent guardrails that fail closed is that requirement on the rule.

How do RBAC and ABAC compare?

RBACABAC
QuestionWhich tools may this identity use?May this call run?
InputsRoles assigned to the callerAttributes of the caller, the resource, the action, and the environment
A typical controlSupport may call the refund toolRefunds over $500 need Finance
What you changeMembership, or the tools on the roleThe rule
What you reviewWho is in the role, and what the role grantsWhether the rule still matches the business, on real calls
Where it strainsThe role grows until it can do too muchRules pile up, or a missing attribute is treated as allow
What the log should showThe identity, the role, and the toolThe rule, the attributes that mattered, and the decision

RBAC is the stable map. It changes when jobs change. ABAC is the judgment on one call. It changes when the business rule changes, and it has to be tested against calls you have actually seen.

You can store the role as one more attribute and evaluate every request in a single policy engine. Keep a page of roles and grants anyway. "Which agents can reach payroll?" is a question that page answers directly, even when the call-time check is attribute-based.

Where does a role stop being enough?

OWASP LLM06:2025, Excessive Agency, names three excesses: functionality, permissions, and autonomy. The system offers tools the job does not need, those tools can do more than the job needs, and the model may invoke them with no further check. The triggers include a confused model and prompt injection, from a user, a document, or another agent. The damage still depends on what the agent was allowed to call.

A role designed for a person assumes the person reads the screen. An agent in that role will call the refund tool because a ticket, a page, or a tool description told it to. LLM01:2025, Prompt Injection, is why untrusted text can choose the next action, and why the impact scales with the agency you already granted. The role check has passed. The arguments are the part it never saw.

The role is the production credential. Support can refund, read orders, and read customer mail, because a person sometimes needs all three. The agent needs one of those, on one record. OWASP's excessive-permissions case is a reader connected as an account that can also update and delete.

The shared bot role. One "agent" role collects every tool any team has requested. It is easy to assign and hard to defend in a review. Excessive functionality includes extensions that were tried once and left in place.

The stale membership. The contractor role ended on Friday. The token in an editor config did not. A role holds only if the next call presents a membership you can revoke.

Keep mutually exclusive roles. The person who can approve a refund belongs in a different role from the identity that requests it. The NIST model treats that separation as part of RBAC. The role still misses a refund of $4,000.

Where does an attribute policy go wrong?

The field names differ. A payments tool might send amount, or it might send value. A rule written for one name misses the other. When an unmatched call is allowed, the refund proceeds. Write the rule against the fields the tool sends, and deny the call when a required field is absent.

The sentence is too vague to test. "Be careful with reports" is a wish. "Deny deleting any file under /reports/q3" is a rule. Name a call that should match and a call that should pass, and run both before you block anyone.

Only the author can read it. An open-ended attribute language turns into a private dialect. Prefer a rule a reviewer would sign: the action, the resource, and the condition.

The attribute is a claim from the model. "The user said they are an admin" is the model talking. Clocks, identity, and resource ids have to come from systems you operate.

A long rule list also answers "who can touch production" slowly. Keep an explicit grant list for that question. Use attributes for the calls the grant still allows.

How do you use both for agents?

Use the role when the agent lists tools. Use the attributes when it asks to run one.

At list time, return only the tools granted to that member, team, role, or project. A tool the model cannot see is a tool it cannot choose, including after a prompt injection. OWASP's mitigations for excessive agency start with that cut: fewer extensions, narrower behavior inside each one, and fewer permissions behind them. A database that answers reads, unless you grant writes, is the same cut on one resource. A grant with an end date ends temporary power on the day you named.

At call time, evaluate the arguments. The grant said this identity may call stripe.refund. The rule says a refund over $500 needs Finance. The grant is the RBAC decision. The rule is the ABAC decision, including when you write the rule as a sentence.

A sketch of the two layers:

roles:
  support:
    tools: [orders.read, stripe.refund]
  platform:
    tools: [github.write]

rules:
  - name: refunds-over-500
    tool: stripe.refund
    when: amount > 500
    effect: require-approval
    approver: finance
  - name: no-force-push-main
    tool: github.push
    when: force == true and ref == "refs/heads/main"
    effect: deny

The sketch makes the split visible on one page. Smartplane stores the first part as a grant: a tool, database, API, secret, or skill, given to a person, a team, a role, or a project, down to a single tool, with an end date. It stores the second part as a guard rule in plain English. "Refunds over $500 need Finance." "Nobody force-pushes to main."

The check runs before the call is forwarded. It sees the tool, the arguments, and the member. Secret values used to run the call stay out of the check. A new rule starts in monitor mode, so matches are allowed and flagged while you look for false positives on real traffic. When the rule behaves, switch it to enforce. An enforcing rule fails closed. If the check is unavailable, or the result is unexpected, the action is denied and the denial is logged with the reason.

Hold the calls that are legitimate only sometimes. Someone in the right role approves, and the requester cannot approve their own request. A refund of $40 can follow the grant. A refund of $4,000 waits.

An end date sits on the boundary of the two models. "Platform may write to GitHub until 1 October" is a role grant plus a time attribute. On 1 October the grant ends. Use a date for access that was always temporary. Use a guard rule when the decision depends on the arguments.

The MCP tools specification requires servers to implement access controls, and it asks clients to log tool use. You can meet that with either model. The deployment that holds up uses both. The protocol's security principles also say to treat tool descriptions as untrusted unless they come from a server you trust. A narrow grant limits what an untrusted description can point the model at. A call-time rule limits what the remaining tools can do. How to secure an MCP server walks through the server side of that work.

What should you record?

Record the decision in a form someone else can re-check. A grant change should show who changed it, which identity, which tool, which role or team, and the end date. A call should show the tool, whether it was allowed, blocked, or held, the rule that matched, and the member. An append-only log, where each event carries the hash of the event before it, turns a quiet edit into a broken chain. Secret values stay out of the log. A delivery can record which secret, to whom, and when.

A snapshot of memberships, grants, and live machine tokens is the role evidence. The decisions in the log are the attribute evidence. Bring both to a review. People decide on access held by someone else, and a revoke applies at once.

Offboarding is the sharper test. Deactivate the person in the directory and one path should end the membership, the tokens, the grants, the teams, and the personal connected accounts. The next call is refused and logged. Revocation lives on the grant and the token.

Frequently asked questions

Is ABAC stricter than RBAC?

Strictness belongs to the policy you wrote. A role with one read-only tool is stricter than an attribute rule that allows any call it fails to parse. Keep the grant narrow, and deny when an attribute is missing or the check does not answer.

Should an agent have its own role?

Give a CI agent a grant that matches the pipeline, separate from the engineer who created the token. Deploying and developing are different sets of tools. Use a machine token that is shown once, stored as a hash, and set to expire, so the pipeline's credential has its own name, scope, and revoke.

Can a guard rule replace the grant?

Keep both. A rule blocks a call the model was already allowed to attempt. The grant decides whether that tool was offered. Excessive functionality includes tools that are simply present. Take those off the list, and keep the rule for the arguments of the tools that remain.

Do expiring grants count as ABAC?

An end date is one environment attribute on a grant that is otherwise role-shaped. NIST's ABAC definition includes environment conditions, so the date qualifies as an attribute. It still says nothing about the arguments. Keep the date for access that should die on a day. Keep the rule for the call.

What do auditors ask for?

Who can reach which tool, how that access was granted and removed, and a record of the calls. Roles and grants answer the first two. Rules and the log answer the third. Bring a snapshot of memberships and grants, and a hash-chained export of the decisions.

Where do you put this?

Put the role decision where the tool list is built, and the attribute decision where the call is about to run. Repeating that on every laptop, for every MCP server, is how long-lived keys spread and how revocation gets missed. One MCP endpoint can hold both. The agent connects once, grants decide what that member's agent is offered, and guard rules run before the action.

Smartplane is that control plane. You register tools, MCP servers, skills, databases, and APIs once, and grant them to a person, a team, a role, or a project. You write the rule in plain English, watch it in monitor mode, then enforce it so a failed check denies the call. Approvals cover the actions that are sometimes right, and nobody approves their own request. Calls, denials, approvals, and grant changes land on an append-only, hash-chained log. Start with the grant you can explain in a review. Add the rule for the call that grant still allows. The security page lists the controls, and the product is the one URL they sit behind.