Access Control Models: DAC, MAC and RBAC Explained

(The image is AI-generated) 
 

 

 

Last updated: November 15, 2026

Every operating system has to answer one question thousands of times a second: may this subject do this to that object? The access control model decides how that answer is reached, and above all who gets to set the rules. Three models have shaped that decision for decades: Discretionary Access Control (DAC), Mandatory Access Control (MAC) and Role-Based Access Control (RBAC).

They are not three generations where the newest replaces the oldest. Each answers a different question, and real systems stack them. This article explains what each model does, where it fails, and how administrators on Linux, Windows, macOS and databases use them to apply least privilege in practice. I checked the main claims against vendor documentation and standards, and the Claim check table near the end shows what held up and what needed correcting.

Key takeaways
  • DAC lets the resource owner decide, MAC lets a central policy decide, and RBAC organizes permissions around job functions.
  • The models are layers. On Linux, SELinux is consulted only after the normal DAC check has already allowed the access.
  • RBAC makes least privilege manageable at scale, but it does not contain a compromised account by itself.
  • Two details in many older write-ups are out of date: Privileged Identity Management belongs to Microsoft Entra, not Active Directory, and PostgreSQL does not require SET ROLE to use inherited privileges.
  • Even sudo can become the weak point, as CVE-2025-32463 showed, so least privilege includes patching the tools that grant privilege.

Discretionary Access Control: the owner decides

DAC is the model most people meet first, because it is how Unix-style file permissions work. The owner of a resource decides who may read, write or execute it, and can pass that authority on. The defining feature is not the mechanism but where the authority sits: with the owner, not with a central administrator.

Classic Unix permission bits for owner, group and others are the standard example. Access Control Lists (ACLs) add named users and groups beyond those three, but the principle stays the same. This is why DAC feels natural. A user can share a document with a colleague, and a team can manage its own folder, without opening a ticket.

The same freedom is its weakness. DAC has no system-wide rule that an owner cannot override. A user who is tricked into sharing a file, or a program running with that user's rights, can expose data nobody meant to expose. A compromised account can reach everything that account can reach. Root or administrator accounts can override discretionary permissions entirely.

It is also worth noting that DAC and RBAC overlap in practice. NIST's own RBAC FAQ observes that systems with a solid group and ACL mechanism, where many users map to many permissions, can already meet the Core RBAC definition. In my reading, that explains why so many organizations "do RBAC" using nothing more than groups. It is a convention on top of DAC, not an enforcement guarantee.

Mandatory Access Control: the system enforces the policy

MAC reverses the relationship. A central authority writes the policy, the operating system enforces it, and resource owners cannot change it. Classic MAC assigns labels to objects and clearances to subjects. The Bell-LaPadula model, with its "no read up, no write down" rules, is the textbook formalization for confidentiality, and this style of policy has long been associated with military and government systems.

On Linux, MAC arrives through kernel security modules, mainly SELinux and AppArmor. Red Hat's documentation describes SELinux as answering a simple question: may this subject do this action to this object? Every process and file is labeled, and access is allowed only if a policy rule explicitly permits it. A web server process labeled httpd_t can read content labeled httpd_sys_content_t, and Red Hat's own example shows the same process being denied the MariaDB data directory because no allow rule exists.

One detail is often stated loosely. According to Red Hat, SELinux rules are checked after the traditional DAC rules. If DAC denies access first, SELinux is never consulted and no SELinux denial is logged. So the accurate picture is that both layers must agree. MAC does not replace DAC. It narrows what DAC would otherwise allow, which is why a compromised web server stays confined to what its policy permits.

AppArmor takes a different approach, attaching profiles to individual programs by path rather than labeling every object. Most comparisons describe it as simpler to configure than SELinux, and that is reflected in practitioner guides. The cost of MAC, for both, is rigidity and learning effort. Policy that cannot be changed by owners is exactly what makes it a containment boundary, and exactly what makes it tiring to administer.

Role-Based Access Control: permissions follow function

RBAC asks a different question: what job does this person do? Permissions are attached to roles, users are assigned to roles, and a user's access is what their roles allow. NIST's Ferraiolo and Kuhn proposed a general RBAC model in 1992. After public review, a standard was approved in February 2004 as ANSI INCITS 359-2004. It has two parts, a reference model and a functional specification, built from four components: Core RBAC, Hierarchical RBAC, Static Separation of Duty and Dynamic Separation of Duty.

The administrative payoff is the point. When someone changes jobs, you change their roles instead of editing dozens of object permissions. Role hierarchies let a senior role inherit a junior one, and separation-of-duty rules stop one person from holding conflicting roles, for example both initiating and approving a payment.

On the economics, a 2002 study by RTI International for NIST projected substantial savings from RBAC adoption, putting the net present value through 2006 at roughly $671 million. That figure is a projection based on interviews with vendors and adopting companies, so treat it as an estimate, not a measurement. A later follow-up reported a much larger retrospective figure, but I did not retrieve the original follow-up report, so I do not rely on it here.

RBAC has well-known weak spots. Role explosion happens when organizations create so many narrow roles that the role model becomes as hard to manage as the permissions it replaced. Role assignments are also static, so access creep builds up until someone reviews it. Finally, RBAC usually sits on top of DAC or MAC. It organizes who gets what, but it does not by itself stop a hijacked session from misusing a role.

Comparing the three models

DimensionDACMACRBAC
Who sets policyResource ownerCentral administrator or system designerRole administrator
Can owners override it?YesNoDepends on role design and review
GranularityPer object, per user or groupPer label or type, per subjectPer role, per permission
FlexibilityHighLowModerate
Main strengthSimple, easy sharingContainment, predictable enforcementManageable least privilege at scale
Main weaknessNo defense against a compromised owner or rootRigid, harder to operateRole explosion, access creep
Typical useUnix permissions, ACLsSELinux, AppArmorDirectory groups, database roles, sudo rules

The useful question is not "which model?" but "which model at which layer?" A hardened Linux server uses DAC as the baseline, MAC as the containment boundary, and RBAC-style structures for granting and reviewing privilege. Each layer covers a gap in the others.

Operationalizing least privilege

The principle of least privilege says every user, service account and process should hold only the access its task needs. It is a habit as much as a setting. An administrator reading email should not be doing it from a domain administrator session.

NIST SP 800-207, the 2020 Zero Trust Architecture publication, treats this as a core tenet. Its third tenet says access to individual resources is granted per session, with the least privilege needed for the task, and that access to one resource does not automatically open another. For operating systems, the practical pattern is the same across platforms:

  1. Remove standing elevation. People work as standard users by default.
  2. Control elevation paths. Administrative work goes through approved, ideally time-bound, workflows instead of ad hoc "make them an admin" decisions.
  3. Constrain what elevation can do. Grant specific commands or functions, not a full administrator shell.
  4. Log and review. Elevation events and privileged group membership should be centrally logged and reviewed on a schedule.

If you are building this into a wider routine, the same discipline applies to keeping systems current, which is covered in our guide to building a patching policy for Windows, Linux and macOS.

Linux: sudo, SELinux and AppArmor

sudo as the administration layer

On Linux, sudo is the main tool for least-privilege administration. The sudoers policy defines which users or groups may run which commands, on which hosts, as which target users. Command aliases (Cmnd_Alias) let you name a set of commands and grant that set to a role, which keeps the policy compact and auditable. As an illustration, a deployment account might be allowed to restart one specific service but not edit arbitrary files or add users.

SELinux as the containment layer

SELinux then constrains what even a privileged process can do. Access decisions draw on the SELinux user, role and type, and administrators can map Linux users to SELinux confined users to limit what those users may do. Red Hat is careful about the limits: SELinux mitigates attacks like path traversal on a web server but cannot block every such attack. It is a containment layer, not a guarantee.

A practical note from the same documentation: SELinux supports a permissive mode that logs what would be denied without blocking it. That is the supported way to debug a policy problem, and it is far better than switching SELinux off.

AppArmor and user confinement

AppArmor can also tie confinement to users, through the pam_apparmor module. According to the AppArmor project's own documentation, it works through the change_hat interface: the login service must itself be confined, and the user is placed into a "hat" of that profile, chosen by default from the user's primary group name. It is a workable role-like mechanism, but it needs careful setup and is not a drop-in switch.

For the rest of a hardening baseline, including monitoring and recovery, see Linux Server Security: Hardening, Monitoring and Recovery.

Windows: groups and privileged access

In Windows environments, Active Directory security groups are the everyday role abstraction. Permissions are delegated to groups, and people are placed in the groups that match their jobs. The risk concentrates at the top: Microsoft's documentation lists Domain Admins and Enterprise Admins as typical Tier 0 examples, meaning accounts with control over the whole environment.

Many write-ups describe a three-tier model in which Tier 0 assets such as domain controllers are administered only from Tier 0 workstations, with separate tiers for servers and user devices. That model is real, and it still appears in Microsoft's documentation, which describes the idea that higher-tier credentials must never be used on lower-tier systems. However, Microsoft now describes the legacy tier model as superseded by the Enterprise Access Model, which widens the same idea to cover cloud, multiple platforms and external users, with a control plane replacing Tier 0.

A correction is also needed on terminology. Privileged Identity Management (PIM) is a Microsoft Entra feature, not part of on-premises Active Directory. It provides just-in-time elevation: administrators hold eligible assignments and activate them only when needed. Microsoft's own security guidance pairs PIM with privileged access workstations and separate admin accounts. If you run a hybrid environment, the safest reading is that on-premises tiering and Entra-based just-in-time access are complementary pieces, each covering its own side of the estate.

macOS: standard accounts and temporary elevation

On macOS, the first account created during setup is normally an administrator, and the default sudoers file contains a rule giving the admin group full sudo rights (%admin ALL=(ALL) ALL). Apple's published sudo configuration shows this line, and community documentation confirms the initial user lands in that group.

The least-privilege response is straightforward. Keep the number of local administrators small, work day to day as a standard user, and elevate only for a specific task. Where you need finer control, a sudoers drop-in can replace the broad group rule with command-specific rules for named groups. Group membership can be changed from the command line with tools such as dseditgroup, and endpoint management or third-party privilege tools can automate time-limited elevation. I have not tested any specific product for this, so check what your management platform actually supports.

Databases: native RBAC

Databases implement roles natively. The discipline mirrors the operating system: avoid the all-powerful roles for routine application access and grant only the specific privileges an application needs. A reporting role might read specific views and nothing else, while an application role might execute stored procedures but not change the schema.

One widely repeated detail is wrong for modern PostgreSQL. By default, a role that is a member of another role automatically uses that role's privileges through the INHERIT behavior, and SET ROLE is not needed for that. You use SET ROLE when you want to temporarily become a role, and it is genuinely required for role attributes such as CREATEDB, which are not inherited. Since PostgreSQL 16, INHERIT and SET are separate options on each membership, so an administrator can grant one without the other. That is a useful least-privilege lever: you can grant membership that inherits read access without allowing the member to switch into the role.

When the privilege tool is the weakness

Least privilege depends on the tools that grant privilege being trustworthy. CVE-2025-32463 is a clear example. It was a local privilege escalation in sudo, affecting versions 1.9.14 through 1.9.17, in which the --chroot option could be abused so that a local user obtained root even without a matching sudoers entry. The maintainers fixed it in sudo 1.9.17p1 on June 30, 2025 and deprecated the chroot feature. CISA added it to its Known Exploited Vulnerabilities catalog on September 29, 2025.

The lesson is practical, not alarming. A tight sudoers file does not help if the binary enforcing it has a flaw. Check your sudo version, apply your distribution's patched package, and treat privilege tools as high-priority patching targets. The broader design principle is explained in How Operating Systems Enforce Security: A Layered Model.

Claim check

ClaimStatusNote
RBAC was standardized as ANSI INCITS 359ConfirmedApproved February 2004. The original model dates to 1992; the standard came later.
SELinux is checked after DAC, and both must allow accessConfirmedRed Hat documentation. No SELinux denial is logged if DAC denies first.
NIST SP 800-207 grants access per session with least privilegeConfirmedTenet 3, published August 2020. Confirmed through secondary summaries.
macOS grants the admin group full sudo by defaultConfirmedDefault sudoers line shown in Apple's published sudo configuration.
CVE-2025-32463 affects sudo 1.9.14 to 1.9.17, fixed in 1.9.17p1ConfirmedMaintainer advisory; added to CISA KEV on September 29, 2025.
pam_apparmor assigns profiles to users at loginConfirmedWith limits: it uses change_hat and needs a confined login service.
RBAC saves organizations large sumsUnverifiedA 2002 projection by RTI for NIST, based on interviews. An estimate, not a measurement.
Privileged Identity Management is part of Active DirectoryWrongPIM is a Microsoft Entra feature.
The three-tier AD model is Microsoft's current approachWrongDescribed by Microsoft as legacy, superseded by the Enterprise Access Model.
PostgreSQL needs SET ROLE to use a role's privilegesWrongInherited privileges apply automatically by default. SET ROLE matters for role attributes and temporary switching.
"Privilege age and velocity" metrics are standard practiceUnverifiedNo source found, so it was removed.

Update

Update (November 15, 2026): I found no significant change to the three core models themselves. The notable refinements are on the practice side: Microsoft frames its legacy AD tier model as superseded by the Enterprise Access Model, and the sudo flaw CVE-2025-32463 is a reminder to patch privilege tooling. Both are reflected above.

Change log: November 15, 2026 – corrected the PIM, tier model and PostgreSQL details and added the sudo section. November 15, 2026 – first published.

What users say

The most consistent practitioner complaint is about SELinux. In a reader discussion under an essay arguing that SELinux is unmanageable, many commenters described a pattern: it works fine on distribution defaults until something breaks, and then the learning curve is steep enough that disabling it feels reasonable. Other commenters, including someone who said they administer Linux systems full time, pushed back. Their advice was to read denials with the audit tooling and report policy bugs to the distribution, not to turn the whole mechanism off. You can read the thread here.

This matches the vendor guidance above. The disagreement is less about whether MAC is valuable and more about how much operational effort it takes to keep it enabled.

My take

I have not run these controls in a production environment myself. This is my view from following the documentation and the discussions around it.

  • Administrators should treat least privilege as a layered design problem. Knowing how to apply roles, labels and mandatory policies on each operating system is what protects systems, because no single model covers a compromised account on its own.
  • Roles make least privilege sustainable, and mandatory policy makes it enforceable. The documentation supports that split. Roles keep grants reviewable, while MAC keeps a compromised service inside its boundary.
  • My main reservation is operational cost. Mandatory policy has a real learning curve, and the practitioner threads show that people disable it under pressure. A control that gets switched off is worth less than a simpler one that stays on, so I would rather see teams start with permissive-mode logging than skip MAC altogether.

What this means for you

  • Audit standing admin rights. List who holds permanent administrator or sudo access on each platform and remove what is not needed.
  • Prefer scoped grants. Use command-specific sudoers rules, narrow database privileges, and role membership over blanket administrator access.
  • Keep MAC enabled. If a policy blocks something legitimate, use permissive or complain mode to find the rule and fix it instead of disabling the module.
  • Move to just-in-time elevation where you can. In Microsoft environments, evaluate Entra PIM and the Enterprise Access Model. Elsewhere, use time-limited elevation tools your platform supports.
  • Review roles on a schedule. Check group and role membership regularly to catch access creep and role explosion early.
  • Patch the privilege tools themselves. Check your sudo version and apply vendor updates promptly.

FAQ

Do I need all three models? In practice you already use more than one. DAC is the baseline on most systems, and groups act as roles. Adding MAC is what gives you containment against a compromised service.

Is SELinux or AppArmor better? Neither is universally better. Practitioner guides generally describe AppArmor as simpler and SELinux as more fine-grained and harder to learn. The better choice is usually the one your distribution supports well and your team will actually keep enabled.

Does RBAC replace file permissions? No. RBAC is usually layered on top of DAC or MAC. It simplifies how permissions are assigned and reviewed, but the underlying enforcement still comes from the operating system.

Sources

Post a Comment

0Comments

Post a Comment (0)