/
kinesis.sp
62 lines (49 loc) · 2.63 KB
/
kinesis.sp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
locals {
kinesis_compliance_common_tags = merge(local.terraform_aws_compliance_common_tags, {
service = "AWS/Kinesis"
})
}
benchmark "kinesis" {
title = "Kinesis"
description = "This benchmark provides a set of controls that detect Terraform AWS Kinesis resources deviating from security best practices."
children = [
control.kinesis_firehose_delivery_stream_encrypted_with_kms_cmk,
control.kinesis_firehose_delivery_stream_server_side_encryption_enabled,
control.kinesis_stream_encrypted_with_kms_cmk,
control.kinesis_stream_encryption_at_rest_enabled,
control.kinesis_video_stream_encrypted_with_kms_cmk
]
tags = merge(local.kinesis_compliance_common_tags, {
type = "Benchmark"
})
}
control "kinesis_stream_encryption_at_rest_enabled" {
title = "Kinesis stream encryption at rest should be enabled"
description = "Ensure Kinesis streams are set to be encrypted at rest to protect sensitive data."
query = query.kinesis_stream_encryption_at_rest_enabled
tags = local.kinesis_compliance_common_tags
}
control "kinesis_firehose_delivery_stream_server_side_encryption_enabled" {
title = "Kinesis firehose delivery streams should have server side encryption enabled"
description = "Enable server-side-encryption (SSE) of your AWS Kinesis Server data at rest, in order to protect your data and metadata from breaches or unauthorized access, and fulfill compliance requirements for data-at-rest encryption within your organization."
query = query.kinesis_firehose_delivery_stream_server_side_encryption_enabled
tags = local.kinesis_compliance_common_tags
}
control "kinesis_firehose_delivery_stream_encrypted_with_kms_cmk" {
title = "Kinesis firehose delivery streams should be encrypted with KMS CMK"
description = "This control checks whether Kinesis Firehose Delivery Streams are encrypted with KMS CMK."
query = query.kinesis_firehose_delivery_stream_encrypted_with_kms_cmk
tags = local.kinesis_compliance_common_tags
}
control "kinesis_stream_encrypted_with_kms_cmk" {
title = "Kinesis streams should be encrypted with KMS CMK"
description = "This control checks whether Kinesis Streams are encrypted with KMS CMK."
query = query.kinesis_stream_encrypted_with_kms_cmk
tags = local.kinesis_compliance_common_tags
}
control "kinesis_video_stream_encrypted_with_kms_cmk" {
title = "Kinesis vidoe streams should be encrypted with KMS CMK"
description = "This control checks whether Kinesis Video Streams are encrypted with KMS CMK."
query = query.kinesis_video_stream_encrypted_with_kms_cmk
tags = local.kinesis_compliance_common_tags
}