Back to Checks
Elasticsearch domain isn't encrypted at rest.
AWS-0048
Service: elasticsearchSeverity: high
OfficialBuilt-inVerified
You should ensure your Elasticsearch data is encrypted at rest to help prevent sensitive information from being read by unauthorised users.
Run this check with Prowler
Run in Prowler CloudRun
prowler iac --checks AWS-0048Recommendation
Enable ElasticSearch domain encryption
Check Code
# METADATA
# title: Elasticsearch domain isn't encrypted at rest.
# description: |
# You should ensure your Elasticsearch data is encrypted at rest to help prevent sensitive information from being read by unauthorised users.
# scope: package
# schemas:
# - input: schema["cloud"]
# related_resources:
# - https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/encryption-at-rest.html
# custom:
# id: AWS-0048
# long_id: aws-elasticsearch-enable-domain-encryption
# aliases:
# - AVD-AWS-0048
# - enable-domain-encryption
# - aws-elasticsearch-enable-domain-encryption
# provider: aws
# service: elasticsearch
# severity: HIGH
# recommended_action: Enable ElasticSearch domain encryption
# input:
# selector:
# - type: cloud
# subtypes:
# - service: elasticsearch
# provider: aws
# examples: checks/cloud/aws/elasticsearch/enable_domain_encryption.yaml
package builtin.aws.elasticsearch.aws0048
import rego.v1
import data.lib.cloud.metadata
deny contains res if {
some domain in input.aws.elasticsearch.domains
not domain.atrestencryption.enabled.value
res := result.new(
"Domain does not have at-rest encryption enabled.",
metadata.obj_by_path(domain, ["atrestencryption", "enabled"]),
)
}