| name | cis-gcp-foundations-2.16 |
| description | Ensure Logging is enabled for HTTP(S) Load Balancer |
| category | cis-gcp-foundations |
| version | 4.0.0 |
| author | cyberstrike-official |
| tags | ["cis","gcp","logging","monitoring","load-balancer","networking"] |
| cis_id | 2.16 |
| cis_benchmark | CIS Google Cloud Platform Foundation Benchmark v4.0.0 |
| tech_stack | ["gcp"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
2.16 Ensure Logging is enabled for HTTP(S) Load Balancer (Automated)
Profile Applicability
Description
Logging enabled on a HTTPS Load Balancer will show all network traffic and its destination.
Rationale
Logging will allow you to view HTTPS network traffic to your web applications.
Impact
On high use systems with a high percentage sample rate, the logging file may grow to high capacity in a short amount of time. Ensure that the sample rate is set appropriately so that storage costs are not exorbitant.
Audit
From Google Cloud Console
- From Google Cloud home open the Navigation Menu in the top left.
- Under the
Networking heading select Network services.
- Select the HTTPS load-balancer you wish to audit.
- Select
Edit then Backend Configuration.
- Select
Edit on the corresponding backend service.
- Ensure that
Enable Logging is selected. Also ensure that Sample Rate is set to an appropriate level for your needs.
From Google Cloud CLI
- Run the following command:
gcloud compute backend-services describe <serviceName>
- Ensure that
enable-logging is enabled and sample rate is set to your desired level.
Remediation
From Google Cloud Console
- From Google Cloud home open the Navigation Menu in the top left.
- Under the
Networking heading select Network services.
- Select the HTTPS load-balancer you wish to audit.
- Select
Edit then Backend Configuration.
- Select
Edit on the corresponding backend service.
- Click
Enable Logging.
- Set
Sample Rate to a desired value. This is a percentage as a decimal point. 1.0 is 100%.
From Google Cloud CLI
- Run the following command:
gcloud compute backend-services update <serviceName> --region=REGION --enable-logging --logging-sample-rate=<percentageAsADecimal>
Default Value