Role-Based Access Control (RBAC) trong An ninh Mạng là gì?
RBAC (Role-Based Access Control) là mô hình kiểm soát truy cập gán quyền hạn (permissions) cho Vai trò (Role) thay vì gán trực tiếp cho User. User được gán Role → kế thừa quyền của Role. Trong an ninh mạng, RBAC áp dụng cho: quản trị firewall, SIEM, Cloud, PAM, Network Device, Application.
Tại sao cần RBAC cho An ninh Mạng?
- Least Privilege (Đặc quyền tối thiểu): User chỉ có quyền cần thiết cho công việc. Giảm bề mặt tấn công nếu account bị compromise.
- Separation of Duties (Phân chia nhiệm vụ - SoD): Không ai có cả quyền "tạo rule firewall" và "approve rule firewall". Giảm rủi ro insider threat, lỗi cấu hình.
- Scalability & Manageability: Onboard/offboard/change role dễ dàng: chỉ add/remove user khỏi group/role, không sửa hàng trăm rule ACL.
- Compliance & Audit: Chứng minh tuân thủ ISO 27001 A.9.2, NIST AC-2, AC-3, AC-6, PCI-DSS 7.1, SOX. Audit trail rõ ràng: User A (Role: Firewall Admin) đã tạo rule X lúc Y.
- Operational Efficiency: Giảm human error, chuẩn hóa quyền theo job function.
Các Vai trò (Roles) điển hình trong đội ngũ An ninh Mạng
| Vai trò (Role) | Trách nhiệm chính | Quyền truy cập điển hình (Least Privilege) | Không có quyền |
|---|---|---|---|
| CISO / Security Director | Chiến lược, ngân sách, báo cáo Board, quản trị rủi ro, crisis management. | Read-only all systems, Approve policy/exception, Vendor contract. | Cấu hình firewall, truy cập log raw, reset password user. |
| Security Architect | Thiết kế kiến trúc Zero Trust, Reference Architecture, Review design, Standard hóa. | Read-only config, Access design repo (Git), Approve architecture decision. | Push config production, truy cập production data. |
| Network Security Engineer (Firewall/NetSec) | Triển khai, vận hành Firewall, VPN, NAC, Proxy, DDoS, Segmentation. | Read/Write config firewall (change control), Read logs, Packet capture (approval). | Tạo user AD, quản trị Server, truy cập Database app. |
| SOC Analyst (Tier 1/2/3) | Monitor alert, Triage, Investigation, Threat Hunting, IR. | Read-only SIEM, EDR, NDR, Threat Intel, Ticketing. Tier 2/3: Run response action (isolate host, block IOC) qua SOAR/approved playbook. | Cấu hình firewall, tạo user, truy cập source code. |
| Cloud Security Engineer | CSPM, CNAPP, IaC Security, Identity (IAM), Network (VPC, SG, FW), Data (Encryption, DLP). | Read/Write Cloud Security Posture (CSPM), Manage IAM policies (via PR), Config GuardDuty/Security Hub. | Truy cập production data (RDS, S3 object), SSH/RDP vào instance (dùng SSM/Serial Console). |
| Identity & Access Management (IAM) Engineer | IdP (Entra ID, Okta, Ping), MFA, SSO, Lifecycle (Joiner/Mover/Leaver), PAM, NHI. | Manage IdP config, Group/Role assignment, Conditional Access, PAM policy. | Cấu hình firewall, truy cập server OS, log SIEM raw. |
| Vulnerability Management / AppSec Engineer | Scan, Prioritize (risk-based), Remediation tracking, SAST/DAST/SCA/Container Sec. | Read scan result, Create ticket, Verify fix (re-scan). Access source code (read) for SAST. | Push production code, cấu hình infra, quản trị user. |
| GRC / Compliance Analyst | Policy/Standard/Procedure, Risk Assessment, Audit, Vendor Risk, Awareness Training. | Read-only evidence (config, log, report), Interview, Request artifact. | Cấu hình bất kỳ hệ thống kỹ thuật nào. |
| Incident Responder / Threat Hunter | Deep investigation, Malware analysis, Forensics, Threat hunting, Purple team. | Read-only full packet capture (PCAP), Memory dump, Disk image, EDR query, Threat Intel platform. | Thay đổi config production, deploy agent, quản trị user. |
| Automation / SecDevOps Engineer | CI/CD Security Gate, Policy as Code (OPA, Sentinel), SOAR Playbook, Infra as Code (Terraform), Tooling. | Write/Run automation pipeline, Manage secrets (Vault), Read config repo. | Manual change production, truy cập data nhạy cảm. |
Triển khai RBAC cho thiết bị Mạng (Network Devices: Router, Switch, Firewall)
Mô hình AAA (Authentication, Authorization, Accounting)
- Authentication (Xác thực): TACACS+ (ưu tiên cho device admin - tách auth/author/acct, encrypt toàn bộ payload) hoặc RADIUS (phổ biến cho VPN, Wi-Fi 802.1X).
- Authorization (Phân quyền): TACACS+ server (Cisco ISE, Arista CloudVision, FortiAuthenticator, FreeRADIUS + TACACS module) trả về Privilege Level (0-15) hoặc Command Authorization Set (cmd-allow/deny).
- Accounting (Kiểm toán): Ghi log mọi command đã gõ (TACACS+ accounting) → SIEM.
Privilege Levels Cisco (Ví dụ)
| Level | Vai trò | Commands điển hình |
|---|---|---|
| 1 | Monitor / Read-only (NOC Tier 1) | show running-config, show interfaces, show logging, ping, traceroute |
| 7 | Junior Network Engineer | configure terminal (limited), interface config (no routing protocol), vlan, port-security |
| 15 | Senior Network Engineer / NetSec Engineer | Full config: routing (BGP/OSPF), ACL, VPN, Firewall policy, AAA, reload, write memory |
Command Authorization (TACACS+) - Ví dụ
# Trên TACACS+ server (Cisco ISE)
# Role: Firewall-Admin
shell:priv-lvl=15
shell:cmd-allow=configure terminal
shell:cmd-allow=firewall.*
shell:cmd-allow=access-list.*
shell:cmd-deny=username.* # Không được tạo user local
shell:cmd-deny=aaa.* # Không được sửa AAA
RBAC cho Cloud (AWS / Azure / GCP)
- AWS IAM: Policy gán cho Role/Group. Condition key: `aws:RequestedRegion`, `aws:PrincipalTag`, `aws:MultiFactorAuthPresent`. Permission Boundary giới hạn max permission.
- Azure RBAC: Built-in roles (Reader, Contributor, Owner, Security Admin, Network Contributor) + Custom Role. Management Group → Subscription → Resource Group → Resource. PIM (Privileged Identity Management) cho JIT elevation.
- GCP IAM: Primitive roles (Owner, Editor, Viewer) + Predefined roles (compute.networkAdmin, securitycenter.findingsEditor) + Custom roles. Organization Policy Service (Constraints).
RBAC cho SIEM / SOAR / XDR
- Role: Analyst (Search, Dashboard, Create Case), Hunter (Advanced query, Threat Intel, Notebook), Responder (Run Playbook: Isolate, Block, Reset Pass), Admin (Rule tuning, Parser, Integration, User mgmt).
- Data RBAC: Restrict index/log source access by team (PCI logs only PCI team).
Thách thức triển khai RBAC
| Thách thức | Giải pháp |
|---|---|
| Role Explosion (quá nhiều role, granularity quá細) | Attribute-Based Access Control (ABAC) kết hợp: Role + Attribute (Department, Project, Sensitivity, Time, Location). Policy Engine: OPA, Cedar, ALFA. |
| Orphaned Access (User đổi vai trò nhưng quyền cũ còn lại) | |
| Emergency Access (Break-glass) | |
| Non-Human Identity (NHI): Service Account, API Key, Token, Cert |
Kết luận
An ninh mạng dựa trên vai trò (Role-Based Network Security) là việc áp dụng RBAC/ABAC xuyên suốt toàn bộ stack: Network Device (TACACS+), Cloud (IAM), SIEM/SOAR, Application, Data. Nó thực thi Least Privilege, Separation of Duties, Auditability, và Operational Agility. Thành công đòi hỏi: Identity Governance (IGA) tự động hóa, Policy as Code, Continuous Access Review, và Break-glass procedure an toàn.