Question 790 of 1,000
mediumMultiple ChoiceObjective-mapped

How to Monitor Privileged IAM Changes in Real-Time with Cloud Monitoring

This ACE practice question tests your understanding of cloud logging log-based metrics. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: cloud Logging log-based metrics. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your security team wants to monitor all privileged IAM changes in your GCP organization (e.g., when anyone is granted `roles/owner` or `roles/editor`). They need real-time notifications. Which approach achieves this?

Quick Answer

The answer is to use Cloud Monitoring with log-based metrics and alerting policies, because the `iam.googleapis.com/SetIamPolicy` audit log entry captures every IAM policy change, and you can create a metric from that log that triggers an alert in near real-time when a privileged role like `roles/owner` or `roles/editor` is granted. This approach directly satisfies the security team’s need to monitor privileged IAM changes in real-time without relying on slower, periodic scans. On the Google Associate Cloud Engineer exam, this scenario tests your understanding of how Cloud Monitoring integrates with Cloud Audit Logs to create operational alerts, and a common trap is to mistakenly choose Cloud Asset Inventory with asset feeds—while that tool detects changes, it does not provide the real-time notification capability that log-based metrics and alerting policies do. Remember the mnemonic “SetIAM triggers the alert” to link the audit log entry directly to your monitoring pipeline.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Create a Cloud Monitoring alerting policy on the `iam.googleapis.com/SetIamPolicy` log metric.

Option A is correct because Cloud Monitoring can ingest log-based metrics from the `iam.googleapis.com/SetIamPolicy` audit log entry, and an alerting policy can be configured to trigger in near real-time when that log metric exceeds a threshold. This provides immediate notification of privileged IAM changes such as granting `roles/owner` or `roles/editor`. Option D is also correct: Cloud Asset Inventory asset feeds can detect IAM policy changes in near real-time by streaming change events and triggering notifications, making them suitable for real-time monitoring needs.

Key principle: Cloud Logging log-based metrics

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Create a Cloud Monitoring alerting policy on the `iam.googleapis.com/SetIamPolicy` log metric.

    Why this is correct

    A log-based metric that counts `SetIamPolicy` operations with filter on privileged roles, combined with a Cloud Monitoring alert with a notification channel, provides real-time alerting on IAM changes.

    Related concept

    Cloud Logging log-based metrics

  • Enable Security Command Center's Event Threat Detection for IAM changes.

    Why it's wrong here

    SCC ETD can detect certain anomalous IAM patterns but may not provide real-time granular alerts on all specific role grants. The log-based alert approach is more configurable.

  • Run a daily script using `gcloud projects get-iam-policy` and compare with the previous day's output.

    Why it's wrong here

    Daily polling misses real-time detection and creates a 24-hour window of undetected privilege escalation. Real-time monitoring via audit logs is required.

  • Use Cloud Asset Inventory with asset feeds to detect IAM policy changes in real-time.

    Why this is correct

    Cloud Asset Inventory feeds can detect IAM policy changes in near-real-time (within minutes) and publish to Pub/Sub, which can trigger notifications. This is also a valid approach.

    Related concept

    Cloud Logging log-based metrics

Common exam traps

Common exam trap: answer the scenario, not the keyword

A common trap is that candidates may overlook Option D because they assume Cloud Asset Inventory feeds are only for periodic inventory synchronization with significant latency. However, asset feeds offer near real-time change notifications, making them a valid solution for monitoring IAM policy changes.

Detailed technical explanation

How to think about this question

Under the hood, Cloud Monitoring log-based metrics are derived from Cloud Audit Logs, which capture `SetIamPolicy` API calls. The metric counts occurrences of a specific filter (e.g., `resource.type=project AND protoPayload.methodName=SetIamPolicy`) and the alerting policy evaluates this metric every minute, enabling sub-minute notification latency. In a real-world scenario, if a rogue admin grants `roles/owner` to an external user, the alert fires within seconds, allowing immediate incident response.

KKey Concepts to Remember

  • Cloud Logging log-based metrics
  • Cloud Asset Inventory asset feeds
  • IAM audit logs
  • Cloud Monitoring alerting policies

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Cloud Logging log-based metrics

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

Related practice questions

Related ACE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free ACE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this ACE question test?

Cloud Logging log-based metrics

What is the correct answer to this question?

The correct answer is: Create a Cloud Monitoring alerting policy on the `iam.googleapis.com/SetIamPolicy` log metric. — Option A is correct because Cloud Monitoring can ingest log-based metrics from the `iam.googleapis.com/SetIamPolicy` audit log entry, and an alerting policy can be configured to trigger in near real-time when that log metric exceeds a threshold. This provides immediate notification of privileged IAM changes such as granting `roles/owner` or `roles/editor`. Option D is also correct: Cloud Asset Inventory asset feeds can detect IAM policy changes in near real-time by streaming change events and triggering notifications, making them suitable for real-time monitoring needs.

What should I do if I get this ACE question wrong?

Review cloud Logging log-based metrics, then practise related ACE questions on the same topic to reinforce the concept.

What is the key concept behind this question?

Cloud Logging log-based metrics

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Keep practising

More ACE practice questions

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.