-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add s3_key_prefix variable #48
Conversation
/test all |
This pull request is now in conflict. Could you fix it @niraj8? 🙏 |
Hello, I'm interested in having this option in the official module, any chances of merging this? cc @Gowiem |
# Conflicts: # README.md # docs/terraform.md
@@ -12,7 +12,7 @@ resource "aws_cloudtrail" "default" { | |||
tags = module.this.tags | |||
kms_key_id = var.kms_key_arn | |||
is_organization_trail = var.is_organization_trail | |||
|
|||
s3_key_prefix = var.s3_key_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure CloudTrail trail is integrated with CloudWatch Log
Resource: aws_cloudtrail.default | ID: BC_AWS_LOGGING_27
How to Fix
resource "aws_cloudtrail" "aws_cloudtrail_ok" {
name = "tf-trail-foobar"
cloud_watch_logs_group_arn = "${aws_cloudwatch_log_group.example.arn}:*"
}
Description
AWS CloudTrail is a web service that records AWS API calls made in a given AWS account. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably. In addition to capturing CloudTrail logs within a specified S3 bucket for long term analysis, realtime analysis can be performed by configuring CloudTrail to send logs to CloudWatch logs. For a trail that is enabled in all regions in an account, CloudTrail sends log files from all those regions to a CloudWatch logs log group. It is recommended that CloudTrail logs be sent to CloudWatch logs.@@ -12,7 +12,7 @@ resource "aws_cloudtrail" "default" { | |||
tags = module.this.tags | |||
kms_key_id = var.kms_key_arn | |||
is_organization_trail = var.is_organization_trail | |||
|
|||
s3_key_prefix = var.s3_key_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure AWS CloudTrail logs are encrypted using CMKs
Resource: aws_cloudtrail.default | ID: BC_AWS_LOGGING_7
Error in referred variable: variable "kms_key_arn"
How to Fix
Resources:
myTrail:
Type: AWS::CloudTrail::Trail
Properties:
...
+ KMSKeyId: alias/MyAliasName
Description
AWS CloudTrail is a web service that records AWS API calls for an account, and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data. It uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server-side encryption (SSE) and KMS customer created master keys (CMK) to further protect CloudTrail logs.We recommend that CloudTrail logs are configured to use SSE-KMS, providing additional confidentiality controls on log data. A given user must have S3 read permission on the corresponding log bucket and must be granted decrypt permission by the CMK policy.
Benchmarks
- SOC2 CC6.3.3
- PCI-DSS V3.2 3, 10
- HIPAA 164.312(D) Person or entity authentication
- NIST-800-53 AC-17
- ISO27001 A.12.4.2
- CIS AWS V1.2 2.7
- PCI-DSS V3.2.1 10.5.1
- FEDRAMP (MODERATE) AU-9, SC-28
- CIS AWS V1.3 3.7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change details
-
Error ID Change Path Resource BC_AWS_LOGGING_7 Added /main.tf aws_cloudtrail.default BC_AWS_LOGGING_27 Added /main.tf aws_cloudtrail.default
@@ -12,7 +12,7 @@ resource "aws_cloudtrail" "default" { | |||
tags = module.this.tags | |||
kms_key_id = var.kms_key_arn | |||
is_organization_trail = var.is_organization_trail | |||
|
|||
s3_key_prefix = var.s3_key_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure AWS CloudTrail logs are encrypted using CMKs
Resource: aws_cloudtrail.default | ID: BC_AWS_LOGGING_7
Error in referred variable: variable "kms_key_arn"
How to Fix
Resources:
myTrail:
Type: AWS::CloudTrail::Trail
Properties:
...
+ KMSKeyId: alias/MyAliasName
Description
AWS CloudTrail is a web service that records AWS API calls for an account, and makes those logs available to users and resources in accordance with IAM policies. AWS Key Management Service (KMS) is a managed service that helps create and control the encryption keys used to encrypt account data. It uses Hardware Security Modules (HSMs) to protect the security of encryption keys. CloudTrail logs can be configured to leverage server-side encryption (SSE) and KMS customer created master keys (CMK) to further protect CloudTrail logs.We recommend that CloudTrail logs are configured to use SSE-KMS, providing additional confidentiality controls on log data. A given user must have S3 read permission on the corresponding log bucket and must be granted decrypt permission by the CMK policy.
Benchmarks
- SOC2 CC6.3.3
- PCI-DSS V3.2 3, 10
- HIPAA 164.312(D) Person or entity authentication
- NIST-800-53 AC-17
- ISO27001 A.12.4.2
- CIS AWS V1.2 2.7
- PCI-DSS V3.2.1 10.5.1
- FEDRAMP (MODERATE) AU-9, SC-28
- CIS AWS V1.3 3.7
@@ -12,7 +12,7 @@ resource "aws_cloudtrail" "default" { | |||
tags = module.this.tags | |||
kms_key_id = var.kms_key_arn | |||
is_organization_trail = var.is_organization_trail | |||
|
|||
s3_key_prefix = var.s3_key_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure CloudTrail trail is integrated with CloudWatch Log
Resource: aws_cloudtrail.default | ID: BC_AWS_LOGGING_27
How to Fix
resource "aws_cloudtrail" "aws_cloudtrail_ok" {
name = "tf-trail-foobar"
cloud_watch_logs_group_arn = "${aws_cloudwatch_log_group.example.arn}:*"
}
Description
AWS CloudTrail is a web service that records AWS API calls made in a given AWS account. The recorded information includes the identity of the API caller, the time of the API call, the source IP address of the API caller, the request parameters, and the response elements returned by the AWS service. CloudTrail uses Amazon S3 for log file storage and delivery, so log files are stored durably. In addition to capturing CloudTrail logs within a specified S3 bucket for long term analysis, realtime analysis can be performed by configuring CloudTrail to send logs to CloudWatch logs. For a trail that is enabled in all regions in an account, CloudTrail sends log files from all those regions to a CloudWatch logs log group. It is recommended that CloudTrail logs be sent to CloudWatch logs.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change details
-
Error ID Change Path Resource BC_AWS_LOGGING_7 Added /main.tf aws_cloudtrail.default BC_AWS_LOGGING_27 Added /main.tf aws_cloudtrail.default
@Gowiem Let me know if these need to be fixed. |
/test all |
what
s3_key_prefix
variablewhy