Description
On an internet-facing ELB, HTTP leaves traffic between users and the ELB unencrypted.
Potential impact
Credentials and personal data can be exposed or requests altered in transit.
Remediation
On nifcloud_elb, set protocol to HTTPS and ssl_certificate_id to the ID of a certificate that covers the service hostname. Connect over HTTPS from outside and verify the certificate and application response.
Examples
The example keeps the VIP on net-COMMON_GLOBAL and terminates TLS at the ELB. Clients use HTTPS on port 443, but the backend must accept HTTP on instance_port 443. Check its network path and access rules.
Before
hcl
resource "nifcloud_elb" "example" {
availability_zone = "east-11"
instance_port = 80
protocol = "HTTP"
lb_port = 80
network_interface {
network_id = "net-COMMON_GLOBAL"
is_vip_network = true
}
}
After
hcl
resource "nifcloud_elb" "example" {
availability_zone = "east-11"
instance_port = 443
protocol = "HTTPS"
ssl_certificate_id = var.ssl_certificate_id
lb_port = 443
network_interface {
network_id = "net-COMMON_GLOBAL"
is_vip_network = true
}
}