ACCESS CONTROL MODELS: DAC, MAC, RBAC & ATTRIBUTE-BASED ABAC

Architect formal authorization frameworks for B.Tech Computer Science & IT: Discretionary Access Control (DAC) file permission matrices; Mandatory Access Control (MAC) multi-level lattices including Bell-LaPadula (Confidentiality) and Biba (Integrity); Role-Based Access Control (NIST RBAC0-RBAC3) with hierarchy and Separation of Duties (SoD); and Attribute-Based Access Control (ABAC / XACML) dynamic policy engines.

πŸ” Formal Authorization Engines, Security Invariants & Mediation Models

Authentication verifies identity ("Who are you?"), but Access Control (Authorization) enforces governance ("What are you permitted to do?"). Every operating system kernel, relational database management engine, cloud tenant, and microservice gateway implements a formal mathematical access control model. These models govern how Subjects (active entities such as users, threads, and processes) execute Operations (read, write, execute, delete) on Objects (passive targets such as files, sockets, database rows, and API endpoints). In Discretionary Access Control (DAC), object owners dictate permissions at their own discretion. In Mandatory Access Control (MAC), a centralized authority enforces strict security clearance levels across mathematical lattices (e.g., military classification in Bell-LaPadula or commercial accuracy in Biba). Enterprise software standardizes on Role-Based Access Control (RBAC) to decouple users from permissions, while modern cloud-native architectures rely on Attribute-Based Access Control (ABAC) to make real-time policy decisions using dynamic environmental context.

1. Access Control Taxonomy & The Lampson Access Matrix Model
The formal mathematical foundation of access control established by Butler Lampson (1971). Contrasts the conceptual Access Matrix with practical system implementations: Access Control Lists (ACLs, column-oriented) and Capability Lists (row-oriented tickets).
Lampson Access Matrix: ACLs vs. Capability Lists
THE LAMPSON ACCESS MATRIX FORMULATION:

Let S = {s_1, s_2, ..., s_m} be the set of Subjects (Users, Processes).
Let O = {o_1, o_2, ..., o_n} be the set of Objects (Files, Sockets, Devices).
Let R = {read, write, execute, own} be the set of Access Rights.

THE ACCESS MATRIX M (m x n):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ SUBJECTS (S) / OBJECTS  β”‚ File 1 (Grades)   β”‚ File 2 (Payroll)  β”‚ Device 1 (Printer)β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ User: Alice (Prof)      β”‚ { read, write }   β”‚ { }               β”‚ { execute }       β”‚
β”‚ User: Bob (Student)     β”‚ { read }          β”‚ { }               β”‚ { }               β”‚
β”‚ User: Charlie (Payroll) β”‚ { }               β”‚ { read, write }   β”‚ { execute }       β”‚
β”‚ Process: Daemon_Audit   β”‚ { read }          β”‚ { read }          β”‚ { }               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

PRACTICAL KERNEL IMPLEMENTATIONS:

1. ACCESS CONTROL LISTS - ACLs (COLUMN-WISE SLICING):
   β€’ Stored directly WITH the object itself on the filesystem (e.g., NTFS ACLs, POSIX ACLs).
   β€’ File 1 ACL ──► [ (Alice: r,w), (Bob: r), (Daemon_Audit: r) ]
   β€’ File 2 ACL ──► [ (Charlie: r,w), (Daemon_Audit: r) ]
   β€’ Strength   : Trivial to audit who has access to a specific file. Revocation is centralized per object.
   β€’ Weakness   : Difficult to audit all permissions belonging to a single user.

2. CAPABILITY LISTS - C-LISTS (ROW-WISE SLICING):
   β€’ Stored WITH the subject as an unforgeable cryptographic token (e.g., Kerberos tickets, JWTs).
   β€’ Alice Capability Ticket   ──► [ (File 1: r,w), (Device 1: x) ]
   β€’ Bob Capability Ticket     ──► [ (File 1: r) ]
   β€’ Strength   : High performance in distributed microservices; subject carries permissions.
   β€’ Weakness   : Revocation is difficult; once a token is issued, invalidating it requires central blacklists.
