GCP Professional Cloud Security Engineer Practice Question

During a penetration test, consultants demonstrate that an untrusted workload running inside one of your Compute Engine VMs can exfiltrate the VM's service-account token by sending a forged HTTP request to http://169.254.169.254/computeMetadata/v1beta1/… via a vulnerable locally-running proxy. You need to mitigate this risk across hundreds of existing Linux VMs without modifying any application code. Which action most effectively prevents this attack strategy while preserving access to the metadata server for legitimate in-guest agents?

  • Disable the legacy v0.1 and v1beta1 metadata endpoints for every VM using the project-wide metadata setting enable-legacy-endpoints = false.

  • Remove the VM's service account or restrict it to read-only scopes.

  • Periodically rotate the default service-account's access token using Cloud IAM Conditions.

  • Send the header Metadata-Flavor: Google from all trusted processes when calling the metadata server.

GCP Professional Cloud Security Engineer
Ensuring data protection
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

Bash, the Crucial Exams Chat Bot
AI Bot