Skip to content

Files

Latest commit

 

History

History
37 lines (25 loc) · 869 Bytes

aws-elastic-search-enforce-https.md

File metadata and controls

37 lines (25 loc) · 869 Bytes

Pattern: Use of HTTP for AWS Elasticsearch

Issue: -

Description

Plain HTTP is unencrypted and human-readable. This means that if a malicious actor was to eavesdrop on your connection, they would be able to see all of your data flowing back and forth.

You should use HTTPS, which is HTTP over an encrypted (TLS) connection, meaning eavesdroppers cannot read your traffic.

Resolution: Enforce the use of HTTPS for Elasticsearch.

Examples

Example of incorrect code:

resource "aws_elasticsearch_domain" "bad_example" {
  domain_name = "domain-foo"

  domain_endpoint_options {
    enforce_https = false
  }
}

Example of correct code:

resource "aws_elasticsearch_domain" "good_example" {
  domain_name = "domain-foo"

  domain_endpoint_options {
    enforce_https = true
  }
}