Skip to content

Commit 60d9e7c

Browse files
committed
enforce S3-SSE requests to CloudTrail bucket
1 parent 8915460 commit 60d9e7c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

security/cloudtrail.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,16 @@ Resources:
215215
Condition:
216216
Bool:
217217
'aws:SecureTransport': false
218+
- Sid: EnforceSSERequests
219+
Effect: Deny
220+
Principal: '*'
221+
Action: 's3:PutObject'
222+
Resource: !If [HasLogFilePrefix, !Sub 'arn:aws:s3:::${TrailBucket}/${LogFilePrefix}/AWSLogs/${AWS::AccountId}/*', !Sub 'arn:aws:s3:::${TrailBucket}/AWSLogs/${AWS::AccountId}/*']
223+
Condition:
224+
StringNotEquals:
225+
's3:x-amz-server-side-encryption':
226+
- 'AES256'
227+
- 'aws:kms'
218228
TrailLogGroup:
219229
Type: 'AWS::Logs::LogGroup'
220230
Properties:

0 commit comments

Comments
 (0)