Architectural Standard: Operating system file systems (Linux ext4, Windows NTFS) implement ACLs attached to file inodes. Distributed web APIs implement Capability Lists in the form of signed JSON Web Tokens (JWTs) carried by incoming HTTP requests.
Real-Time Example 1: Discretionary Access Control (DAC) & POSIX Bitmask Operations
Analysis of Discretionary Access Control (DAC). Explains owner autonomy, the Trojan Horse vulnerability inherent to DAC, and models POSIX octal file mode bits (Owner, Group, Others) in Python.
Python (POSIX DAC Octal Bitmask Validation Engine)
from dataclasses import dataclass
from typing import List

@dataclass
class PosixUser:
    uid: int
    username: str
    groups: List[str]

@dataclass
class PosixFileInode:
    filename: str
    owner_uid: int
    owner_group: str
    mode: int  # Standard octal mode (e.g., 0o754)

class DiscretionaryAccessController:
    """
    POSIX DAC Evaluation Model:
    Evaluates permissions in strict precedence:
      1. If Subject UID == File Owner UID βž” Check Owner Bits (rwx)
      2. Else If Subject Group in File Group βž” Check Group Bits (rwx)
      3. Else βž” Check Other/World Bits (rwx)
    """
    READ_BIT    = 0b100  # 4
    WRITE_BIT   = 0b010  # 2
    EXECUTE_BIT = 0b001  # 1

    @classmethod
    def check_permission(cls, subject: PosixUser, obj: PosixFileInode, desired_action: str) -> bool:
        # Extract 3-bit octal components from permission mode
        owner_bits = (obj.mode >> 6) & 0b111
        group_bits = (obj.mode >> 3) & 0b111
        other_bits = obj.mode & 0b111

        action_mask = {
            "read": cls.READ_BIT,
            "write": cls.WRITE_BIT,
            "execute": cls.EXECUTE_BIT
        }.get(desired_action.lower(), 0)

        # 1. Check Owner Precedence
        if subject.uid == obj.owner_uid:
            permitted = bool(owner_bits & action_mask)
            return permitted

        # 2. Check Group Precedence
        if obj.owner_group in subject.groups:
            permitted = bool(group_bits & action_mask)
            return permitted

        # 3. Check Other Precedence
        permitted = bool(other_bits & action_mask)
        return permitted

if __name__ == "__main__":
    prof_alice = PosixUser(uid=1001, username="alice", groups=["faculty", "cs_dept"])
    student_bob = PosixUser(uid=1002, username="bob", groups=["students", "cs_dept"])
    guest_eve   = PosixUser(uid=1003, username="eve", groups=["external"])

    # Exam file: Mode 0o750 (rwxr-x---) | Owner: alice (uid=1001) | Group: cs_dept
    exam_paper = PosixFileInode(
        filename="btech_cyber_exam_2026.pdf",
        owner_uid=1001,
        owner_group="cs_dept",
        mode=0o750
    )

    print(f"[*] Testing DAC evaluation on: {exam_paper.filename} (mode 0750)...")
    print(f"  β€’ Alice (Owner) Write Permission : {DiscretionaryAccessController.check_permission(prof_alice, exam_paper, 'write')}")
    print(f"  β€’ Bob (Group) Read Permission    : {DiscretionaryAccessController.check_permission(student_bob, exam_paper, 'read')}")
    print(f"  β€’ Bob (Group) Write Permission   : {DiscretionaryAccessController.check_permission(student_bob, exam_paper, 'write')}")
    print(f"  β€’ Eve (Other) Read Permission    : {DiscretionaryAccessController.check_permission(guest_eve, exam_paper, 'read')}")
POSIX DAC Execution Output: [*] Testing DAC evaluation on: btech_cyber_exam_2026.pdf (mode 0750)... β€’ Alice (Owner) Write Permission : True β€’ Bob (Group) Read Permission : True β€’ Bob (Group) Write Permission : False β€’ Eve (Other) Read Permission : False DAC Architectural Flaw: The owner (Alice) can run 'chmod 777' on a whim, exposing confidential files to the entire system without central administrative oversight. DAC cannot prevent Trojan horses: a game executed by Alice runs with Alice's permissions and can read all of Alice's files.
Real-Time Example 2: Mandatory Access Control (MAC): Bell-LaPadula Confidentiality Lattice
Analysis of the Bell-LaPadula (BLP) mathematical state machine model (1973). Enforces data confidentiality across multi-level security (MLS) classifications using the Simple Security Property (No Read Up) and the *-Property (No Write Down).
Bell-LaPadula Multi-Level Security (MLS) Confidentiality Lattice
THE BELL-LAPADULA (BLP) CONFIDENTIALITY MODEL:

Security Classification Hierarchy:
  UNCLASSIFIED (0) < CONFIDENTIAL (1) < SECRET (2) < TOP_SECRET (3)

Let L(S) be the clearance level of Subject S.
Let L(O) be the classification level of Object O.

THE TWO MANDATORY AXIOMS OF BELL-LAPADULA:

1. SIMPLE SECURITY PROPERTY (ss-property): "NO READ UP"
   A subject S may read object O if and only if:
   L(S) >= L(O)
   β€’ A Secret user CAN read Confidential and Unclassified documents.
   β€’ A Secret user CANNOT read Top Secret documents (Prevents unauthorized reading).

2. STAR PROPERTY (*-property): "NO WRITE DOWN" (CONFINEMENT PROPERTY)
   A subject S may append/write to object O if and only if:
   L(S) <= L(O)
   β€’ A Secret user CAN write/append to Top Secret files.
   β€’ A Secret user CANNOT write to Confidential or Unclassified files!

WHY "NO WRITE DOWN" IS MANDATORY IN ENTERPRISE DEFENSE:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ THE TROJAN HORSE LEAKAGE VECTOR PREVENTED BY *-PROPERTY:                                      β”‚
β”‚ Suppose a Top Secret user runs a malicious script (Trojan Horse).                             β”‚
β”‚ If writing down were allowed:                                                                 β”‚
β”‚   1. The Trojan reads Top Secret nuclear blueprints (Allowed by ss-property).                 β”‚
β”‚   2. The Trojan writes the blueprints into /tmp/public.txt (Unclassified).                    β”‚
β”‚   3. An unclassified attacker reads the file!                                                 β”‚
β”‚ BLP *-property STOPS THIS: A Top Secret process is mathematically BLOCKED from writing down   β”‚
β”‚ into lower classification containers, making data exfiltration impossible!                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Architectural Standard: Bell-LaPadula focuses exclusively on Confidentiality, not Integrity. In BLP, an unclassified user can write to a Top Secret log file (blind write-up), potentially polluting high-assurance intelligence data.
Real-Time Example 3: Mandatory Access Control (MAC): Biba Integrity Model Formulation
Analysis of Kenneth J. Biba's Integrity Model (1977). Inverts the Bell-LaPadula rules to preserve data integrity and prevent corruption, enforcing the Simple Integrity Property (No Read Down) and the *-Integrity Property (No Write Up).
Python (Biba Integrity Model Enforcement Engine)
from enum import IntEnum

class IntegrityLevel(IntEnum):
    LOW_INTEGRITY       = 1  # Public Internet / Untrusted User Inputs
    MEDIUM_INTEGRITY    = 2  # Standard Applications / Non-admin processes
    HIGH_INTEGRITY      = 3  # OS Kernel / Core Banking Database
    CRITICAL_INTEGRITY  = 4  # Hardware Security Module / Root Trust Engine

class BibaIntegrityController:
    """
    Biba Model Axioms (Mathematical Dual of Bell-LaPadula):
      1. Simple Integrity Property: "NO READ DOWN"
         Subject S can read Object O iff I(S) <= I(O)
         (High-integrity subjects must never read corrupt, unvalidated low-integrity data)

      2. Star Integrity Property (*-property): "NO WRITE UP"
         Subject S can write Object O iff I(S) >= I(O)
         (Low-integrity processes cannot pollute high-integrity data stores)
    """
    @staticmethod
    def evaluate_read(subject_integrity: IntegrityLevel, object_integrity: IntegrityLevel) -> bool:
        # Simple Integrity: No Read Down
        return subject_integrity <= object_integrity

    @staticmethod
    def evaluate_write(subject_integrity: IntegrityLevel, object_integrity: IntegrityLevel) -> bool:
        # Star Integrity: No Write Up
        return subject_integrity >= object_integrity

