More Info:
ElasticSearch domains should be encrypted with KMS. ElasticSearch domains should be encrypted to ensure data at rest is secured.Risk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- GDPR
- HIPAA
- HITRUST CSF
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST CSF
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- PCI
- Reserve Bank of India (RBI) Cyber Security Framework
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- Securities and Exchange Board of India (SEBI) - Cloud Security Adoption Framework
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To remediate the ElasticSearch Domains Should Be Encrypted misconfiguration in AWS using the AWS console, follow these steps:
- Log in to the AWS Management Console.
- Navigate to the Amazon ElasticSearch Service.
- Select the Elasticsearch domain you want to remediate.
- Click on the “Edit” button in the “Encryption” section.
- Select the “Encrypt” option.
- Choose the KMS key that you want to use for encryption.
- Click on the “Save” button to apply the changes.
Using CLI
Using CLI
To remediate ElasticSearch domains that are not encrypted in AWS using AWS CLI, follow these steps:This will enable encryption at rest for the Elasticsearch domain.This should return a response that includes the following:This confirms that the domain is now encrypted at rest.
- Open the AWS CLI and navigate to the AWS Elasticsearch service.
- Check the status of your Elasticsearch domains by running the following command:
- Identify the domain that needs to be encrypted and run the following command to update the domain configuration:
- Verify that the domain is now encrypted by running the following command:
- Repeat these steps for any other Elasticsearch domains that need to be encrypted.
Using Python
Using Python
To remediate the ElasticSearch Domains Should Be Encrypted misconfiguration for AWS using Python, you can follow the below steps:
- Install the AWS SDK for Python (Boto3) using pip:
- Import the necessary libraries:
- Set up the AWS credentials:
- Create an AWS ElasticSearch client:
- Get a list of all ElasticSearch domains:
- For each domain, check if it is encrypted:
- Run the Python script to remediate the misconfiguration.
YOUR_AWS_ACCESS_KEY_ID, YOUR_AWS_SECRET_ACCESS_KEY, and YOUR_AWS_REGION_NAME with your AWS credentials and region name.Using Terraform
Using Terraform
encrypt_at_rest is irreversible in AWS and will trigger a blue/green deployment; the domain remains the same Terraform resource and is not replaced, but configuration updates are blocked while the deployment runs.For verification, terraform plan should show encrypt_at_rest.enabled changing from false (or being added) to true, and if you set it, kms_key_id changing from null (or absent) to "KMS_KEY_ID_OR_ARN".
