RBAC vs ABAC: Role-Based vs Attribute-Based Access Control, Explained for Data Access

Roles decide which data a team can open. Attributes decide which rows and fields inside it each person sees. Most companies need the first before the second, and both before they hand the database to the rest of the business.

By The Signal Org Chain · Updated

The short answer

RBAC (role-based access control) grants permissions to roles, such as “support agent” or “sales manager”, and gives people access by putting them in a role. NIST, whose researchers David Ferraiolo and Rick Kuhn formalized RBAC in 1992, describes it as the predominant model for access control because it cuts the cost of managing permissions person by person. Its model became an American National Standard, ANSI/INCITS 359, in 2004.

ABAC (attribute-based access control) decides each request by checking attributes against a policy. NIST’s Guide to ABAC, SP 800-162, defines it as access “determined by evaluating attributes associated with the subject, object, requested operations, and, in some cases, environment conditions” against rules. In practice: who the person is (team, region, assigned accounts), what the data is (whose customer, how sensitive), what they want to do (read, edit, export) and the circumstances (time, device, location).

So the difference is where the decision lives. RBAC answers “what is this person’s job?” and hands over that job’s fixed bundle of permissions. ABAC answers “does this person, doing this, to this record, right now, meet the rule?” and decides fresh every time.

RBAC and ABAC side by side

How role-based and attribute-based access control differ
RBACABAC
Access is decided byThe roles a person holdsA policy evaluated against attributes of the person, the data, the action and the context
Typical rule“Support agents can read the customers table”“Support agents can read customers in their own region, but not payment fields”
GranularityCoarse: usually whole tables, dashboards or appsFine: individual rows and fields, and conditions like time or device
When something new is addedEach role that needs it has to be updatedAccess follows automatically if the new data carries the right attributes
Easy to answer “who can see X?”Yes: list the roles that include X, then who holds themHarder: you have to evaluate the policy against every person’s attributes
Setup effortLow: define roles, assign peopleHigher: attributes must be defined, kept accurate and fed to the policy
What goes wrong at scaleRole explosion: dozens of near-identical roles for every exceptionPolicies nobody can read, and attributes that drift out of date

The “new data” row is the one AWS uses to explain the trade-off. In its comparison of ABAC to RBAC, the drawback of the traditional role model is that “when you or your users add new resources to your environment, you have to update the policies to allow access to those resources”, while with ABAC permissions follow from matching tags and “ABAC requires fewer policies.” The same logic applies to a growing company’s data: every new team, region or customer segment either means another role or simply another attribute value.

An example: one customer database, three departments

Picture a company opening its customer database to sales, support and finance so they stop filing requests with engineering. Here is how each model expresses what each team needs. The rules are illustrations of shape, not a recommended policy.

Access to a customer database expressed as RBAC and as ABAC
TeamWhat it needsAs RBACAs ABAC
SalesIts own accounts, with contract value; no payment detailsA “sales” role that can read customers and contracts, plus a separate role per territory if reps should only see their ownRead customers where account owner = the user or territory = the user’s territory; hide payment fields
SupportAny customer it is helping, editable contact fields; no revenue figuresA “support” role with read on customers and write on a contact viewRead customers with an open ticket assigned to the user’s queue; edit only contact fields; never contract value
FinanceAll customers, including billing and payment statusA “finance” role with read on everythingRead all customers; payment fields only from a managed device during working hours

Two things show up. RBAC handles the finance row easily and the sales row clumsily: “only their own accounts” turns into one role per territory, then per rep, which is how role explosion starts. ABAC handles the sales and support rows in one rule each, but it only works if every customer record reliably carries an owner, a territory and a ticket assignment. For how these row rules are enforced in practice, see row-level permissions in internal data tools.

