More Info:
This rule checks whether connections to Amazon OpenSearch domains are required to use HTTPS. Enforcing HTTPS helps enhance the security of data in transit by encrypting communication between clients and the OpenSearch domain. The rule is marked as non-compliant if the EnforceHTTPS option is not set to true or if it is set to true and the TLSSecurityPolicy is not set to a valid TLS policy.Risk Level
MediumAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- AWS Startup Security Baseline
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- Cloudanix Best Practice
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO/IEC 27017
- ISO/IEC 27018
- ISO/IEC 27701
- KSA PDPL
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIS2 Directive
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- Reserve Bank of India (RBI) Cyber Security Framework
- Reserve Bank of India (RBI) Master Direction – Information Technology Framework
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To enforce HTTPS for OpenSearch Service domains in AWS, you can follow these steps using the AWS Management Console:
-
Navigate to the Amazon OpenSearch Service Console:
- Go to the AWS Management Console (https://aws.amazon.com/console/).
- In the “Find Services” search bar, type “OpenSearch Service” and select it from the dropdown.
-
Select your OpenSearch domain:
- From the list of OpenSearch domains, select the domain for which you want to enforce HTTPS.
-
Update the domain configuration:
- In the domain dashboard, click on the “Modify domain” button.
-
Enable HTTPS:
- Scroll down to the “Node-to-node encryption” section.
- Enable the “Require HTTPS between OpenSearch nodes” option.
-
Update the domain:
- Scroll to the bottom of the page and click on the “Submit” button to save your changes.
-
Monitor the domain status:
- Once the modification is submitted, monitor the domain status to ensure that the changes are successfully applied.
Using CLI
Using CLI
To enforce HTTPS for OpenSearch Service domains in AWS using AWS CLI, follow these steps:Replace
- Open the AWS CLI and run the following command to update the OpenSearch Service domain configuration to enforce HTTPS:
your-domain-name with the name of your OpenSearch Service domain, 123456789012 with your AWS account ID, and yourpassword with the desired password for the master user.- Wait for the configuration update to be completed. You can monitor the progress by running the following command:
- Once the configuration update is completed, verify that HTTPS is enforced for the OpenSearch Service domain by accessing the domain endpoint using HTTPS.
Using Python
Using Python
To enforce HTTPS for OpenSearch Service domains in AWS, you can use the AWS SDK for Python (Boto3) to update the domain configuration. Here are the step-by-step instructions to remediate this misconfiguration:
-
Install Boto3:
Ensure that you have Boto3 installed in your Python environment. You can install it using pip:
- Configure AWS Credentials: Make sure that your AWS credentials are properly configured on your system or provide the necessary IAM permissions to the AWS SDK for Python.
- Use the following Python script to enforce HTTPS for your OpenSearch domain:
- Run the Python script:
Save the above script in a Python file (e.g.,
enforce_https_opensearch.py) and run it in your terminal:
'your-opensearch-domain-name' with the actual name of your OpenSearch domain before running the script.Please note that this script is a basic example and may need to be adjusted based on your specific requirements and the current configuration of your OpenSearch domain.Using Terraform
Using Terraform
Processing state for several minutes.Verification: terraform plan should show the domain_endpoint_options block being added or updated with enforce_https = true and tls_security_policy = "Policy-Min-TLS-1-2-2019-07" on the target aws_opensearch_domain resource.
