Security
D1 · Secure
~1 phút đọcEncryption in transit — pattern từng service
Bảo mật kết nối: HTTPS/TLS ở ALB/CloudFront/API GW, IPsec ở VPN, TLS native ở DB, SigV4 API call.
tls
https
sigv4
in-transit
Sơ đồ tổng quan
Đang tải sơ đồ…
Web/API layer
- CloudFront: viewer protocol `Redirect HTTP to HTTPS` hoặc `HTTPS Only`. Custom domain + ACM cert (public) phải ở region us-east-1.
- ALB: listener HTTPS, attach ACM cert. Redirect action HTTP→HTTPS. SNI hỗ trợ nhiều cert cùng listener.
- NLB: hỗ trợ TLS listener (terminate ở NLB) hoặc TCP passthrough (giữ encrypted tới backend).
- API Gateway: cấu hình custom domain + ACM. Private API dùng cert internal (ACM Private CA).
Backend & S3
- S3: bật `aws:SecureTransport` trong bucket policy để ép HTTPS, từ chối HTTP.
- S3 + CloudFront: Origin Protocol Policy `HTTPS Only` cho custom origin; S3 thì native HTTPS qua OAC.
- RDS/Aurora: yêu cầu `rds.force_ssl=1`, client kết nối với `sslmode=require` + `rds-ca-rsa2048-g1` CA bundle.
- Redis: bật `in-transit encryption` (TLS) + `at-rest encryption` (KMS). Memcached không hỗ trợ TLS native.
Hybrid
- VPN: IPsec ESP encrypt trên Internet.
- Direct Connect: KHÔNG mã hóa mặc định → thêm VPN over DX (MACsec nếu hardware hỗ trợ) cho compliance.
- Transit Gateway + VPN: IPsec tới TGW, sau đó intra-AWS traffic không cần encrypt thêm (mặc định traffic intra-AZ giữa Nitro instance đã encrypted).
Info
Câu hỏi đề 'compliance yêu cầu mã hóa mọi hop cross-region' → thêm VPN over Direct Connect, hoặc dùng Transit Gateway Connect với GRE + BGP.
API signing
Tất cả AWS API call dùng SigV4 ký request với HMAC-SHA256 của secret key. Protect replay & integrity. SDK lo hộ; chỉ khi viết custom client mới cần implement (hoặc dùng thư viện).
Nội dung liên quan
Flashcards liên quan