RBAC and ABAC
Permissions, roles and attributes
A permission connects an action to a resource or resource category. Role-based access control (RBAC) assigns permissions to roles and associates principals with those roles. Attribute-based access control (ABAC) evaluates properties of the requester, resource, action and relevant context against a policy. A role can also be an attribute in a combined model.
A small role matrix
Our fictional library defines Member: read own loan, Librarian: record return, and Auditor: read audit summaries. In this simplified example the role grants eligibility for an action class; ownership is an additional condition for member reads. A member cannot record returns simply because they can read loan records. Groups may organize accounts; a group can be mapped to a role, but the concepts are not identical.
Add an attribute condition
Suppose a librarian can record returns only for the branch where they work. A trusted staff directory says Nima is a Librarian assigned to branch B1. The record system says loan R3 belongs to B1 and R4 belongs to B2. The policy permits recording a return for R3 and denies R4. If the trusted branch attribute is missing, deny until the information can be verified. These are fictional decisions, not a vendor policy language.
Choosing a model
Stable job responsibilities are often easy to express with roles. Ownership, location of a record or verified device state can add contextual rules. Attributes need reliable provenance and freshness; a branch name supplied by the browser is not sufficient evidence of staff assignment. Too many specialized roles can be hard to review, while complicated attribute rules can be hard to test. Choose a model that makes the policy understandable and verifiable.
Predict three outcomes
Using the library rules, predict whether Nima may record a return for R3, R4 and a record with unknown branch. State the evidence each decision needs. Next, combine these rules with default deny and separation of duties.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
RBAC and ABAC — Knowledge check
Apply identity and access principles to fictional library scenarios.
Which is a role in the library model?
What is an example of an attribute condition?
Nima is a librarian at B1; R4 is at B2. Can he record its return?
Where should the system obtain staff branch for access decisions?
When is adding contextual rules to roles useful?