Mục tiêu chương / Learning objectives
- Định nghĩa và phân biệt các mô hình dịch vụ IaaS/PaaS/SaaS theo NIST SP 800-145 và hiểu tác động bảo mật của từng mô hình.
- Phân tích Shared Responsibility Model theo từng CSP (AWS/Azure/GCP) và xác định ranh giới trách nhiệm bảo mật khách hàng vs. nhà cung cấp.
- So sánh 4 mô hình triển khai đám mây (Public/Private/Hybrid/Community) và lựa chọn phù hợp theo yêu cầu bảo mật doanh nghiệp.
- Áp dụng kiến trúc tham chiếu CSA Cloud Controls Matrix (CCM) và NIST SP 800-53 vào thiết kế hệ thống đám mây an toàn.
- Thiết kế kiến trúc Hub-Spoke, Zero Trust Cloud Landing Zone và các security pattern trên AWS/Azure.
- Đánh giá chi phí bảo mật đám mây và tối ưu hóa thông qua AWS/Azure Well-Architected Framework Security Pillar.
1. Lý thuyết cốt lõi / Core theory
1.1. Định nghĩa đám mây & Mô hình NIST SP 800-145 (Cloud definitions & NIST model)
NIST SP 800-145 định nghĩa điện toán đám mây với 5 đặc tính thiết yếu: on-demand self-service, broad network access, resource pooling, rapid elasticity, và measured service. Ba mô hình dịch vụ (SPI) được phân biệt rõ:
- IaaS (Infrastructure as a Service): Khách hàng quản lý OS, middleware, runtime, data, applications. CSP quản lý hypervisor, servers, storage, networking. Ví dụ: AWS EC2, Azure Virtual Machines, GCP Compute Engine.
- PaaS (Platform as a Service): Khách hàng chỉ quản lý applications và data. CSP quản lý OS và runtime. Ví dụ: Azure App Service, AWS Elastic Beanstalk, GCP App Engine.
- SaaS (Software as a Service): CSP quản lý toàn bộ stack. Khách hàng chỉ cấu hình ứng dụng và quản lý dữ liệu. Ví dụ: Microsoft 365, Salesforce, Google Workspace.
Quan điểm CCSP — Càng lên cao SPI, khách hàng càng ít kiểm soát: IaaS cho phép hardening OS nhưng yêu cầu patching tự thân; SaaS tiện lợi nhưng visibility bảo mật thấp nhất. Candidate phải nhớ "responsibility shifts UP the stack from customer to CSP."
1.2. Shared Responsibility Model — Ranh giới trách nhiệm (Shared responsibility)
Đây là khái niệm trung tâm của CCSP Domain 1. Mỗi CSP có biểu đồ shared responsibility riêng nhưng nguyên lý chung:
- AWS: "Security OF the cloud" (CSP) vs "Security IN the cloud" (Customer). AWS chịu trách nhiệm về physical datacenter, hypervisor, managed services hardware. Customer chịu trách nhiệm về OS patches, security groups, IAM policies, data encryption.
- Azure: Microsoft Defender for Cloud sử dụng Secure Score để đo lường compliance của customer-managed controls. Azure Policy giúp enforce guardrails.
- GCP: Google's Shared Fate model — Google chia sẻ rủi ro chủ động hơn bằng cách cung cấp security blueprints và deployment guides.
⚠️ Điểm thi hay gặp: Trong SaaS, customer vẫn chịu trách nhiệm về Identity & Access Management (ai được dùng ứng dụng) và Data classification (dữ liệu nào được upload). CSP không tự động bảo vệ dữ liệu sai phân loại của customer.
1.3. Kiến trúc tham chiếu Cloud & CSA CCM (Cloud reference architecture & CSA CCM)
Cloud Security Alliance (CSA) Cloud Controls Matrix (CCM) là framework kiểm soát bảo mật đặc thù cho đám mây, bao gồm 197 objectives chia thành 17 domain. CCM mapping với ISO 27001, NIST SP 800-53, PCI DSS, và GDPR. Trong thiết kế hệ thống, cloud architect sử dụng CCM để:
- Xác định controls cần implement theo model dịch vụ (IaaS/PaaS/SaaS)
- Gap analysis giữa hiện trạng và yêu cầu compliance
- Cơ sở để đánh giá CSP qua CSA STAR Registry (STAR Level 1: Self-Assessment, Level 2: Third-party audit)
NIST SP 800-53 Rev 5 bổ sung các control families quan trọng cho đám mây: SA (System & Services Acquisition), SR (Supply Chain Risk Management), và CA (Assessment, Authorization & Monitoring).
1.4. Cloud Design Principles — Availability, Fault Tolerance, HA (Design principles)
Thiết kế đám mây an toàn và sẵn sàng cao dựa trên các nguyên lý:
- Availability Zones (AZ): Datacenter riêng biệt trong cùng Region, kết nối low-latency. AWS có 3+ AZ/Region; Azure có 3 AZ tại mỗi region hỗ trợ AZ. Triển khai multi-AZ đảm bảo HA khi một AZ gặp sự cố.
- Regions & Edge Locations: Regions là tập hợp AZ địa lý. Edge locations (CloudFront/Azure CDN) cache content gần end user, giảm latency. Bảo mật CDN: origin shield, WAF rules tại edge.
- Fault Tolerance: Hệ thống tiếp tục hoạt động khi một component thất bại. Pattern: Active-Active multi-AZ load balancing, circuit breaker, retry with exponential backoff.
- HA Design: RTO (Recovery Time Objective) và RPO (Recovery Point Objective) là KPI chính. Multi-region active-active đạt RTO gần 0 nhưng chi phí cao nhất.
1.5. Cloud Threat Landscape & Security Architecture Patterns (Threats & patterns)
Mối đe dọa đặc thù đám mây (Cloud-specific threats):
- Misconfiguration: Nguyên nhân #1 của cloud data breaches. S3 bucket public, Azure Blob storage anonymous access, GCP Storage bucket world-readable.
- Insecure APIs: Mọi cloud resource được quản lý qua API. Thiếu authentication, excessive permissions trong API keys là attack vector phổ biến.
- Data exfiltration: Qua misconfigured storage, compromised IAM credentials, hoặc insider threat.
- Account hijacking: Phishing cloud console credentials, MFA bypass, session token theft.
- CSP insider threat: Personnel của CSP có physical access. Mitigated bởi Confidential Computing (hardware-based TEE: AWS Nitro Enclaves, Azure Confidential VMs, GCP Confidential VMs).
Security Architecture Patterns:
- Hub-Spoke (Azure Virtual WAN / AWS Transit Gateway): Hub VNet/VPC tập trung security services (Firewall, IDS/IPS, DNS resolver); Spoke VNets chứa workloads. Traffic đi qua hub để inspection.
- Zero Trust Cloud Landing Zone: Không trust ngầm định bất kỳ request nào dù từ bên trong VNet. Mọi request phải authenticate, authorize, và encrypt. Azure AD Conditional Access + Defender for Cloud = Zero Trust implementation.
- AWS Well-Architected Security Pillar: 6 design principles: implement strong identity foundation, enable traceability, apply security at all layers, automate security best practices, protect data in transit and at rest, keep people away from data.
- Azure Well-Architected Framework Security: Confidentiality, Integrity, Availability triad applied with MCSB (Microsoft Cloud Security Benchmark).
2. Bài thực hành / Hands-on lab
Lab 1 — Kiểm tra Security Posture với Azure CLI & Secure Score
OS: Any · Tool: Azure CLI + Cloud Shell.
- Mở Azure Cloud Shell hoặc terminal có Azure CLI đã cài đặt và đăng nhập (
az login). - Kiểm tra subscription hiện tại và thông tin tenant:
# Xem thông tin subscription & tenant
az account show
# Liệt kê các region châu Á khả dụng (để chọn data residency)
az location list --query "[?name=='southeastasia' || name=='eastasia']" -o table
# Xem Secure Score tổng quan từ Microsoft Defender for Cloud
az security score-controls list --asc-location eastasia -o table 2>/dev/null || \
az security assessment list -o table
# Xem Activity Log 20 sự kiện gần nhất (audit trail)
az monitor activity-log list --max-events 20 \
--query "[].{Caller:caller,Operation:operationName.localizedValue,Status:status.value,Time:eventTimestamp}" \
-o table
✅ Kết quả mong đợi / Expected output: Bảng Security Score hiển thị điểm hiện tại (0-100), danh sách controls với trạng thái Healthy/Unhealthy, và Activity Log với caller (ai thực hiện), operation (làm gì), và timestamp. Ý nghĩa CCSP: Secure Score = chỉ số đo lường mức độ implement controls trong CCM/MCSB.
Lab 2 — Audit IAM & Phát hiện Security Groups mở trên AWS
OS: Any · Tool: AWS CLI (cần cấu hình aws configure trước).
# Xem tổng quan IAM account (số users, groups, policies)
aws iam get-account-summary
# Liệt kê tất cả IAM users và lần cuối dùng password (phát hiện stale accounts)
aws iam list-users | python3 -c "
import json, sys
users = json.load(sys.stdin)['Users']
print(f'{'User':<30} {'LastUsed':<25} {'Created':<25}')
print('-'*80)
for u in users:
last = u.get('PasswordLastUsed', 'Never used')
print(f'{u[\"UserName\"]:<30} {str(last)[:19]:<25} {str(u[\"CreateDate\"])[:19]:<25}')
"
# Phát hiện Security Groups cho phép traffic từ 0.0.0.0/0 (internet)
aws ec2 describe-security-groups \
--query "SecurityGroups[?IpPermissions[?IpRanges[?CidrIp=='0.0.0.0/0']]].{Name:GroupName,ID:GroupId,VPC:VpcId}" \
-o table
✅ Kết quả mong đợi / Expected output: IAM summary hiển thị số Users/Groups/Policies. Bảng users với cột LastUsed (accounts chưa dùng trong 90+ ngày là stale). Bảng Security Groups với CIDR 0.0.0.0/0 = misconfiguration nghiêm trọng — đây là shared responsibility violation: CSP không ngăn customer tạo overly permissive rules.
Lab 3 — Kiểm tra AWS Well-Architected Security posture
OS: Any · Tool: AWS CLI + AWS Trusted Advisor.
# Kiểm tra MFA status của root account (critical security control)
aws iam get-account-summary --query "SummaryMap.AccountMFAEnabled"
# Liệt kê S3 buckets và kiểm tra public access block
aws s3api list-buckets --query "Buckets[].Name" --output text | \
tr '\t' '\n' | head -5 | while read bucket; do
echo -n "Bucket: $bucket -> PublicAccessBlock: "
aws s3api get-public-access-block --bucket "$bucket" \
--query "PublicAccessBlockConfiguration.BlockPublicAcls" \
--output text 2>/dev/null || echo "NOT CONFIGURED (RISK!)"
done
# Xem CloudTrail trails (audit logging - CCSP requirement)
aws cloudtrail describe-trails \
--query "trailList[].{Name:Name,MultiRegion:IsMultiRegionTrail,S3Bucket:S3BucketName,LogEnabled:HasCustomEventSelectors}" \
-o table
✅ Kết quả mong đợi / Expected output: Root MFA = 1 (enabled) là bắt buộc. S3 public access block = True = đúng. CloudTrail multi-region = True đảm bảo audit log đầy đủ. Bất kỳ deviation nào đều là finding trong Well-Architected Review.
3. Tình huống doanh nghiệp / Real-world scenario
Bối cảnh:
Một ngân hàng quốc doanh Việt Nam đang migrate core banking system lên AWS. CISO lo ngại về dữ liệu khách hàng (PII, tài khoản ngân hàng) và yêu cầu CCSP consultant tư vấn mô hình triển khai và kiến trúc bảo mật phù hợp với NHNN (Ngân hàng Nhà nước) và PCI DSS.
Phân tích & Giải pháp:
- Mô hình triển khai: Hybrid Cloud — core banking database giữ on-premises (data residency requirement của NHNN), front-end applications và analytics trên AWS ap-southeast-1 (Singapore). AWS Direct Connect thay vì internet VPN cho latency thấp và bảo mật cao hơn.
- Shared Responsibility: Ngân hàng chịu trách nhiệm encryption at-rest (AWS KMS BYOK với HSM on-prem), IAM policies, CloudTrail logging, và network controls (Security Groups/NACLs). AWS chịu trách nhiệm hardware, hypervisor, physical security.
- Kiến trúc Hub-Spoke: Hub VPC chứa AWS Network Firewall, GuardDuty, Security Hub. Spoke VPCs: production (core banking API), staging, và management.
- Compliance mapping: CCM controls → PCI DSS requirements → AWS Config Rules để tự động phát hiện deviation. AWS Security Hub aggregates findings từ GuardDuty, Inspector, và Macie.
Bài học CCSP: Không có mô hình triển khai "tốt nhất" tuyệt đối — phải phân tích regulatory requirements, risk appetite, và cost. Hybrid Cloud thường là câu trả lời cho regulated industries tại Việt Nam.
4. Tự kiểm tra / Knowledge check
- Theo NIST SP 800-145, điện toán đám mây có 5 đặc tính thiết yếu. Liệt kê và giải thích tầm quan trọng bảo mật của từng đặc tính.
- Trong mô hình SaaS, khách hàng vẫn chịu trách nhiệm về những gì? Lấy ví dụ với Microsoft 365 và một tình huống breach xảy ra do customer misconfiguration.
- Phân biệt Hub-Spoke architecture với flat VPC architecture. Tại sao Hub-Spoke được khuyến nghị cho enterprise cloud deployments từ góc độ bảo mật?
- CSA CCM khác với NIST SP 800-53 như thế nào? Khi nào dùng CCM, khi nào dùng NIST?
- Giải thích 3 threat vectors phổ biến nhất trong cloud (Verizon DBIR 2024 data) và control tương ứng trong AWS Well-Architected Security Pillar.
- Một CTO hỏi: "Tại sao phải dùng Availability Zones thay vì chỉ cần backup?" — Trả lời bằng cách so sánh RTO/RPO của hai approach.