Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

added policy to check in_transit encryption enable or not for elastic… #1083

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions avd_docs/aws/elasticache/AVD-AWS-0198/docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

Ensure that your AWS ElastiCache Redis clusters have encryption in-transit enabled.

### Impact
<!-- Add Impact here -->

<!-- DO NOT CHANGE -->
{{ remediationActions }}

### Links
- https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html


Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# METADATA
# title: "ElastiCache Redis Cluster Encryption In-Transit"
# description: "Ensure that your AWS ElastiCache Redis clusters have encryption in-transit enabled."
# scope: package
# schemas:
# - input: schema.input
# related_resources:
# - https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/in-transit-encryption.html
# custom:
# avd_id: AVD-AWS-0198
# provider: aws
# service: elasticache
# severity: HIGH
# short_code: enable-in-transit-encryption
# recommended_action: "Enable in-transit encryption for ElastiCache clusters"
# input:
# selector:
# - type: cloud
package builtin.aws.elasticache.aws0198

deny[res] {
group := input.aws.elasticache.replicationgroups[_]
not group.transitencryptionenabled.value
res := result.new("Replication group does not have transit encryption enabled.", group.transitencryptionenabled)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package builtin.aws.elasticache.aws0198

test_detects_when_disabled {
r := deny with input as {"aws": {"elasticache": {"replicationgroups": [{"transitencryptionenabled": {"value": false}}]}}}
count(r) == 1
}

test_when_enabled {
r := deny with input as {"aws": {"elasticache": {"replicationgroups": [{"transitencryptionenabled": {"value": true}}]}}}
count(r) == 0
}