Skip to content
Dashboard

RBAC vs ABAC for access control in apps and agents

Role-based access control (RBAC) grants permissions through assigned roles, such as support agent or release manager. Attribute-based access control (ABAC) uses a policy to check facts about who made the request, which record they want to access, and what they want to do with it. Use roles for stable job permissions and add attribute checks when access depends on the record or request.

For example, a support role can let someone edit tickets, while an attribute rule limits them to tickets in their region. Apply that same limit when an AI agent edits tickets for them.

Copy link to headingWhat are the key differences between RBAC and ABAC?

Both models authorize requests at runtime. With RBAC, a user's roles determine which permissions they can exercise. With ABAC, the decision can depend on values that vary between requests, such as a ticket's region or the user's current clearance.

Dimension

RBAC

ABAC

Granularity

Permissions grouped into roles

Policies can use attributes of the subject, resource, action, and environment

Growth

Role variants can multiply as access rules diverge

One policy can cover many cases that share the same conditions

Auditability

Review assignments, inherited roles, and role permissions

Review the policy and the attributes used for the decision

Performance

Depends on how role assignments and permissions are resolved

Looking up attributes can add latency if they aren't already available

Testing

Check role permissions, inheritance, and constraints

Test requests that should pass or fail, including requests with missing attributes

Copy link to headingHow does RBAC work?

With RBAC, an administrator assigns permissions to a role and assigns that role to users. An internal admin console might have administrator, operator, and read-only roles. A team can also reserve production deploys for a release role.

The National Institute of Standards and Technology (NIST) RBAC model also describes hierarchies and constraints. A hierarchy can let one role inherit another's permissions. A separation-of-duties constraint can prevent the same person from both requesting and approving a payment. Review both inherited access and direct assignments. Removing one role assignment leaves any permissions the user still gets from another role.

Watch for roles that differ by only one detail, such as editor-eu and editor-us. Region-specific roles can work for a handful of regions, but combining region, customer, and clearance can make the set of roles harder to maintain. Also check for old assignments when people change jobs.

Copy link to headingHow does ABAC work?

The NIST ABAC guide describes policies that evaluate attributes of the subject, the resource, and the requested action, and can also consider environmental conditions. Your app might check whether a user and a document are in the same region and whether the user's clearance is high enough for that document. The app can evaluate the policy locally or call a policy service.

In this example, an edit requires the editor role, a matching region, enough clearance, and a request during business hours. The pseudocode assumes sensitivity and clearance use the same ordered scale:

allow edit if
has_role(subject, "editor")
and resource.region == subject.region
and resource.sensitivity <= subject.clearance
and within_business_hours(request.time, subject.region)

Choose a trusted source for each attribute, such as your directory for a user's region and the application database for a document's classification. Define what happens when a value is missing or stale. For example, if the policy requires a clearance value and can't verify it, deny the edit rather than treating the check as optional.

You can also use an attribute check to limit users to records in their own tenant. Apply it to every relevant read and write. Test requests for records in the user's tenant and in another tenant. To prevent stale grants from persisting indefinitely, set an expiration on cached attributes or decisions, or invalidate the cache when access changes.

Copy link to headingHow do you choose between RBAC and ABAC?

Use RBAC when permissions align with stable responsibilities, as they might in an internal console with a few access levels. Add attribute checks when you keep creating versions of the same role for different customers or regions, or when access depends on a fact, such as a record's sensitivity.

To combine the two, use roles to define which actions a person may take. Then use attribute rules to narrow which records they can act on or when they can act.

Copy link to headingAdd attribute checks without widening access

  1. Inventory the existing grants: Choose one action and list the role variants, affected users, and exceptions.

  2. Define the replacement policy: Pair the editor role with the relevant attribute check. Include any existing exception you intend to keep.

  3. Compare decisions before enforcement: Run the new policy in log-only mode while the old policy continues to control access. Test for unintended grants and denials, including requests with missing attributes or for records in another tenant.

  4. Switch enforcement for a pilot group: Enforce the new check for that group, and verify that the old role grants can't bypass it. Keep a way to restore the old policy.

  5. Retire the old role variants: Remove them after verifying the new policy and assignments. For rare privileged tasks, consider just-in-time access with a defined expiration.

Copy link to headingHow should AI agents act on behalf of users?

When an agent acts on behalf of a user, grant it only the permissions it needs for the task, within the user's existing access. A shared account with broad permissions can allow an agent to fetch records that the user couldn't open directly. OWASP lists this kind of excessive permission under the Excessive Agency category.

Copy link to headingScope credentials to the user and the task

OAuth 2.0 Token Exchange (RFC 8693) is one way to request a credential for a downstream service. The request carries a subject token and can also carry an actor token. The authorization server decides whether to issue a token that identifies both the user and the agent. With delegation, the agent is identifiable as acting on behalf of the user. With impersonation, the issued token represents the user within the rights it grants, and the receiving service may not be able to distinguish the agent from the user.

