Mã hoá dữ liệu: server-side encryption và client-side encryption
Dữ liệu trên S3 luôn được mã hoá; điều cần quyết định là ai giữ key mã hoá và có cần ghi lại mỗi lần key được sử dụng hay không.
Mọi phương thức mã hoá đều khiến dữ liệu lưu trên đĩa không thể sử dụng nếu không có key. Điểm khác biệt nằm ở thành phần thực hiện mã hoá, nơi lưu trữ key, và việc mỗi lần sử dụng key có được ghi log hay không. Chọn yêu cầu của MFTECH, tải lên ba hoá đơn và quan sát vị trí dữ liệu chuyển sang trạng thái mã hoá:
Chọn một yêu cầu, sau đó nhấn Tải lên 3 hoá đơn để quan sát vị trí mã hoá dữ liệu và nơi lưu trữ key.
Khi chuyển dữ liệu hoá đơn từ data center lên S3, bộ phận bảo mật yêu cầu mỗi tệp được mã hoá bằng một key khác nhau. Yêu cầu này không đòi hỏi chia dữ liệu ra nhiều bucket: với server-side encryption, S3 mã hoá mỗi object bằng một key riêng, kể cả với SSE-S3 mặc định. Client-side encryption là phương án khác hẳn: ứng dụng dùng Amazon S3 Encryption Client để mã hoá dữ liệu cục bộ trước khi gửi; S3 nhận dữ liệu đã mã hoá, không tham gia mã hoá hay giải mã, và không nhận biết object đó đã được mã hoá. Encryption Client cũng mã hoá mỗi object bằng một data key riêng, nhưng ứng dụng phải tích hợp thư viện và tự quản lý wrapping key, nên chỉ phù hợp khi dữ liệu phải được mã hoá trước khi rời khỏi hệ thống của công ty.
- Cấu hình đơn giản nhất: SSE-S3 (mỗi object một key riêng).
- Cần audit việc sử dụng key: SSE-KMS (bật S3 Bucket Key để giảm chi phí gọi KMS).
- Key phải được lưu giữ tại công ty nhưng S3 thực hiện mã hoá: SSE-C (từ tháng 4/2026, SSE-C bị chặn mặc định trên bucket mới; cần bật lại bằng PutBucketEncryption).
- Dữ liệu phải được mã hoá trước khi gửi tới AWS: client-side encryption với Amazon S3 Encryption Client.
Data encryption: server-side and client-side encryption
Data in S3 is always encrypted; what must be decided is who holds the encryption key and whether each use of it must be logged.
Every encryption method makes data at rest unusable without the key. The differences lie in which component performs the encryption, where the key is stored, and whether each use of the key is logged. Choose a MFTECH requirement, upload three invoices and see where the data becomes encrypted:
Chọn một yêu cầu, sau đó nhấn Tải lên 3 hoá đơn để quan sát vị trí mã hoá dữ liệu và nơi lưu trữ key.
When the invoice data moves from the data center to S3, the security team requires every file to be encrypted with a different key. This does not require splitting the data across several buckets: with server-side encryption, S3 encrypts each object with a unique key, including with the default SSE-S3. Client-side encryption is a different approach: the application uses the Amazon S3 Encryption Client to encrypt data locally before sending it; S3 receives data that is already encrypted, plays no role in encrypting or decrypting it, and does not recognize the object as encrypted. The Encryption Client also encrypts every object with a unique data key, but the application must integrate the library and manage the wrapping key itself, so it fits only when data must be encrypted before it leaves the company’s systems.
- Simplest configuration: SSE-S3 (a unique key per object).
- Need to audit key usage: SSE-KMS (enable S3 Bucket Key to reduce the cost of KMS calls).
- Keys must be kept at the company but S3 performs the encryption: SSE-C (since April 2026, SSE-C is blocked by default on new buckets; re-enable it with PutBucketEncryption).
- Data must be encrypted before it is sent to AWS: client-side encryption with the Amazon S3 Encryption Client.