Tuần 2 - Ngày 3: Security Pillar
Mục tiêu học tập
- Hiểu design principles của Security pillar
- Nắm vững 6 focus areas của Security
- Biết các AWS services cho security
1. Định nghĩa Security Pillar
Khả năng bảo vệ data, systems, và assets để tận dụng cloud technologies và cải thiện security posture.
6 Focus Areas
- Security Foundations
- Identity and Access Management
- Detection
- Infrastructure Protection
- Data Protection
- Incident Response
2. Design Principles
1. Implement a strong identity foundation
Best Practice:
- Least privilege access
- Centralized identity management (IAM Identity Center)
- No long-term credentials
- Regular permission review
2. Enable traceability
3. Apply security at all layers
Edge Security → CloudFront, WAF, Shield
Network Security → VPC, Security Groups, NACLs
Compute Security → EC2 Instance Profile, Inspector
Application → Secrets Manager, Parameter Store
Data Security → KMS, S3 Encryption
4. Automate security best practices
- Security as Code
- Automated patching
- Automated response to incidents
- Compliance checks
5. Protect data in transit and at rest
6. Keep people away from data
- Automate processing
- Reduce direct access
- Audit when access is needed
7. Prepare for security events
- Incident response plan
- Regular drills
- Forensic capabilities
3. Security Foundations
Shared Responsibility Model
Account Structure
4. Identity and Access Management
IAM Identity Center (AWS SSO)
Service Control Policies (SCPs)
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyRootUser",
"Effect": "Deny",
"Action": "*",
"Resource": "*",
"Condition": {
"StringLike": {
"aws:PrincipalArn": "arn:aws:iam::*:root"
}
}
}
]
}
5. Detection
Detective Controls
| Service | Function |
|---|---|
| GuardDuty | Threat detection using ML |
| Security Hub | Aggregated security findings |
| Detective | Security investigation |
| Inspector | Vulnerability assessment |
| Macie | Sensitive data discovery |
| Config | Configuration compliance |
GuardDuty Findings
Security Hub
6. Infrastructure Protection
Network Security Layers
AWS WAF
7. Data Protection
Encryption Strategy
| Data State | Service | Key Management |
|---|---|---|
| At Rest (S3) | SSE-S3, SSE-KMS | KMS |
| At Rest (EBS) | EBS Encryption | KMS |
| At Rest (RDS) | RDS Encryption | KMS |
| In Transit | TLS 1.2+ | ACM |
AWS KMS
Secrets Management
- Secrets Manager: Automatic rotation, database credentials
- Parameter Store: Configuration, less frequent rotation
8. Incident Response
Response Automation
9. Câu hỏi ôn tập
-
Shared Responsibility Model: AWS chịu trách nhiệm gì?
Xem đáp án
AWS chịu trách nhiệm "Security OF the cloud": physical security của data centers, hardware, network infrastructure, hypervisor/host OS, managed service software. Khách hàng chịu trách nhiệm "Security IN the cloud": OS (patch, update), applications, data (encryption, access), network configuration (SG, NACL), IAM (users, roles, policies). Shared model thay đổi theo service type: IaaS (EC2) → khách hàng nhiều hơn; SaaS/Managed (RDS, Lambda) → AWS nhiều hơn.
-
GuardDuty khác Security Hub như thế nào?
Xem đáp án
GuardDuty: threat detection service — phân tích VPC Flow Logs, DNS, CloudTrail để tìm anomalies và known threats (compromised credentials, coin mining, port scanning). Tự generate findings. Security Hub: aggregation và compliance service — thu thập findings từ GuardDuty, Inspector, Macie, Config, IAM Access Analyzer, và third-party tools vào một dashboard. GuardDuty detects threats; Security Hub consolidates và prioritizes across services.
-
Tại sao nên dùng IAM Identity Center thay vì IAM users?
Xem đáp án
IAM Identity Center (SSO) cho: (1) Centralized access nhiều AWS accounts từ 1 portal — không cần riêng IAM users per account, (2) Integration với existing IdP (Active Directory, Okta, Azure AD) — dùng corporate credentials, (3) Consistent MFA và access policies across organization, (4) Temporary credentials tự động — không cần manage long-term access keys, (5) Audit trail centralized. IAM users per account = messy với 100+ accounts.
-
WAF có thể block những loại attacks nào?
Xem đáp án
WAF block Layer 7 attacks: SQL injection, XSS (Cross-Site Scripting), CSRF, HTTP flood, bad bots, request smuggling. Dùng managed rule groups (AWS hay third-party) hoặc custom rules. Rate-based rules block volumetric Layer 7 DDoS. Geo-blocking theo country. IP reputation lists. WAF không protect Layer 3/4 (volumetric DDoS) — cần Shield cho đó. WAF deploy trên CloudFront, ALB, API GW, AppSync, Cognito.
-
Secrets Manager khác Parameter Store như thế nào?
Xem đáp án
Secrets Manager: tự động rotation của secrets (built-in support cho RDS, Redshift, DocumentDB, custom Lambda rotator), chi phí $0.40/secret/month. Parameter Store: không có built-in auto-rotation, free (Standard tier), simple key-value. Dùng Secrets Manager cho database credentials cần rotation; Parameter Store cho application config, feature flags, non-rotating secrets. Lambda và ECS tích hợp tốt với cả hai.
10. Bài tập thực hành
- Enable GuardDuty trong account
- Setup Security Hub
- Tạo KMS key và encrypt S3 bucket
- Configure WAF với managed rules
Tài liệu tham khảo chính thức
- Security Pillar
- AWS Security Best Practices
- AWS KMS Developer Guide
- AWS WAF Developer Guide
- Amazon GuardDuty
Ngày tiếp theo: Reliability Pillar