Tell the authorization server which service the agent needs to call and request only the scopes the task requires. The server's policy and the receiving service's authorization checks determine what the agent can do. Exchanging a token alone doesn't enforce your application's record-level rules.

Copy link to headingLimit token lifetime and record what runs

Use short-lived credentials when supported, and require human approval before high-impact actions such as deleting records. Enforce that approval where the action runs. Log the initiating user, agent identity, requested action, and outcome where your system can verify them. Expiration limits how long the agent can use the token. Logging records what the agent did.

Copy link to headingHow does Vercel handle roles and per-user agent access?

Vercel roles govern who can manage projects and deploy code. Vercel Passport controls who can reach a protected deployment, and Vercel Connect can give an agent a token to act on a user's behalf in a third-party service. Your application still needs to enforce which records a user or agent can access and which actions it can perform.

Copy link to headingNarrow who can deploy each project

Vercel offers team roles on both Pro and Enterprise plans. Enterprise also offers project roles. Give a Contributor the Project Developer role on a Git project, for example, and they can create a production deployment by merging to that project's production branch. They can't manage production environment variables with that role. A Project Administrator can do both.

On Enterprise, Access Groups let you assign project roles to groups of team members. For example, you can grant Contributors the Project Developer role on one project and the Project Viewer role on another. Access Groups can't override team roles or take away permissions someone already has.

Copy link to headingKeep roles in sync with your identity provider

With Security Assertion Markup Language (SAML) single sign-on (SSO), you can require team members to authenticate through your identity provider to access Vercel team information. Enterprise includes SAML SSO, and Pro offers it as a paid add-on. To require SSO, turn on enforcement separately.

Directory Sync uses the System for Cross-domain Identity Management (SCIM) protocol to sync Enterprise team membership with your directory. You can map directory groups to Vercel team roles or Access Groups. When someone is removed from your synced directory, Directory Sync removes them from the Vercel team. The initial sync can overwrite existing roles, so ensure at least one team member retains the Owner role before you enable it.

Copy link to headingRequire sign-in for internal apps and agents

Vercel Passport is an Enterprise feature that uses your identity provider to authenticate visitors before they can reach a protected deployment. Your server code can read the visitor's verified identity to make its own access decisions.

When a visitor successfully authenticates to a Passport-protected project, Vercel records a passport-access-granted event in the Activity Log and Audit Logs. Record what your agent reads or changes separately.

Copy link to headingGive agents each user's own access to outside services

Vercel Connect is available on all plans. When a deployment authenticates with its Vercel deployment identity, Connect checks that the deployment's project and environment can use the connector before returning a provider credential.

If the connector supports user authorization, the user must grant access before Vercel Connect can return a token on their behalf. Request only the scopes or resources the task needs and the provider supports. For work that runs as the application, request an app token. It carries the permissions granted to the app or bot.

Copy link to headingMatch your access model to your apps and agents on Vercel

Use Vercel RBAC to manage team and project permissions. For internal apps and agents, decide who can sign in and what the agent can do on each user's behalf.

Vercel Connect is available on all plans. Vercel Passport, Audit Logs, Access Groups, and Directory Sync are available on Enterprise.

  • Per-user credentials with Vercel Connect: With a supported connector, agents can request short-lived provider tokens to act on behalf of users who grant access.

  • Sign-in for internal apps and agents with Vercel Passport: Require visitors to sign in via your identity provider before accessing a protected deployment.

  • Passport sign-in records in Audit Logs: See when visitors successfully authenticate to a Passport-protected project.

  • Project permissions with Access Groups: Assign project roles to groups of team members.

  • Automatic offboarding with Directory Sync: Remove Vercel team access when your synced directory deprovisions a member.

Start a new project and map your directory groups to team roles, or browse templates for an app to add record-level rules to.

Copy link to headingFrequently asked questions about RBAC vs ABAC

Copy link to headingDo you need to replace RBAC to use ABAC?

No. Keep roles for the operations a person may perform, then add attribute checks for conditions such as tenant membership or record sensitivity. Enforce both checks wherever the policy requires both.

Copy link to headingIs there a formal standard for RBAC?

Yes. The NIST RBAC model became the ANSI/INCITS 359-2004 standard in 2004. NIST records a 2012 revision, INCITS 359-2012.

Copy link to headingHow does RBAC differ from discretionary access control?

RBAC grants permissions through roles assigned to users. Under discretionary access control (DAC), someone with the authority to grant access, such as a file's owner, can decide who else may access it.

Copy link to headingDoes Vercel Passport enforce record-level access?

No. Vercel Passport authenticates visitors to a protected deployment and gives your server code the visitor's verified identity. Your application still decides which records the visitor or their agent can read or change.

Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

  • Agent stack: Build and operate agents with models, tools, and durable workflows.
  • Web applications: Choose rendering, data, authentication, and caching approaches.
  • Backends: Choose a runtime, connect services, and run background work.

Browse all stacks

Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.

Ready to deploy?