Course contentsShow
← Security
Lesson 797 of 3,05217. Web Security - Authorization and Access ControlFree lesson

Mandatory Access Control (MAC)

System-enforced access control based on security labels and clearance levels, independent of ownership.

Mandatory Access Control (MAC)

What you'll learn: You'll understand how MAC differs from DAC by enforcing system-level security policies that users cannot override, even as owners of their own data.

The Core Idea

Mandatory Access Control (MAC) is a security model where the system itself enforces access rules based on security labels and clearance levels—not the owner's discretion. Unlike Discretionary Access Control (DAC), where you control who can read your files, MAC implements organization-wide policies that override individual preferences.

Think of it like classified government documents: even if you create a "Top Secret" document, you can't just share it with anyone you choose. The system checks if the recipient has "Top Secret" clearance before allowing access. You don't get to decide—the security policy does.

How MAC Works

In MAC systems:

  1. Every resource (file, database record, API endpoint) gets a security label (e.g., "Confidential," "Secret," "Top Secret")
  2. Every user receives a clearance level assigned by administrators
  3. The system enforces access by comparing labels to clearances
  4. Users cannot change security classifications or override policies—even on data they created

Real-World Context

MAC is common in:

  • Military and government systems (classified information handling)
  • Healthcare systems (HIPAA compliance for patient data)
  • Financial institutions (regulatory data segregation)
  • Operating systems like SELinux and trusted Solaris

The system administrator or security officer defines policy rules. Individual users have zero control over these policies, ensuring consistent enforcement across the entire organization.

Key Takeaway: Mandatory Access Control removes access decisions from users' hands and enforces system-wide security policies based on labels and clearances, making it ideal for environments requiring strict, centralized security control.