More Info:

Ensure that PubSub Subscriptions have set expiration

Risk Level

Low

Address

Operational Excellence, Cost Optimization

Compliance Standards

CBP

Triage and Remediation

Remediation

To remediate the misconfiguration of PubSub Subscriptions not having set expiration for messages in GCP using GCP console, you can follow the below steps:

  1. Open the GCP console and navigate to the Pub/Sub section.
  2. Select the Subscription that you want to remediate.
  3. Click on the “Edit” button for the selected Subscription.
  4. In the “Edit Subscription” window, scroll down to the “Message retention duration” section.
  5. Set the message retention duration to the desired value. This value should be based on how frequently the Subscription is polled and how long it takes to process the messages.
  6. Click on the “Save” button to save the changes.

By following these steps, you will remediate the misconfiguration of PubSub Subscriptions not having set expiration for messages in GCP using GCP console.

Additional Reading: