More Info:

DATA_READ, DATA_WRITE and ADMIN_READ logs should be enabled on Cloud Functions

Risk Level

Medium

Address

Operational Maturity, Reliability, Security

Compliance Standards

CISGCP, CBP, GDPR, HIPAA, ISO27001

Triage and Remediation

Remediation

To remediate the misconfiguration “Cloud Functions Logging Should Be Enabled” for GCP using GCP console, follow the steps below:

  1. Open the Google Cloud Console and select the project where the Cloud Function is located.
  2. Navigate to the Cloud Functions page by selecting “Cloud Functions” from the left-hand menu.
  3. Select the Cloud Function for which you want to enable logging.
  4. Click on the “Edit” button on the top of the page to edit the Cloud Function settings.
  5. Scroll down to the “Logging” section and click on the “Enable” button to enable logging for the Cloud Function.
  6. Choose the desired log level and log retention period.
  7. Click on the “Save” button to save the changes.

Once logging is enabled for the Cloud Function, you will be able to see the logs in the Stackdriver Logging Console.

Additional Reading: