File tree Expand file tree Collapse file tree 7 files changed +35
-2
lines changed Expand file tree Collapse file tree 7 files changed +35
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ No modules.
35
35
| [ aws_organizations_policy.deny_guardduty_modify] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/organizations_policy ) | resource |
36
36
| [ aws_organizations_policy.deny_member_leaving] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/organizations_policy ) | resource |
37
37
| [ aws_organizations_policy.deny_s3_public] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/organizations_policy ) | resource |
38
+ | [ aws_organizations_policy.deny_s3_unsecure_requests] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/organizations_policy ) | resource |
38
39
| [ aws_organizations_policy.deny_securityhub_disable] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/organizations_policy ) | resource |
39
40
| [ aws_organizations_policy.require_s3_encryption] ( https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/organizations_policy ) | resource |
40
41
Original file line number Diff line number Diff line change
1
+
2
+ https://aws-samples.github.io/aws-iam-permissions-guardrails/guardrails/scp-guardrails.html
3
+ https://github.com/ScaleSec/terraform_aws_scp
Original file line number Diff line number Diff line change 6
6
"Effect" : " Deny" ,
7
7
"Action" : [
8
8
" cloudtrail:DeleteTrail" ,
9
- " cloudtrail:StopLogging" ,
10
9
" cloudtrail:PutEventSelectors" ,
10
+ " cloudtrail:StopLogging" ,
11
11
" cloudtrail:UpdateTrail"
12
12
],
13
13
"Resource" : [
Original file line number Diff line number Diff line change 6
6
"Effect" : " Deny" ,
7
7
"Action" : [
8
8
" config:DeleteConfigRule" ,
9
+ " config:DeleteConfigurationAggregator" ,
9
10
" config:DeleteConfigurationRecorder" ,
10
11
" config:DeleteDeliveryChannel" ,
12
+ " config:DeleteEvaluationResults" ,
13
+ " config:DeleteRetentionConfiguration" ,
11
14
" config:StopConfigurationRecorder"
12
15
],
13
16
"Resource" : " *"
Original file line number Diff line number Diff line change
1
+ {
2
+ "Version" : " 2012-10-17" ,
3
+ "Statement" : [
4
+ {
5
+ "Sid" : " DenyS3UnsecureRequests" ,
6
+ "Effect" : " Deny" ,
7
+ "Action" : [
8
+ " s3:*"
9
+ ],
10
+ "Resource" : " *" ,
11
+ "Condition" : {
12
+ "Bool" : {
13
+ "aws:SecureTransport" : " false"
14
+ }
15
+ }
16
+ }
17
+ ]
18
+ }
Original file line number Diff line number Diff line change 8
8
"Resource" : " *" ,
9
9
"Condition" : {
10
10
"StringNotEquals" : {
11
- "s3:x-amz-server-side-encryption" : " AES256"
11
+ "s3:x-amz-server-side-encryption" : [ " AES256" , " aws:kms " ]
12
12
}
13
13
}
14
14
},
Original file line number Diff line number Diff line change @@ -113,6 +113,14 @@ resource "aws_organizations_policy" "deny_s3_public" {
113
113
type = " SERVICE_CONTROL_POLICY"
114
114
content = file (" ${ path . module } /files/deny-s3-public.json" )
115
115
}
116
+ resource "aws_organizations_policy" "deny_s3_unsecure_requests" {
117
+ count = local. enable && var. enable_s3 ? 1 : 0
118
+ name = " deny_s3_unsecure_requests"
119
+ description = " Prevent S3 unsecured requests"
120
+ tags = var. tags
121
+ type = " SERVICE_CONTROL_POLICY"
122
+ content = file (" ${ path . module } /files/deny-s3-unsecure-requests.json" )
123
+ }
116
124
resource "aws_organizations_policy" "require_s3_encryption" {
117
125
count = local. enable && var. enable_s3 ? 1 : 0
118
126
name = " require_s3_encryption"
You can’t perform that action at this time.
0 commit comments