Configure S3 Encryption
Perform the following steps to configure S3 encryption.
- To support S3 encrypted using AWS KMS, include the following property in the
vars.dataserver.aws.ymlfile: - There are three parts to the
S3_ENCRYPTION_BUCKET_DATAproperty:- S3_ENCRYPTION_BUCKET_NAME: Comma-separated list of S3 bucket names.
- S3_ENCRYPTION_SSETYPE: The type of server-side encryption to use for the S3 bucket. The supported values are
SSE-C,SSE-KMS, andSSE-S3. - S3_ENCRYPTION_SSEKEY: The server-side encryption key to use for the S3 bucket. This is optional based on the
SSE_TYPEvalue:- For SSE_TYPE
SSE-CSSE_KEY is mandatory, for SSE_TYPESSE-KMSSSE_KEY is optional and for SSE_TYPESSE-S3there is no SSE_KEY.
- For SSE_TYPE
- To enable Encryption for Multiple S3 Buckets:
- Use the
S3_ENCRYPTION_BUCKET_DATAproperty to specify encryption details for multiple S3 buckets. The list format is as follows: - Examples :
- Use the
- Once the properties are configured, refer to the Privacera Manager Quickstart.
- In PrivaceraCloud, navigate to Settings -> Applications.
- On the Connected Applications screen, select S3.
- Click the edit icon next to the
Account Name, then go to Access Management -> ADVANCED tab. - Add the following property with the appropriate value for
<your_profile_name>,<your_s3_bucket_name>,<sse_type>, and<sse_key>:Properties - S3_ENCRYPTION_BUCKET_NAME: Comma-separated list of S3 bucket names.
- S3_ENCRYPTION_SSETYPE: The type of server-side encryption to use for the S3 bucket. The supported values are
SSE-C,SSE-KMS, andSSE-S3. - S3_ENCRYPTION_SSEKEY: The server-side encryption key to use for the S3 bucket. This is optional based on the
SSE_TYPEvalue:- For SSE_TYPE
SSE-CSSE_KEY is mandatory, for SSE_TYPESSE-KMSSSE_KEY is optional and for SSE_TYPESSE-S3there is no SSE_KEY.
- For SSE_TYPE
- Click the Test Connection button to verify the connection.
- Once the connection is successful, click Save.
To Support S3 Encryption Using AWS KMS¶
Follow the steps below to enable AWS KMS encryption in S3 bucket.
-
Update IAM Policy – Granting KMS Access for S3 Encryption
Update the IAM policy configured in the DataServer profile to include the necessary AWS KMS permissions (
Decrypt,GenerateDataKey*) so that Amazon S3 can use the CMK for server-side encryption (aws:kms) when uploading and downloading objects.JSON -
Bucket Policy – Enforcing SSE-KMS
To ensure that all objects uploaded to the bucket are encrypted with SSE-KMS, update the bucket policy under the bucket’s Permissions → Bucket policy: This policy denies
s3:PutObjectrequests that are missing thex-amz-server-side-encryptionheader or where the value is notaws:kms, ensuring every write is KMS-encrypted.
- Prev topic: Advanced Configuration