liveBook · Manning

Attribute-based access control

As explained in Software Security for Developers

An attribute-based access rule is a condition that grants or denies access by comparing relevant subject, resource, or environmental attributes.

Attribute-based access control (ABAC) grants or denies a request by comparing attributes of the user, resource, and environment against explicit rules. Instead of asking whether someone has a particular role, it asks whether the current facts satisfy the access condition. This supports precise, context-aware authorization and can enforce least privilege, but it depends on clear rules and reliable attribute data. section 17.1.2 section 17.4

ABAC can evaluate attributes such as:

  • User attributes: department, clearance level, and region. section 17.1.2
  • Resource attributes: owner, sensitivity, department, and creation date. section 17.1.2
  • Environment attributes: request time, IP address, and device type. section 17.1.2
  • Distributed-system claims: department, region, clearance level, project IDs, or teams, provided services agree on their meanings and sources. section 17.2.2 section 17.4

Matching a user to a document

A rule can allow access when user.department equals document.department and the user’s clearance is high enough. Similar policies can allow finance users to access EU invoices, permit highly cleared operators to download encrypted backups, or deny requests outside working hours. A rule may also grant access when clearance is top or region is US: Mary passes the clearance condition, John passes the region condition, and Bob passes neither. section 17.1.2

Figure 17.1 Comparing RBAC, ABAC, and ReBAC. RBAC grants access based on predefined roles such as user, manager, and administrator. ABAC adds flexibility by using user and resource attributes such as department, shift, and clearance level to make decisions. ReBAC focuses on relationships among entities, such as who owns a resource or who is responsible for whom, making it ideal for collaborative and delegated access scenarios.
figure

Compare ABAC with role-based access control and relationship-based access control: ABAC uses user and resource attributes, RBAC uses predefined roles, and ReBAC uses relationships among entities. section 17.1

ABAC is useful when roles cannot express differences such as department, region, ownership, or request context. In monoliths, evaluating attributes is relatively straightforward because user and resource data are local. In service-oriented systems, every service must enforce its own decisions and must not trust an upstream denial or approval blindly. Inconsistent values such as EU, Europe, and FR can produce authorization failures or gaps, while complex rules can become difficult to maintain. section 17.2.1 section 17.2.2 section 17.3

How Software Security for Developers covers it

How deep it goes
Defines attributes, gives matching-rule examples, and discusses monolith and service deployment, but defers policy-engine implementation details.
Examples
Uses department-matched documents, regional invoices, clearance levels, working hours, IP addresses, and inconsistent regional values.
What you can do after
Evaluate/understand it by choosing ABAC for dynamic, attribute-dependent access and identifying consistency risks across services.
How it connects
Connects ABAC with RBAC, ReBAC, authorization, least privilege, identity claims, monoliths, and distributed systems.

Also explained in

Compare how 4 books explain attribute-based access control →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Software Security for Developers. The section links point to the parts of the book it draws on.