A retail enterprise is configuring a Cloud Logging sink to route operational logs from multiple Compute Engine projects into a centralized Cloud Storage bucket located in a dedicated security project. The log sink is configured using a sink-specific writer identity service account. According to Google Cloud security best practices and the principle of least privilege, which IAM role assignment should be applied to the destination bucket?
- Grant the Storage Object Creator role (roles/storage.objectCreator) on the destination bucket to the log sink's writer service account identity.Cevap
- BGrant the primitive Owner role (roles/owner) on the destination bucket to the log sink's writer service account identity.
- CGrant the Service Account User role (roles/iam.serviceAccountUser) on the target project to the log sink's writer service account identity.
- DExclude all low-severity logs at the source project level by applying an exclusion filter that drops all logs below ERROR severity prior to sink processing.
Cevap
Grant the Storage Object Creator role (roles/storage.objectCreator) on the destination bucket to the log sink's writer service account identity.
When configuring a Cloud Logging sink that routes log entries to Cloud Storage, Cloud Logging uses a unique service account (the sink's writer identity). To satisfy least-privilege requirements, this service account must only be granted permission to write objects to the target bucket, which is precisely provided by the predefined Storage Object Creator role (roles/storage.objectCreator).
Adım Adım Çözüm
Anahtar Kavram
Least-privilege IAM configuration for Cloud Logging sink export destinations.