if __name__ == "__main__":
    controller = BibaIntegrityController()

    kernel_process = IntegrityLevel.HIGH_INTEGRITY
    user_browser   = IntegrityLevel.LOW_INTEGRITY
    bank_database  = IntegrityLevel.HIGH_INTEGRITY
    public_forum   = IntegrityLevel.LOW_INTEGRITY

    print("--- BIBA INTEGRITY MODEL EVALUATION ---")
    
    # Scenario A: Can unauthenticated web browser write directly to the Banking DB?
    can_browser_write_db = controller.evaluate_write(user_browser, bank_database)
    print(f"[*] Low-Integrity Browser Write to High-Integrity DB : {can_browser_write_db} (Blocked: No Write Up)")
    assert not can_browser_write_db

    # Scenario B: Can the Kernel read input from the untrusted public forum?
    can_kernel_read_forum = controller.evaluate_read(kernel_process, public_forum)
    print(f"[*] High-Integrity Kernel Read from Low-Integrity Forum: {can_kernel_read_forum} (Blocked: No Read Down)")
    assert not can_kernel_read_forum

    # Scenario C: Can the Kernel write status to the public forum?
    can_kernel_write_forum = controller.evaluate_write(kernel_process, public_forum)
    print(f"[*] High-Integrity Kernel Write to Low-Integrity Forum : {can_kernel_write_forum} (Allowed: Write Down)")
    assert can_kernel_write_forum
Biba Evaluation Output: --- BIBA INTEGRITY MODEL EVALUATION --- [*] Low-Integrity Browser Write to High-Integrity DB : False (Blocked: No Write Up) [*] High-Integrity Kernel Read from Low-Integrity Forum: False (Blocked: No Read Down) [*] High-Integrity Kernel Write to Low-Integrity Forum : True (Allowed: Write Down) Operating System Application: Microsoft Windows Vista/10/11 implements Biba in Mandatory Integrity Control (MIC): A low-integrity browser process cannot modify high-integrity system files in C:\Windows\System32.
Real-Time Example 4: Role-Based Access Control: NIST Standard (RBAC0 - RBAC3)
Examining the NIST standard for Role-Based Access Control (ANSI/INCITS 359-2004). Analyzes the four RBAC tiers: Core RBAC (RBAC0), Hierarchical RBAC (RBAC1), Constrained RBAC (RBAC2 with Static and Dynamic Separation of Duties), and Unified RBAC (RBAC3).
NIST RBAC Architectural Families & Separation of Duties
THE NIST RBAC MODELING TAXONOMY:

1. RBAC0 (CORE RBAC):
   β€’ Formal sets: Users (U), Roles (R), Permissions (P), Sessions (S).
   β€’ Many-to-Many Mappings: User-to-Role Assignment (UA) and Permission-to-Role Assignment (PA).
   β€’ Users do NOT receive permissions directly. Users inherit permissions solely through assigned roles.

2. RBAC1 (HIERARCHICAL RBAC):
   β€’ Adds partial order role hierarchy (RH): r_1 >= r_2.
   β€’ A senior role inherits all permissions of its junior roles.
   β€’ Example: Department_Chair >= Associate_Professor >= Teaching_Assistant.

3. RBAC2 (CONSTRAINED RBAC):
   β€’ Introduces constraints to prevent fraud via Separation of Duties (SoD):
     β”œβ”€β”€ Static Separation of Duties (SSD):
     β”‚   A user CANNOT be assigned to two conflicting roles simultaneously.
     β”‚   Example: No individual user can hold both "Purchase_Order_Creator" and "PO_Approver".
     └── Dynamic Separation of Duties (DSD):
         A user may possess both roles, but CANNOT activate both roles within the same active session!
         Example: A user holding Cashier and Auditor can only audit transactions in sessions where Cashier is disabled.

4. RBAC3 (UNIFIED RBAC):
   β€’ Combines RBAC1 Hierarchy + RBAC2 Constraints into an enterprise governance framework.

RELATIONAL DATA STRUCTURE MAPPINGS:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  USERS (U)   │◄──(UA)──►│      ROLES (R)       │◄──(PA)──►│PERMISSIONS P β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€          β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€          β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ 1: Nikita    β”‚          β”‚ 10: Security_Admin   β”‚          β”‚ P1: Drop_DB  β”‚
β”‚ 2: Aarav     β”‚          β”‚ 20: Software_Engineerβ”‚          β”‚ P2: Git_Push β”‚
β”‚ 3: Rohan     β”‚          β”‚ 30: QA_Automation    β”‚          β”‚ P3: Run_Testsβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enterprise Value: RBAC prevents permission creep. When an employee changes departments, changing a single role assignment automatically updates their access across hundreds of systems, adhering to the Principle of Least Privilege.
Real-Time Example 5: Implementing Hierarchical RBAC with Separation of Duties in Python
Building a complete RBAC1/RBAC2 engine in Python. Implements role inheritance, Static Separation of Duties (SSD) validation during role assignment, and dynamic runtime authorization checks.
Python (NIST Hierarchical RBAC Engine with SoD Constraint Validation)
from typing import Set, Dict, List

