Skip to main content

More Info:

Ensure Cloud CDN regional backend services have failover policy enabled.

Risk Level

High

Address

Operational Maturity, Performance Efficiency, Reliability, Security

Compliance Standards

  • APRA CPS 234 (Australia)
  • 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)
  • Essential 8
  • 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
  • SWIFT Customer Security Controls Framework
  • Sarbanes-Oxley IT General Controls
  • UK NCSC Cyber Assessment Framework

Triage and Remediation

Remediation

Using Console

To remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” for GCP using GCP console, please follow the below steps:
  1. Open the GCP console and navigate to the Cloud CDN page.
  2. Select the CDN endpoint you want to remediate.
  3. Click on the “Edit” button at the top of the page.
  4. Scroll down to the “Backend services” section and click on the “Edit” button next to it.
  5. Click on the “Advanced” tab.
  6. Under “Failover policy”, select the “Enabled” option.
  7. Click on the “Save” button to save the changes.
By enabling the failover policy, the CDN endpoint will automatically switch to a backup backend service if the primary service becomes unavailable. This will ensure that your users continue to have access to your content even in the event of a backend service failure.

To remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” for GCP using GCP CLI, follow the below steps:
  1. Open the GCP Cloud Shell in the GCP Console.
  2. Run the following command to enable the failover policy for the regional backend services in Cloud CDN:
    Replace [BACKEND_SERVICE_NAME] with the name of the backend service that you want to update.
  3. Verify that the failover policy has been enabled by running the following command:
    This command should output the failover policy for the backend service. Note: If the output shows that the failover policy is not enabled, you may need to wait a few minutes for the changes to propagate.
  4. Repeat steps 2 and 3 for all the regional backend services in Cloud CDN. Note: You can list all the regional backend services in Cloud CDN by running the following command:
    This command lists all the regional backend services that are used by Cloud CDN. Replace cdn-backend with the name of the backend service that you want to filter.
By following these steps, you can remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” for GCP using GCP CLI.
To remediate the misconfiguration “Cloud CDN Regional Backend Services Failover Policy Should Be Enabled” in GCP using Python, follow these steps:
  1. Import the necessary libraries:
  1. Set up credentials:
  1. Create a client object for the Cloud CDN API:
  1. Get the list of existing backend services:
  1. For each backend service, check if the failover policy is enabled. If not, enable it:
  1. Verify that the failover policy has been enabled for all backend services.
This code will enable the failover policy for all backend services in your GCP project. You can run this code periodically to ensure that the failover policy remains enabled for all backend services.
This change updates the existing google_compute_region_backend_service in place; it does not force resource replacement, so no outage is expected if backends and health checks are correctly configured.Verification with terraform plan should show an in-place update of google_compute_region_backend_service.cdn_backend adding or modifying the backend blocks (with failover = true on the failover backend) and the failover_policy block (with your failover_ratio).

Additional Reading: