Passwords & identity

What Is Mandatory Access Control? MAC Explained With Examples

Mandatory access control removes the owner's choice: a central policy decides who can read or change each resource, based on labels and clearances.

Cysoro Security TeamPublished · 7 min read
CENTRAL POLICY USERSecret FILESecret ALLOW — labels match DENY — Top Secret file Owner cannot override PASSWORDS & IDENTITY Mandatoryaccess control The policy decides. Not the owner.
Quick answer

Mandatory access control (MAC) is an access control model in which a central authority sets the policy and enforces it uniformly across all users and resources. Users cannot change access rights or pass them on, even if they own a file. Access depends on security labels on resources and the formal clearance of each user.

Key takeaways

  • In MAC, a central authority sets access policy; individual owners cannot grant, change or pass on access.
  • Access is decided by comparing a resource label with a user clearance, often using rules such as Bell-LaPadula for confidentiality.
  • MAC is strongest in high-assurance systems such as SELinux, military and government networks, and is usually too rigid alone for a small business file share.

On most computers, the person who creates a file can decide who else may read it. Mandatory access control takes that choice away. A central policy decides, and no owner, manager or even administrator can override it for a single file.

What is mandatory access control?

Mandatory access control (MAC) is an access control policy in which a central authority, not the owner of a resource, decides who may access it. The policy is enforced uniformly across all subjects and objects in the system.

NIST defines MAC as a policy where access decisions are made by a central authority, not by the individual owner of an object, and where the user cannot change access rights, in its glossary definition. The classic example is military security: a data owner does not decide who holds a Top Secret clearance, and cannot change a file from Top Secret to Secret.

MAC is also called nondiscretionary access control, because it removes the discretion that owners have in other models. If the policy says no, the answer is no, whoever is asking.

How does mandatory access control work?

MAC works by labelling every resource with a sensitivity level and giving every user a formal clearance, then allowing access only when the clearance covers the label. The operating system or security system enforces the comparison on every request.

Labels usually form a hierarchy, such as Unclassified, Confidential, Secret and Top Secret. A user cleared to Secret can read Confidential and Secret material, but not Top Secret material. Categories can add further limits, so a clearance for one project does not automatically open another.

The key point is that the check happens in the system, not in the application. A user cannot bypass it by sharing a file, changing its permissions or opening it in a different program.

How a MAC decision is made UserClearance: SecretCategories: Project ARole: analyst Central policyCompare clearancewith labelNo owner override FileLabel: SecretCategory: Project AOwner: team lead Allow: clearance covers the label If the label were Top Secret, the same user would be denied.
MAC compares clearance and label under a central policy. Illustration by Cysoro.

What can a user not do under MAC?

Under MAC, a user who has been granted access cannot pass that information to unauthorized users, grant privileges to others, change security attributes, choose attributes for new objects, or change the rules themselves. NIST SP 800-53 Rev. 5 lists these constraints in its definition.

That last point is what makes MAC different in practice. In most systems, a user who can read a file can copy it, email it or share it with a colleague. Under strict MAC, the system constrains what an authorized subject can do with information after access has been granted.

Trusted subjects are the narrow exception. An organization can explicitly grant certain subjects privileges that are not limited by some of these constraints, but that grant itself is a central policy decision, not a user choice.

What is the difference between MAC and DAC?

The difference is who decides. In discretionary access control (DAC), the owner of a resource decides who else can access it. In MAC, a central authority decides, and the owner cannot change that decision.

FeatureMandatory access controlDiscretionary access control
Who decidesCentral authority and system policyResource owner
Can the owner share accessNoYes, within the owner's rights
Based onLabels and clearancesOwner-granted permissions
FlexibilityLow, rigid and uniformHigh, easy to share and change
Typical useMilitary, government, high-assurance systemsOrdinary file shares, desktops, cloud drives
Main risk it stopsInsiders passing sensitive data onwardAccidental over-sharing by owners

Most business systems use DAC, because teams need to share files quickly. MAC is chosen when the cost of a leak outweighs the cost of that rigidity. For everyday password and account hygiene, a strong password and a check with our password strength checker still matter more than the access model.

How does MAC compare with RBAC and ABAC?

MAC, role-based access control (RBAC) and attribute-based access control (ABAC) answer the same question in different ways. MAC uses labels and clearances, RBAC uses roles, and ABAC uses attributes of the user, resource, action and environment.

RBAC grants permissions to roles, then assigns people to roles. It is the most common model in business software, because roles map neatly onto jobs. ABAC evaluates attributes at decision time, so it can say yes to a manager on a company laptop during work hours and no to the same person on an unknown device at night.

MAC is the most rigid of the three, and the hardest to change quickly. That is why it is usually reserved for systems where the classification of the data itself is the main concern, rather than the job of the person asking.

What are the Bell-LaPadula and Biba models?

The two classic MAC models are Bell-LaPadula, which protects confidentiality, and Biba, which protects integrity. NIST SP 800-53 cites both as examples of mandatory access control policies.

Bell-LaPadula has two simple rules: no read up and no write down. A user can read data at or below their clearance, but not above it, and can write only at or above their level, so secret data cannot leak into a lower-classified file.

Biba reverses the concern: no read down and no write up. A user should not trust data from a lower integrity level, and should not write to a higher integrity level where it could corrupt trusted data. Real systems often combine ideas from both, rather than applying either one purely.

Where is mandatory access control used in real systems?

MAC is used in military and government classified systems, in SELinux and AppArmor on Linux, and in some trusted operating systems and databases. It is also required by some standards for systems that handle classified or controlled unclassified information.

SELinux is the example most engineers will meet. It was developed by the US National Security Agency and is built into Red Hat Enterprise Linux and other distributions, as Red Hat explains. It labels processes and files, and enforces a policy that limits what each process can do, even if the process runs as root.

AppArmor, used on Ubuntu and openSUSE, is a related MAC system that confines programs to a profile of allowed files and capabilities. Both show the same idea: even a compromised program should only be able to do what its policy allows.

SELinux: MAC in action Web server processRuns as root after a flawTries to read /etc/passwdSELinux: DENIEDPolicy has no rule for this Same process, normal workReads web files in its labelServes pages to visitorsSELinux: ALLOWEDPolicy allows this access Root privilege does not override the MAC policy.
Under SELinux, a compromised process is still confined by policy. Illustration by Cysoro.

On a Linux server, you can check the current mode with getenforce. Enforcing mode denies access that the policy does not allow; permissive mode only logs what would have been denied. Changing the mode temporarily with setenforce does not survive a reboot; the persistent setting lives in /etc/selinux/config.

What are the advantages and disadvantages of MAC?

The main advantage of MAC is strong, uniform protection against insider leaks and compromised programs. Because owners cannot grant access, a single careless share cannot expose classified data, and a hacked service is confined to its policy.

The main disadvantage is rigidity and administrative cost. Every label, clearance and policy rule must be defined and maintained centrally. Changes are slow, users may find legitimate work blocked, and troubleshooting a denial often needs an administrator to read audit logs.

That trade-off explains where MAC fits. Where data classification is the top concern, the cost is worth paying. Where speed and collaboration matter more, RBAC or ABAC usually fits better, with MAC applied only to the most sensitive systems.

Should a small business use mandatory access control?

Most small businesses should not try to run a full MAC system for everyday files. The labelling, clearance process and policy maintenance are too heavy for a small team, and the friction will push staff toward workarounds.

What small teams should take from MAC is the principle: decide access centrally for your most sensitive data, and do not let every owner share it freely. That can mean a separate, tightly controlled folder for payroll and contracts, with access reviewed regularly.

For the rest, use role-based access in your cloud apps, enforce MFA, and give each person only the access their job needs. That approach, called least privilege, captures much of the benefit of MAC without its overhead. See our guide to what spear phishing is for why even well-controlled access still needs vigilance against social engineering.

What mistakes do teams make with MAC?

The most common mistakes are labelling data inconsistently, granting clearances too broadly, and disabling the system when it blocks legitimate work. Each one quietly removes the protection MAC was meant to provide.

  • Labelling everything Top Secret. When every file is highly classified, nobody can work, and the labels stop meaning anything.
  • Clearing everyone to the highest level. Broad clearances defeat the point of the model.
  • Turning SELinux off instead of fixing the policy. Disabling enforcement is a common shortcut, and it leaves the system with only ordinary permissions.
  • Forgetting trusted subjects. Exceptions should be few, documented and reviewed, not a long list of workarounds.
  • Not auditing denials. Denied requests in the audit log often reveal a mislabelled file, a missing rule or an attack in progress.

The bottom line

Mandatory access control is the strictest access model: a central authority labels data, clears people and enforces the match on every request. Owners cannot override it, and authorized users cannot pass access onward.

That rigidity is its strength and its cost. Use it where classified or highly sensitive data demands it, and use simpler models elsewhere. Start by tightening access to your most sensitive files, and check whether any of your passwords have appeared in a breach with the free pwned password checker.

Frequently asked questions

What is mandatory access control in simple terms?

It is a system where the organization, not the person who owns a file, decides who can access it. A central policy compares the label on the file with the clearance of the person asking.

What is the difference between MAC and DAC?

In discretionary access control, the owner of a resource can decide who else gets access. In mandatory access control, the owner has no such choice: a central authority sets and enforces the rules for everyone.

What is an example of mandatory access control?

SELinux on Linux is a common example. A web server process may be blocked from reading a password file even if it runs as root, because the security policy does not allow that access.

What are security labels in MAC?

Labels are markings on files and other resources that state their sensitivity, such as Confidential, Secret or Top Secret. Users hold a clearance at a matching level, and access is granted only when the clearance covers the label.

Is MAC the same as a message authentication code?

No. The letters MAC are also used for message authentication code, a cryptographic checksum, and for media access control in networking. In access control, MAC means mandatory access control.

When should an organization use MAC?

Use MAC when a mandate requires strict control over classified or highly sensitive information, and when some users must be prevented from seeing data that other users can see. It fits military, government and high-assurance systems best.

Can MAC and DAC be used together?

Yes. NIST notes that mandatory access control can operate together with discretionary access control. MAC sets the hard limits, while DAC lets owners make choices within those limits.

Sources

  1. NIST CSRC — Mandatory access control (MAC) glossary
  2. NIST SP 800-53 Rev. 5 — Security and Privacy Controls
  3. NIST SP 800-162 — Guide to Attribute Based Access Control
  4. Red Hat — What is SELinux?
  5. CyberDefenders — What Is Access Control? Models and the AAA Flow
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against the NIST CSRC glossary definition of mandatory access control and NIST SP 800-53 Rev. 5.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free