When to use which

  • Use RBAC when access follows job function cleanly: a handful of departments, each needing the same data as everyone else in it. It is quicker to set up and far easier to audit, and most BI and internal tools support it out of the box.
  • Use ABAC when the answer to “who should see this?” depends on the record: whose account it is, which region it belongs to, how sensitive a field is. It is also the better fit when new teams, regions or products arrive often and you don’t want a new role for each.
  • Use both in most companies past a few dozen people. Roles decide which tables, dashboards and actions a team gets; attributes narrow that to the rows and fields each person should see. That is the layering described in permissioned data access models for multi-departmental BI.
  • Don’t start with ABAC if nobody yet agrees which roles exist. Attribute rules written on top of unclear ownership just encode the confusion more precisely.

How to combine them, step by step

  1. List the teams and what each one is for. Start from jobs, not tables. Which decisions does each department make, and which data does it need to make them?
  2. Define a small set of roles. One per department or function is usually enough to begin. Give each role only the tables, views and actions that job needs, which is least privilege in practice.
  3. Map sensitive fields before anyone queries. Mark the columns no role should see by default (payment details, personal data, compensation). See mapping sensitive columns to team roles before your first non-engineering query.
  4. Add attributes where a role is too broad. When “sales can see customers” really means “each rep sees their accounts”, keep one sales role and add a rule on the account owner or territory, rather than splitting the role.
  5. Make sure the attributes are trustworthy. An ABAC rule is only as good as the data behind it. If account owner is blank on a fifth of records, a fifth of accounts are invisible or exposed. Decide who keeps each attribute up to date; who owns which rows is an organizational question.
  6. Decide where the rules are enforced. In the database, in the tool people use, or in a layer between them. Each has trade-offs; see why column restrictions in internal tools belong in the tool layer.
  7. Review access on a schedule. Check quarterly who holds which role and whether the rules still match how teams work. People change jobs; their old access rarely leaves with them unless someone looks.

Related models you will meet

  • Row-level security (RLS). Not a separate model so much as the database feature that enforces row rules. PostgreSQL, for example, lets a table carry row security policies that decide which rows each user can read or change; once enabled with no policy, nothing is visible. RLS rules are often how attribute-style rules end up enforced.
  • Column- or field-level security. The same idea for fields: hide or mask columns such as payment or personal data from roles that don’t need them.
  • Policy-based access control (PBAC). A name some vendors use for access decided by centrally written policies. In practice it overlaps heavily with ABAC.
  • Relationship-based access control (ReBAC). Access follows relationships between people and records (“member of the team that owns this account”). It is common in software products with sharing features, and less often what an internal data rollout needs first.

Common mistakes

  • A role for every exception. “Sales EMEA read-only, except renewals” as its own role is the first sign RBAC has been stretched past what it does well. Move the exception into an attribute rule.
  • One giant role called “ops” or “business”. The opposite failure: everyone outside engineering gets everything, which is why role-based dashboards and shared read replicas fail at least privilege.
  • Attribute rules nobody can explain. If a department head can’t say in one sentence why a person can or can’t see a record, the policy is too clever to audit.
  • Treating access as purely technical. Which team owns which customer, and who may edit what, are organizational decisions. Engineering can enforce them, but shouldn’t be the one making them; see why permission granularity is an organizational design problem.
  • No audit trail. Whichever model you use, keep a log of who viewed, edited and exported sensitive data, and look at it.

Checking what your tools support

Most BI platforms, internal tool builders and database GUIs support roles; fewer support row and field rules driven by attributes, and they differ in whether those rules live in the tool or are passed down to the database. Before choosing one, ask each vendor (or check its current documentation) whether it can filter rows by a user attribute, hide individual fields per role, restrict exports separately from viewing, and log access. The permission-depth checklist engineering uses to evaluate internal database tools covers what to ask in more depth.

Sources

  1. SP 800-162, Guide to Attribute Based Access Control (ABAC) Definition and Considerations (NIST)
  2. Role Based Access Control project (NIST Computer Security Resource Center)
  3. Define permissions based on attributes with ABAC authorization (AWS IAM User Guide)
  4. Row Security Policies (PostgreSQL documentation)

Further reading