class RbacEngine:
    def __init__(self):
        # Role -> Set of direct permissions
        self.role_permissions: Dict[str, Set[str]] = {}
        # Role -> Set of direct parent roles (Hierarchy)
        self.role_parents: Dict[str, Set[str]] = {}
        # User -> Set of assigned roles
        self.user_roles: Dict[str, Set[str]] = {}
        # Static Separation of Duties (SSD): Pairs of mutually exclusive roles
        self.ssd_conflicts: List[Set[str]] = []

    def add_role(self, role: str, permissions: Set[str]):
        self.role_permissions[role] = permissions
        if role not in self.role_parents:
            self.role_parents[role] = set()

    def add_role_inheritance(self, senior_role: str, junior_role: str):
        """senior_role inherits all permissions of junior_role (senior >= junior)"""
        self.role_parents[senior_role].add(junior_role)

    def add_ssd_conflict(self, role_a: str, role_b: str):
        """Declares that no user may hold both role_a and role_b simultaneously."""
        self.ssd_conflicts.append({role_a, role_b})

    def assign_role_to_user(self, user: str, role: str):
        current_roles = self.user_roles.get(user, set())
        candidate_roles = current_roles.union({role})

        # Validate Static Separation of Duties (SSD)
        for conflict_pair in self.ssd_conflicts:
            if conflict_pair.issubset(candidate_roles):
                raise PermissionError(
                    f"SSD VIOLATION: User '{user}' cannot hold conflicting roles: {conflict_pair}"
                )

        self.user_roles[user] = candidate_roles

    def get_all_permissions_for_role(self, role: str) -> Set[str]:
        """Recursively resolves permissions through role inheritance hierarchy."""
        perms = set(self.role_permissions.get(role, set()))
        for junior in self.role_parents.get(role, set()):
            perms.update(self.get_all_permissions_for_role(junior))
        return perms

    def is_authorized(self, user: str, required_permission: str) -> bool:
        user_assigned_roles = self.user_roles.get(user, set())
        for r in user_assigned_roles:
            if required_permission in self.get_all_permissions_for_role(r):
                return True
        return False

if __name__ == "__main__":
    rbac = RbacEngine()

    # 1. Register permissions and roles
    rbac.add_role("Intern", {"read_docs"})
    rbac.add_role("Developer", {"git_push", "run_local_tests"})
    rbac.add_role("Release_Manager", {"deploy_prod", "approve_release"})
    rbac.add_role("Financial_Auditor", {"audit_ledger"})

    # 2. Build Role Hierarchy: Release_Manager >= Developer >= Intern
    rbac.add_role_inheritance("Developer", "Intern")
    rbac.add_role_inheritance("Release_Manager", "Developer")

    # 3. Define Static Separation of Duties: Release_Manager and Financial_Auditor cannot mix
    rbac.add_ssd_conflict("Release_Manager", "Financial_Auditor")

    # 4. User Role Assignments
    rbac.assign_role_to_user("Aarav", "Release_Manager")
    print(f"[*] Aarav permissions: {rbac.get_all_permissions_for_role('Release_Manager')}")
    print(f"  β€’ Aarav can deploy_prod?      : {rbac.is_authorized('Aarav', 'deploy_prod')}")
    print(f"  β€’ Aarav can read_docs?        : {rbac.is_authorized('Aarav', 'read_docs')} (Inherited from Intern)")

    # 5. Attempt SoD Violation
    try:
        print("[*] Attempting to assign 'Financial_Auditor' to Aarav...")
        rbac.assign_role_to_user("Aarav", "Financial_Auditor")
    except PermissionError as e:
        print(f"[βœ”] Security Constraint Enforced: {e}")
