Skip to content

Commit 68f62d5

Browse files
authored
Enforce SecureTransport policy on AccessLogsBucket (#863)
#389 #396
1 parent 6a5a5a7 commit 68f62d5

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/rpdk/core/data/managed-upload-infrastructure.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,24 @@ Resources:
6363
"aws:SecureTransport": "false"
6464
Principal: "*"
6565

66+
AccessLogsBucketPolicy:
67+
Type: AWS::S3::BucketPolicy
68+
Properties:
69+
Bucket: !Ref AccessLogsBucket
70+
PolicyDocument:
71+
Version: "2012-10-17"
72+
Statement:
73+
- Sid: Require Secure Transport
74+
Action: "s3:*"
75+
Effect: Deny
76+
Resource:
77+
- !Sub "arn:${AWS::Partition}:s3:::${AccessLogsBucket}"
78+
- !Sub "arn:${AWS::Partition}:s3:::${AccessLogsBucket}/*"
79+
Condition:
80+
Bool:
81+
"aws:SecureTransport": "false"
82+
Principal: "*"
83+
6684
EncryptionKey:
6785
Type: AWS::KMS::Key
6886
DeletionPolicy: Retain

0 commit comments

Comments
 (0)