RBAC (Role Based Access Control) vs ACL (Access Control List)π
πΉ RBAC (Role-Based Access Control)π
- Scope: At the Azure Resource level (Subscription β Resource Group β Storage Account β Container/File System).
- Purpose: Controls management and broad access to resources.
- Assigned via: Azure Active Directory (Azure AD).
-
Examples of RBAC roles:
-
Storage Blob Data Reader β can read blobs/files.
- Storage Blob Data Contributor β can read/write/delete.
- Storage Blob Data Owner β full control.
β Strengths:
- Centralized (assign once at container level, applies to all).
- Great for coarse-grained permissions.
- Easy to manage across thousands of users.
β Limitations:
- Not file/folder level β If you grant access to a file system, users see everything inside.
- Cannot express βUser A can only read
/raw/sales/2025
but not/raw/hr
.β
πΉ ACL (Access Control Lists)π
- Scope: At the data level (directory and file).
- Purpose: Provides fine-grained, POSIX-like permissions within the hierarchical namespace.
- Assigned via: Set on directories/files using ADLS Gen2 APIs, CLI, or Databricks/Spark.
-
ACLs have three types:
-
Read (r) β view file contents, list directory.
- Write (w) β modify contents.
- Execute (x) β traverse directory / access child objects.
β Strengths:
- Very granular (control at file/folder level).
- Mimics traditional file systems (POSIX model).
- Perfect for multi-team data lakes where each team should only see their zone.
β Limitations:
- Can get complex to manage if you have thousands of folders.
- Inheritance isnβt automatic unless you set default ACLs.
πΉ How RBAC and ACL Work Together in ADLS Gen2π
π Think of it as two layers of security:
- RBAC decides: Can this user access this storage account / file system at all?
- ACLs decide: Within that file system, what directories and files can they actually read/write?
π Rule: RBAC grants the door key, ACLs decide which rooms inside you can enter.
πΉ Exampleπ
Scenario:π
- Storage account:
datalakeprod
- File system:
finance
- Directory:
/finance/reports/2025/
User: Alice (Finance Analyst)π
- RBAC: Assign Storage Blob Data Reader at the
finance
file system level β Alice can access the file system. -
ACL:
-
/finance/reports/2025/
β grant Alice read + execute /finance/raw/
β deny access
π Result: Alice can see and read reports from 2025, but she cannot even list or open files in the raw
folder.
πΉ Summaryπ
Feature | RBAC | ACL |
---|---|---|
Scope | Azure resource level | File system (directory/file) |
Granularity | Broad | Fine-grained |
Assigned via | Azure AD | POSIX-like model |
Use case | βWho can access this storage account or container?β | βWithin the container, what files/folders can they access?β |
Best for | Coarse access control | Detailed data lake permissions |
π In short:
- RBAC = Door access to the building.
- ACL = Which rooms and drawers inside you can open.