Skip to content

Commit dc84419

Browse files
FIX CCMG-1729: Deny insecure connection to S3 bucket (#29)
1 parent d61a7dd commit dc84419

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

modules/vertice-governance-role/iam_policies.tf

+27
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,33 @@ data "aws_iam_policy_document" "vertice_cur_bucket_access" {
3131
]
3232
}
3333

34+
statement {
35+
sid = "AllowSSLRequestsOnly"
36+
effect = "Deny"
37+
38+
actions = [
39+
"s3:*",
40+
]
41+
42+
resources = [
43+
"arn:aws:s3:::${var.cur_bucket_name}",
44+
"arn:aws:s3:::${var.cur_bucket_name}/*"
45+
]
46+
47+
principals {
48+
type = "*"
49+
identifiers = ["*"]
50+
}
51+
52+
condition {
53+
test = "Bool"
54+
variable = "aws:SecureTransport"
55+
values = [
56+
"false"
57+
]
58+
}
59+
}
60+
3461
lifecycle {
3562
precondition {
3663
condition = var.cur_bucket_name != null

0 commit comments

Comments
 (0)