π‘οΈ Google Storage Bucket logging is not enabledπ’
- Contextual name: π‘οΈ Bucket logging is not enabledπ’
- ID:
/ce/ca/google/storage/bucket-logging - Tags:
- π’ Policy with categories
- π’ Policy with type
- π’ Production policy
- Policy Type:
COMPLIANCE_POLICY - Policy Categories:
SECURITY
Logicβ
- π§ prod.logic.yamlπ π’
- π Google Storage Bucket
- π§ͺ test-data.json
Descriptionβ
Descriptionβ
This policy identifies Google Cloud Storage Buckets that do not have logging enabled. Enabling logging ensures that all access requests to a bucket are recorded for audit and monitoring purposes.
Rationalβ
Cloud Storage logging captures detailed information about every request made to a bucket, including read, write, and delete operations on objects. These logs are critical for security auditing, monitoring access patterns, and investigating potential security incidents. Without logging, it becomes difficult to determine who accessed your data, when it was accessed, and from where.
Impactβ
Enabling logging may incur additional costs for storing and processing logs.
Auditβ
This policy flags a Google Cloud Storage Bucket as
INCOMPLIANTif it does not have an associatedLogging Bucket.A Storage Bucket is marked as
INAPPLICABLEif it has related Log Source Buckets indicating that it is already designated to store access logs.
Remediationβ
Remediationβ
Using gcloud CLIβ
Grant Cloud Storage permission to write logs to the logging bucket:
gcloud storage buckets add-iam-policy-binding gs://{{logging-bucket-name}} \
--member="group:cloud-storage-analytics@google.com" \
--role="roles/storage.objectCreator"This grants Cloud Storage (represented by the service group
cloud-storage-analytics@google.com) permission to create and store log objects in the designated logging bucket.Enable access logging on the target bucket:
gcloud storage buckets update gs://{{source-bucket-name}} \
--log-bucket=gs://{{logging-bucket-name}} \
[--log-object-prefix={{log-object-prefix}}]Use the optional
--log-object-prefixflag to define a prefix for log object names. The prefix can be up to 900 characters long and must follow valid object naming conventions. If not specified, the source bucketβs name is used as the default prefix.
policy.yamlβ
Linked Framework Sectionsβ
| Section | Sub Sections | Internal Rules | Policies | Flags | Compliance |
|---|---|---|---|---|---|
| πΌ Cloudaware Framework β πΌ Logging and Monitoring Configuration | 65 | no data |