GCP Professional Cloud Security Engineer Practice Question
Your organization aggregates Admin Activity audit logs from all projects into a centralized Logging bucket at the organization level. Security policy requires that a paging alert fire only when a new user-managed service account key is created, regardless of project. Which single log-based alert filter will meet this requirement most precisely while avoiding false positives from other IAM changes?
logName="projects/*/logs/cloudaudit.googleapis.com%2Factivity" AND protoPayload.methodName="google.iam.admin.v1.SetIamPolicy" AND protoPayload.serviceName="iam.googleapis.com"
resource.type="service_account" AND severity>=ERROR
logName="organizations/123456789/logs/cloudaudit.googleapis.com%2Fdata_access" AND protoPayload.methodName="google.iam.admin.v1.DownloadServiceAccountKey"
logName="organizations/123456789/logs/cloudaudit.googleapis.com%2Factivity" AND protoPayload.serviceName="iam.googleapis.com" AND protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey"
Admin Activity audit logs from the IAM API are written under the log name cloudaudit.googleapis.com/activity. When any user or service creates a user-managed key, the IAM Admin API method recorded in the log entry is google.iam.admin.v1.CreateServiceAccountKey. Scoping the alert filter to:
the centralized Admin Activity log (logName="organizations/…/logs/cloudaudit.googleapis.com%2Factivity"),
the IAM service (protoPayload.serviceName="iam.googleapis.com"), and
the exact method that creates a key (protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey") ensures that the alert triggers only for key-creation events and not for other IAM changes. The other filters are incorrect because:
The second option watches for any log entry with severity ERROR on the service_account resource type; it would miss successful key creations and generate noise from unrelated errors.
The third option targets Data Access logs and the DownloadServiceAccountKey method, which detects key downloads, not creation, and would require enabling Data Access logs (often disabled by default).
The fourth option uses a wildcard project-level log name and the SetIamPolicy method, catching many unrelated IAM changes and generating false positives, while missing key creation events.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a user-managed service account key?
Open an interactive chat with Bash
What are Admin Activity audit logs in Google Cloud?
Open an interactive chat with Bash
Why is it important to use precise log-based alert filters in security policies?
Open an interactive chat with Bash
What is a user-managed service account key in GCP?
Open an interactive chat with Bash
What is the purpose of Admin Activity audit logs in GCP?
Open an interactive chat with Bash
How does GCP handle log-based alerting for security monitoring?
Open an interactive chat with Bash
GCP Professional Cloud Security Engineer
Configuring Access
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99 $11.99
$11.99/mo
Billed monthly, Cancel any time.
$19.99 after promotion ends
3 Month Pass
$44.99 $26.99
$8.99/mo
One time purchase of $26.99, Does not auto-renew.
$44.99 after promotion ends
Save $18!
MOST POPULAR
Annual Pass
$119.99 $71.99
$5.99/mo
One time purchase of $71.99, Does not auto-renew.
$119.99 after promotion ends
Save $48!
BEST DEAL
Lifetime Pass
$189.99 $113.99
One time purchase, Good for life.
Save $76!
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .