Bird
Raised Fist0
Cybersecurityknowledge~6 mins

Access control models (MAC, DAC, ABAC) in Cybersecurity - Full Explanation

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Introduction
Imagine you have a valuable collection of items at home. You want to decide who can enter your house and what they can do with your things. Access control models help computers decide who can see or use information, solving the problem of keeping data safe and private.
Explanation
Mandatory Access Control (MAC)
In MAC, the system strictly controls access based on rules set by a central authority. Users cannot change permissions themselves. Access decisions depend on labels assigned to both users and data, like security clearances.
MAC enforces strict, system-wide rules that users cannot override.
Discretionary Access Control (DAC)
DAC lets the owner of the data decide who can access it. Users can grant or revoke permissions to others. This model is flexible but can be less secure because users control access.
DAC gives control to data owners to decide access permissions.
Attribute-Based Access Control (ABAC)
ABAC uses attributes like user role, time of day, or device type to decide access. It evaluates many factors dynamically, allowing fine-grained and flexible control based on context.
ABAC makes access decisions using multiple attributes for flexible control.
Real World Analogy

Think of a building with different ways to control entry. One uses strict security badges that cannot be changed (MAC). Another lets room owners give keys to friends (DAC). A third checks many things like who you are, when you arrive, and what device you use before letting you in (ABAC).

Mandatory Access Control (MAC) → Security badges assigned by building management that cannot be changed by employees
Discretionary Access Control (DAC) → Room owners handing out keys to their friends as they wish
Attribute-Based Access Control (ABAC) → Building security checking identity, time, and device before granting access
Diagram
Diagram
┌─────────────────────────────┐
│       Access Control         │
├─────────────┬───────────────┤
│    MAC      │      DAC      │
│  (System)   │   (Owner)     │
│  Strict     │  Flexible     │
├─────────────┴───────────────┤
│            ABAC             │
│  (Attribute-based, dynamic) │
└─────────────────────────────┘
Diagram showing three access control models: MAC with system control, DAC with owner control, and ABAC using attributes.
Key Facts
Mandatory Access Control (MAC) → Access is controlled by system-enforced policies that users cannot change.
Discretionary Access Control (DAC) → Data owners decide who can access their resources.
Attribute-Based Access Control (ABAC) → Access decisions are based on evaluating multiple user and environment attributes.
Access Control → The process of deciding who can use or see resources in a system.
Common Confusions
Believing DAC is always less secure than MAC.
Believing DAC is always less secure than MAC. While DAC is more flexible, security depends on how permissions are managed; MAC is stricter but not always better for every situation.
Thinking ABAC is just a more complex DAC.
Thinking ABAC is just a more complex DAC. ABAC uses multiple attributes dynamically, not just owner decisions, allowing more context-aware control.
Summary
Access control models help decide who can access data and what they can do with it.
MAC uses strict system rules, DAC lets owners control access, and ABAC uses many attributes for flexible decisions.
Choosing the right model depends on the security needs and flexibility required.

Practice

(1/5)
1. Which access control model uses labels and system-enforced rules to restrict access?
easy
A. Mandatory Access Control (MAC)
B. Discretionary Access Control (DAC)
C. Attribute-Based Access Control (ABAC)
D. Role-Based Access Control (RBAC)

Solution

  1. Step 1: Understand MAC characteristics

    MAC uses labels and system rules to control access, not user choice.
  2. Step 2: Compare with other models

    DAC lets owners decide, ABAC uses attributes, RBAC uses roles. Only MAC uses labels and system rules.
  3. Final Answer:

    Mandatory Access Control (MAC) -> Option A
  4. Quick Check:

    Labels + system rules = MAC [OK]
Hint: Labels and system rules mean MAC model [OK]
Common Mistakes:
  • Confusing DAC with MAC because both control access
  • Thinking ABAC uses labels like MAC
  • Mixing RBAC roles with MAC labels
2. Which of the following correctly describes Discretionary Access Control (DAC)?
easy
A. Access is based on predefined roles within an organization
B. Access is controlled by system-enforced labels only
C. Access is granted based on user attributes like time and location
D. Resource owners decide who can access their resources

Solution

  1. Step 1: Recall DAC definition

    DAC allows resource owners to decide who can access their resources.
  2. Step 2: Eliminate other options

    System-enforced labels describe MAC, attributes describe ABAC, roles describe RBAC.
  3. Final Answer:

    Resource owners decide who can access their resources -> Option D
  4. Quick Check:

    Owner control = DAC [OK]
Hint: Owner decides access means DAC model [OK]
Common Mistakes:
  • Confusing DAC with MAC which uses system labels
  • Mixing ABAC attributes with DAC
  • Assuming roles control DAC access
3. Consider this scenario: A system grants access to a file only if the user's department matches the file's department attribute and access time is within business hours. Which access control model is this an example of?
medium
A. Mandatory Access Control (MAC)
B. Discretionary Access Control (DAC)
C. Attribute-Based Access Control (ABAC)
D. Role-Based Access Control (RBAC)

Solution

  1. Step 1: Identify key access factors

    Access depends on user attributes (department) and conditions (time).
  2. Step 2: Match model to attribute-based rules

    ABAC uses attributes like department and time to decide access.
  3. Final Answer:

    Attribute-Based Access Control (ABAC) -> Option C
  4. Quick Check:

    Attributes + conditions = ABAC [OK]
Hint: Attributes and conditions point to ABAC model [OK]
Common Mistakes:
  • Choosing MAC because of strict rules
  • Confusing RBAC roles with attributes
  • Thinking DAC controls by owner only
4. A company uses a system where users can share files and decide who else can access them, but the system also enforces security labels on files that cannot be changed by users. What is the error in this access control setup?
medium
A. It does not enforce any access control
B. It mixes DAC and MAC models incorrectly
C. It allows users to override system labels
D. It uses ABAC without defining attributes

Solution

  1. Step 1: Analyze the setup

    Users control sharing (DAC), but system enforces labels (MAC).
  2. Step 2: Identify conflict

    Mixing DAC and MAC can cause conflicts because MAC labels cannot be overridden by users.
  3. Final Answer:

    It mixes DAC and MAC models incorrectly -> Option B
  4. Quick Check:

    Mixing DAC and MAC causes conflicts [OK]
Hint: DAC owner control conflicts with MAC system labels [OK]
Common Mistakes:
  • Assuming ABAC is used without attributes
  • Thinking users can override MAC labels
  • Ignoring the presence of enforced labels
5. An organization wants to implement an access control system that allows access based on user role, time of day, and location, but also requires that certain highly sensitive files can only be accessed by users with a specific security clearance label. Which combination of access control models best fits this requirement?
hard
A. Mandatory Access Control (MAC) combined with Attribute-Based Access Control (ABAC)
B. Discretionary Access Control (DAC) combined with Role-Based Access Control (RBAC)
C. Role-Based Access Control (RBAC) only
D. Attribute-Based Access Control (ABAC) only

Solution

  1. Step 1: Identify requirements

    Access depends on role, time, location (attributes) and security clearance labels (system-enforced).
  2. Step 2: Match models to requirements

    ABAC handles attributes like role, time, location; MAC enforces security clearance labels.
  3. Step 3: Combine models for full coverage

    Using MAC with ABAC covers both label enforcement and attribute-based conditions.
  4. Final Answer:

    Mandatory Access Control (MAC) combined with Attribute-Based Access Control (ABAC) -> Option A
  5. Quick Check:

    Labels + attributes = MAC + ABAC [OK]
Hint: Combine MAC labels with ABAC attributes for complex control [OK]
Common Mistakes:
  • Choosing RBAC only, missing label enforcement
  • Using DAC which lacks system labels
  • Assuming ABAC alone handles security labels