More Info:

Ensure Cloud CDN backend buckets cache only static content for better caching performance.

Risk Level

Medium

Address

Operational Maturity, Reliability, Security

Compliance Standards

CBP

Triage and Remediation

Remediation

Sure, here are the step-by-step instructions to remediate the issue of Cloud CDN Backend Buckets caching only static content in GCP using GCP Console:

  1. Open the GCP Console and navigate to the Cloud Storage section.
  2. Click on the checkbox next to the name of the bucket that you want to configure.
  3. Click on the “Edit bucket permissions” button at the top of the page.
  4. Under the “Bucket Policy Only” section, click on the “Add members” button.
  5. In the “New members” field, enter the email address of the service account that you want to use for your Cloud CDN backend bucket.
  6. In the “Select a role” drop-down menu, select “Storage Object Viewer”.
  7. Click on the “Add” button to add the service account to the bucket’s IAM policy.
  8. Navigate to the Cloud CDN section of the GCP Console.
  9. Click on the checkbox next to the name of the Cloud CDN backend bucket that you want to configure.
  10. Click on the “Edit” button at the top of the page.
  11. Under the “Cache settings” section, select the “Cache everything” option.
  12. Under the “Cache control” section, select the “Override” option.
  13. Under the “Static content caching” section, select the “Custom” option.
  14. In the “Static content caching” field, enter the file extensions for the static content that you want to cache (e.g., .html, .css, .js, .jpg, .png).
  15. Click on the “Save” button to save the changes.

After following these steps, your Cloud CDN backend bucket will cache only static content as required.

Additional Reading: