Ensure that your Cloud Storage buckets are configured with object versioning in order to protect your object data from being overwritten or accidentally deleted. Object versioning is a method of keeping multiple variants of an object in the same storage bucket. This preserves data and allows retrieving and restoring every version of every object stored inside the bucket for which versioning has been enabled.
With Object Versioning feature enabled, Google Cloud Storage buckets can recover from both unintended user actions and application failures, as the feature allows you to preserve, retrieve, and restore versions of objects. Object versioning acts as an extra layer of data protection and can be used for retention scenarios such as recovering objects that have been accidentally or intentionally deleted, or overwritten by Cloud IAM users or cloud applications.
To determine if object versioning is enabled for your Cloud Storage buckets, perform the following operations:Note: Inspecting object versioning configuration for storage buckets using Google Cloud Management Console is not currently supported.
Remediation / Resolution
To support the retrieval of objects that are deleted or overwritten, enable object versioning for your Google Cloud Storage buckets, by performing the following operations:Note: Enabling the Object Versioning feature for storage buckets using Google Cloud Management Console is not currently supported.
- Google Cloud Platform (GCP) Documentation
- Object Versioning
- Using Object Versioning
- Object Lifecycle Management
- GCP Command Line Interface (CLI) Documentation
- gcloud projects list
Unlock the Remediation Steps
Gain free unlimited access
to our full Knowledge Base
Over 750 rules & best practices
Get started for FREE
You are auditing:
Enable Object Versioning for Cloud Storage Buckets
Risk level: Medium