[X] Upgrade Terraspace: Are you using the latest version of Terraspace? This allows Terraspace to fix issues fast. There's an Upgrading Guide: https://terraspace.cloud/docs/misc/upgrading/
[X] Reproducibility: Are you reporting a bug others will be able to reproduce and not asking a question. If you're unsure or want to ask a question, do so on https://community.boltops.com
[X] Code sample: Have you put together a code sample to reproduce the issue and make it available? Code samples help speed up fixes dramatically. If it's an easily reproducible issue, then code samples are not needed. If you're unsure, please include a code sample.
The following Bucket Policy is being created and Security Hub still have the following finding:
S3.5 S3 buckets should require requests to use Secure Socket Layer
TerraspacePluginAws.configure do |config|
config.auto_create = true # set to false to completely disable auto creation
config.tag_existing = true # if bucket or dynamodb already exists will tag them. Tags are appended.
config.s3.access_logging = true # false is the default setting
config.s3.block_public_access = true
config.s3.encryption = true
config.s3.enforce_ssl = true
config.s3.lifecycle = true
config.s3.versioning = true
config.s3.secure_existing = true # run the security controls on existing buckets. by default, only run on newly created bucket the first time
# config.s3.tags = {} # override config.tags setting
config.dynamodb.encryption = true
config.dynamodb.kms_master_key_id = "alias/aws/dynamodb"
config.dynamodb.sse_type = "KMS"
# config.dynamodb.tags = {} # override config.tags setting
end
Checklist
My Environment
Expected Behaviour
I added the parameter "config.s3.enforce_ssl = true" in the aws.rb and terraspace should create the following bucket policy:
Current Behavior
The following Bucket Policy is being created and Security Hub still have the following finding: S3.5 S3 buckets should require requests to use Secure Socket Layer
Step-by-step reproduction instructions
Activate
config.s3.enforce_ssl = true
in aws.rbCode Sample
Solution Suggestion
Add the policy which is suggested by AWS: https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-standards-fsbp-controls.html#s3-5-remediation