RBAC Execution Output: [*] Aarav permissions: {'approve_release', 'run_local_tests', 'read_docs', 'deploy_prod', 'git_push'} β€’ Aarav can deploy_prod? : True β€’ Aarav can read_docs? : True (Inherited from Intern) [*] Attempting to assign 'Financial_Auditor' to Aarav... [βœ”] Security Constraint Enforced: SSD VIOLATION: User 'Aarav' cannot hold conflicting roles: {'Financial_Auditor', 'Release_Manager'} Result: Role inheritance simplifies administrative management, while SSD rules prevent toxic combinations of conflicting permissions.
Real-Time Example 6: Attribute-Based Access Control (ABAC): Dynamic Context & XACML Architecture
Analysis of Attribute-Based Access Control (NIST SP 800-162) and the XACML framework. Explains how access decisions evaluate four attribute vectors: Subject, Resource, Action, and Environment context (Time, IP Location, Device Trust).
ABAC Architecture: XACML Component Topography
THE ABAC / XACML (eXtensible Access Control Markup Language) PIPELINE:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 1. PEP (POLICY ENFORCEMENT POINT):                                                            β”‚
β”‚    β€’ Intercepts access request from user: "Aarav requests Action:VIEW on Resource:EXAM_KEY"   β”‚
β”‚    β€’ Generates Authorization Query to PDP.                                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                β”‚
                                                β–Ό (Forwards Attribute Query)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 2. PIP (POLICY INFORMATION POINT):                                                            β”‚
β”‚    β€’ Collects contextual attributes across four distinct vectors:                             β”‚
β”‚      β”œβ”€β”€ Subject Attributes     : Role="Professor", Clearance="Secret", Dept="CS"             β”‚
β”‚      β”œβ”€β”€ Resource Attributes    : Owner="Exam_Board", Classification="Secret", Dept="CS"      β”‚
β”‚      β”œβ”€β”€ Action Attributes      : Type="VIEW", Protocol="HTTPS_REST"                          β”‚
β”‚      └── Environment Attributes : Time="14:30 IST", Location="Campus_LAN", DeviceHealth="OK"  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                β”‚
                                                β–Ό (Aggregates Attributes into Policy Evaluator)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 3. PDP (POLICY DECISION POINT):                                                               β”‚
β”‚    β€’ Retrieves active enterprise rules from PAP (Policy Administration Point).                β”‚
β”‚    β€’ Evaluates boolean rule logic:                                                            β”‚
β”‚      IF Subject.Dept == Resource.Dept                                                         β”‚
β”‚      AND Subject.Clearance >= Resource.Classification                                         β”‚
β”‚      AND Environment.Location == "Campus_LAN"                                                 β”‚
β”‚      AND Environment.Time between 09:00 and 17:00                                             β”‚
β”‚      THEN PERMIT ELSE DENY;                                                                   β”‚
β”‚    β€’ Emits verdict: PERMIT, DENY, NOT_APPLICABLE, or INDETERMINATE.                           β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                β”‚
                                                β–Ό (Executes Decision)
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ 4. PEP (POLICY ENFORCEMENT POINT): Gates access and executes Allow/Deny.                      β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Architectural Advantage: ABAC eliminates "role explosion" where thousands of specific roles (e.g., Professor_CS_AfterHours_CampusLAN) are created to handle environmental conditions. ABAC keeps roles clean and evaluates environmental context dynamically.
Real-Time Example 7: Building an ABAC Policy Evaluation Engine in Python
Implementing a lightweight ABAC policy engine in Python. Ingests Subject, Resource, Action, and Environment dictionaries, evaluating conditions against fine-grained operational security requirements.
Python (Dynamic ABAC Policy Engine Evaluation Script)
from dataclasses import dataclass
from typing import Dict, Any, List

@dataclass
class AbacContext:
    subject: Dict[str, Any]
    resource: Dict[str, Any]
    action: Dict[str, Any]
    environment: Dict[str, Any]

class AbacPolicyRule:
    def __init__(self, rule_id: str, description: str, condition_func):
        self.rule_id = rule_id
        self.description = description
        self.condition = condition_func

class DynamicAbacEngine:
    def __init__(self):
        self.policies: List[AbacPolicyRule] = []

    def register_policy(self, rule: AbacPolicyRule):
        self.policies.append(rule)

    def evaluate_request(self, ctx: AbacContext) -> dict:
        # Default Deny (Fail-Safe Defaults)
        decision = "DENY"
        matched_rule = None

        for rule in self.policies:
            if rule.condition(ctx):
                decision = "PERMIT"
                matched_rule = rule.rule_id
                break

        return {
            "decision": decision,
            "matched_policy": matched_rule,
            "subject_user": ctx.subject.get("user_id"),
            "target_resource": ctx.resource.get("resource_id")
        }

