Policy Packs
Check GCP Network Load Balancers Enforce HTTPS for Encrypted Web Traffic

Check GCP Network Load Balancers Enforce HTTPS for Encrypted Web Traffic

Ensure that GCP Network Load Balancers are configured to use valid SSL/TLS certificates in order to handle encrypted web traffic. SSL certificate resources contain SSL certificate information that the load balancer uses to terminate SSL/TLS when HTTPS clients connect to it. This practice guarantees that data transmitted between clients and load-balanced applications is encrypted, protecting it from interception and unauthorized access, thereby enhancing security and compliance with regulatory requirements and best practices.

This policy pack can help you configure the following settings for network load balancers:

  • Check and alarm if the URL map for load balancers is configured to use target https proxy

Review policy settings →

Getting Started

Requirements

Credentials

To create a policy pack through Terraform:

  • Ensure you have Turbot/Admin permissions (or higher) in Guardrails
  • Create access keys in Guardrails

And then set your credentials:

export TURBOT_WORKSPACE=myworkspace.acme.com
export TURBOT_ACCESS_KEY=acce6ac5-access-key-here
export TURBOT_SECRET_KEY=a8af61ec-secret-key-here

Please see Turbot Guardrails Provider authentication for additional authentication methods.

Usage

Install Policy Pack

Note

By default, installed policy packs are not attached to any resources.

Policy packs must be attached to resources in order for their policy settings to take effect.

Clone:

git clone https://github.com/turbot/guardrails-samples.git
cd guardrails-samples/policy_packs/gcp/network/check_https_is_enforced_for_load_balancers

Run the Terraform to create the policy pack in your workspace:

terraform init
terraform plan

Then apply the changes:

terraform apply

Apply Policy Pack

Log into your Guardrails workspace and attach the policy pack to a resource.

If this policy pack is attached to a Guardrails folder, its policies will be applied to all accounts and resources in that folder. The policy pack can also be attached to multiple resources.

For more information, please see Policy Packs.