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¶
Overview¶
When accessing SSE-KMS–encrypted S3 buckets, Privacera DataServer requires the following AWS permissions:
- Standard S3 permissions for object operations (read, write, delete)
- AWS KMS permissions for data encryption and decryption
- Optional permission:
s3:GetEncryptionConfiguration
(Required to retrieve and validate the bucket encryption configuration)
These permissions ensure secure access to encrypted S3 data while complying with AWS and Privacera security requirements.
Encryption Types Covered¶
The following S3 encryption configurations are supported:
| Bucket Type | KMS Key Type |
|---|---|
| SSE-KMS | AWS-managed key (aws/s3) |
| SSE-KMS with CMK | Customer-managed key |
Steps¶
Follow the steps below to enable AWS KMS–based server-side encryption (SSE-KMS) for S3 buckets accessed by Privacera DataServer
1. Update IAM Policy – Granting S3 and KMS Access¶
Update the IAM policy configured in the DataServer profile to allow:
- Standard S3 read/write/delete operations
- Access to bucket encryption configuration
- Required AWS KMS permissions so Amazon S3 can encrypt and decrypt objects using
aws:kms
your-bucket-name→ Your S3 bucket name(s)your-region→ AWS region (for example,us-east-1)account-id→ Your AWS account IDkey-id→ Your AWS KMS key ID
Note
The permission s3:GetEncryptionConfiguration is required to avoid AccessDenied errors when accessing SSE-KMS–enabled buckets.
2. Update KMS Key Policy (Required for CMK)¶
When using SSE-KMS with a customer-managed key (CMK), the KMS key policy must explicitly allow the Privacera DataServer IAM role.
Add the following statement to the KMS key policy:
| JSON | |
|---|---|
Replace:
account-id→ Your AWS account ID (for example,123456789)your-dataserver-role-name→ Your DataServer IAM role name
Important
IAM permissions alone are not sufficient for CMK access. Without this key policy, S3 operations will fail with AccessDenied errors.
3. S3 Bucket Policy¶
S3 bucket policies are used to enforce SSE-KMS encryption for all objects uploaded to an S3 bucket.
These policies ensure that objects are not uploaded without encryption or with an incorrect encryption configuration.
SSE-KMS Buckets (AWS-Managed Key)¶
Use this policy when the S3 bucket is configured to use the AWS-managed KMS key (aws/s3).
This policy:
- Denies object uploads if SSE-KMS is not used
- Denies uploads when the encryption header is missing
SSE-KMS with Customer-Managed Key (CMK)¶
When using a customer-managed AWS KMS key (CMK), enforce the use of a specific KMS key ARN by applying the following S3 bucket policy.
This policy provides the following enforcement:
- Enforces SSE-KMS encryption for all object uploads
- Restricts uploads to a specific customer-managed KMS key
- Prevents unencrypted object uploads
Replace
your-bucket-name→ Your S3 bucket namearn:aws:kms:region:account-id:key/key-id→ Full AWS KMS key ARN
Note
When configuring policies, always use the KMS Key ARN, not the Key Material ID.
- Prev topic: Advanced Configuration