if __name__ == "__main__":
    engine = DynamicAbacEngine()

    # Rule: Allow Professors to modify exam papers ONLY if from Campus LAN between 09:00 - 17:00
    def exam_paper_edit_policy(ctx: AbacContext) -> bool:
        is_faculty = ctx.subject.get("role") == "Professor"
        is_dept_match = ctx.subject.get("dept") == ctx.resource.get("dept")
        is_modify_action = ctx.action.get("type") in ["EDIT", "UPDATE"]
        is_campus_network = ctx.environment.get("network_zone") == "CAMPUS_SECURE_LAN"
        is_work_hours = 9 <= ctx.environment.get("hour_ist", 0) <= 17

        return is_faculty and is_dept_match and is_modify_action and is_campus_network and is_work_hours

    engine.register_policy(AbacPolicyRule(
        "POL-EXAM-001",
        "Faculty may edit departmental exams on Campus LAN during work hours",
        exam_paper_edit_policy
    ))

    # Scenario A: Legitimate professor on campus at 14:00
    ctx_allowed = AbacContext(
        subject={"user_id": "alice_prof", "role": "Professor", "dept": "CS"},
        resource={"resource_id": "exam_cs401_2026", "dept": "CS", "sensitivity": "HIGH"},
        action={"type": "EDIT"},
        environment={"network_zone": "CAMPUS_SECURE_LAN", "hour_ist": 14}
    )

    # Scenario B: Legitimate professor attempting edit from home (VPN) at midnight
    ctx_denied_home = AbacContext(
        subject={"user_id": "alice_prof", "role": "Professor", "dept": "CS"},
        resource={"resource_id": "exam_cs401_2026", "dept": "CS", "sensitivity": "HIGH"},
        action={"type": "EDIT"},
        environment={"network_zone": "EXTERNAL_VPN", "hour_ist": 23}
    )

    res_a = engine.evaluate_request(ctx_allowed)
    res_b = engine.evaluate_request(ctx_denied_home)

    print(f"[*] Scenario A (Campus LAN 14:00) : {res_a['decision']} via {res_a['matched_policy']}")
    print(f"[*] Scenario B (Home VPN 23:00)   : {res_b['decision']} (Blocked by ABAC context)")
    assert res_a['decision'] == "PERMIT"
    assert res_b['decision'] == "DENY"
ABAC Evaluation Telemetry: [*] Scenario A (Campus LAN 14:00) : PERMIT via POL-EXAM-001 [*] Scenario B (Home VPN 23:00) : DENY (Blocked by ABAC context) Context Enforcement: Under RBAC, Alice would have been permitted in both scenarios because her role is "Professor". Under ABAC, environmental context (time and network zone) successfully stopped access outside working conditions.
Real-Time Example 8: Debugging Access Control Pitfalls & Authorization Triage
Troubleshooting common access control flaws: Insecure Direct Object References (IDOR), permission accumulation from role sprawl, missing authorization checks in APIs, and circular inheritance loops.
Authorization Defects & Code Triage Solutions
AUTHORIZATION DEFECTS & ARCHITECTURAL CORRECTIONS:

// ==============================================================================
// PITFALL 1: INSECURE DIRECT OBJECT REFERENCE - IDOR (OWASP API1:2023 - BOLA)
// DEFECT: Endpoint accepts object ID from URL and loads record without checking ownership:
// @GetMapping("/students/{studentId}/grades")
// public Grades getGrades(@PathVariable String studentId) {
//     return gradeRepository.findByStudentId(studentId); // VULNERABLE!
// }
// ATTACK: Student STU-1 changes URL to /students/STU-2/grades to view other grades.
// FIX: Enforce Complete Mediation and object-level authorization:
// String currentUserId = SecurityContextHolder.getContext().getAuthentication().getName();
// if (!currentUserId.equals(studentId) && !hasRole("PROFESSOR")) { throw new AccessDeniedException(); }
// ==============================================================================

// ==============================================================================
// PITFALL 2: ROLE EXPLOSION & PERMISSION ACCUMULATION
// SMELL: An organization ends up with 15,000 distinct roles for 5,000 employees.
// CAUSE: New specific roles created for every ad-hoc combination of department,
// location, and task (e.g., Billing_Clerk_Pune_ShiftA).
// FIX: Refactor into Hybrid RBAC + ABAC:
// Assign generic roles (Role: Billing_Clerk) and enforce location/shift via ABAC attributes!
// ==============================================================================

// ==============================================================================
// PITFALL 3: CIRCULAR ROLE INHERITANCE DEADLOCK
// SMELL: Role A inherits from Role B. Role B inherits from Role C. Role C inherits from Role A.
// CAUSE: Unvalidated hierarchical role graphs create an infinite recursion during lookup!
// FIX: Enforce Acyclic Directed Graph (DAG) validation during role inheritance registration:
// assert !graph.createsCycle(seniorRole, juniorRole);
// ==============================================================================
Triage Summary: - IDOR / BOLA Vulnerability: Bound user identity tokens to object record ownership checks. - Role Sprawl: Consolidated thousands of custom roles into baseline RBAC roles supplemented with dynamic ABAC rules. - Circular Role Cycles: Implemented DAG cycle validation checks before accepting inheritance definitions.
Real-Time Example 9: Access Control Model Comparison Reference Matrix
A comprehensive reference summary pairing access control models, governance mechanisms, primary strengths, limitations, and operational best practices for B.Tech engineering students.
Access Control Model Specification Reference Matrix
ACCESS CONTROL MODEL SPECIFICATION MATRIX:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ MODEL                   β”‚ ACCESS DECISION BASIS        β”‚ GOVERNANCE BASIS β”‚ CORE STRENGTH / LIMITATION    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ DAC (Discretionary)     β”‚ Object owner's discretion;   β”‚ Decentralized    β”‚ Flexible, simple / Vulnerable β”‚
β”‚                         β”‚ User UID / POSIX mode bits   β”‚ (Owner controlledβ”‚ to Trojan horses & chmod leaksβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ MAC: Bell-LaPadula      β”‚ Multi-Level Security labels; β”‚ Centralized      β”‚ Mathematical confidentiality; β”‚
β”‚                         β”‚ No Read Up, No Write Down    β”‚ Lattice / Kernel β”‚ Prevents leaks / Ignores integβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ MAC: Biba Integrity     β”‚ Integrity level labels;      β”‚ Centralized      β”‚ Protects data integrity;      β”‚
β”‚                         β”‚ No Read Down, No Write Up    β”‚ Lattice / Kernel β”‚ Stops unauthorized corruption β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ RBAC (Role-Based)       β”‚ User roles (NIST RBAC0-3);   β”‚ Centralized      β”‚ Scales in enterprise; supportsβ”‚
β”‚                         β”‚ Role hierarchy, SoD checks   β”‚ Administrator    β”‚ SoD / Risk of role explosion  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ ABAC (Attribute-Based)  β”‚ Dynamic attributes: Subject, β”‚ Centralized      β”‚ Fine-grained, context-aware;  β”‚
β”‚ (NIST SP 800-162)       β”‚ Resource, Action, Environmentβ”‚ Policy Rules     β”‚ Zero Trust ready / CPU computeβ”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ RuBAC (Rule-Based)      β”‚ Static operational rules     β”‚ System Admin /   β”‚ Time/location restrictions;   β”‚
β”‚                         β”‚ (e.g., Firewall IP 5-tuples) β”‚ Router Config    β”‚ Limited user context          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ TOP 5 ACCESS CONTROL DESIGN PRINCIPLES:                                                                   β”‚
β”‚ 1. Enforce Complete Mediation: Validate authorization on every request; never cache access checks.        β”‚
β”‚ 2. Default Deny: All access requests must default to DENY unless an explicit policy permits them.         β”‚
β”‚ 3. Separate Conflicting Roles: Use Static and Dynamic Separation of Duties (SoD) to prevent fraud.        β”‚
β”‚ 4. Prevent IDOR with Object-Level Checks: Never trust user-supplied IDs without verifying ownership.      β”‚
β”‚ 5. Combine RBAC and ABAC: Use RBAC for broad role structures and ABAC for environmental context.          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Academic & Professional Standard: Access control models form the core authorization boundary of computing systems. Understanding how discretionary, mandatory, role-based, and attribute-based access controls operate prepares B.Tech students to design secure operating system policies, configure enterprise IAM directories, and architect zero-trust microservice meshes.