Skip to main content
Five Steps for Cloud Compliance Readiness·A practical playbook for security teamsDownload
CIS Google Cloud Platform Foundation v5.0.0 · 2.5

Google Cloud should send an alert whenever someone is given or loses the project Owner role

  • Level 1
  • Logging and Monitoring

This check looks for a log-based metric that matches changes to project ownership and an alerting policy attached to it. The safe setting is that every grant or removal of the Owner role raises a notification to someone who will act on it.

Why it matters

The Owner role on a project can change nearly everything in it, including who else has access. A new Owner appearing unexpectedly is a classic sign that an account was taken over or that someone is quietly widening their own reach. Cloud Audit Logs already record every IAM policy change, but nobody reads them unprompted.

A log-based metric counts the matching log entries, and an alerting policy turns a non-zero count into a notification. Together they make an ownership change visible within minutes instead of at the next audit.

Sources: Log-based metrics overview (Google Cloud) and Alerting overview (Google Cloud).

How to check it yourself

Console: open Logging → Log-based metrics and look for a user-defined metric whose filter mentions SetIamPolicy and roles/owner. Then open Monitoring → Alerting and confirm a policy uses that metric and has at least one notification channel.

gcloud (read-only):

gcloud logging metrics list --project=PROJECT_ID `
  --format="table(name, filter)"
gcloud alpha monitoring policies list --project=PROJECT_ID `
  --format="table(displayName, enabled, notificationChannels)"

The setting is met when a metric with an Owner-role filter exists and an enabled policy that references it has a notification channel.

How to fix it

Console: in Log-based metrics choose Create metric, type Counter, and paste a filter such as the one below. Then, from the metric's menu, choose Create alert from metric, set the threshold to above zero, and pick a notification channel that reaches a monitored mailbox or on-call tool.

protoPayload.methodName="SetIamPolicy"
AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner"

Script: this creates a metric in your project, so try it in a test project first. ConfigCobra never creates it for you.

gcloud logging metrics create project-owner-changes `
  --description="Owner role granted or removed" `
  --log-filter='protoPayload.methodName="SetIamPolicy" AND protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner"'

Create the alerting policy in the console or with gcloud alpha monitoring policies create. For several projects, create the metric on a log sink or at the organization level so you do it once.

What changes when you fix it

Security and on-call staff receive a notification for every Owner change. The first week usually shows how often Owner is granted for routine reasons, which is itself useful: it tells you which grants should be replaced by narrower roles.

Project owners and admins notice no difference in what they can do; nothing is blocked. The alert only reports.

Workloads are untouched, since only a metric and a policy are added. Decide up front who investigates an alert and how they confirm that the change was requested, otherwise the notification will be ignored.

Included in

BenchmarkCIS IDProfile
CIS Google Cloud Platform Foundation v5.0.02.5Level 1

Check this on your Google Cloud

ConfigCobra runs this check with every other control of the CIS Google Cloud Platform Foundation Benchmark, read-only.

Get in touch

Let's talk.

Whether you're evaluating ConfigCobra, running an audit, or managing a client fleet — we respond within one business day.

Free trial