Professional Cloud Security Engineer
Prepare and test your skills
Prepare and test your skills
Worked example. The correct answer is already marked and every option is explained below, so there is nothing to select here. To answer questions yourself, start the free trial.
A financial enterprise is hardening its Compute Engine infrastructure in Google Cloud. Security auditors found that developers have excessive privileges that allow them to view and modify sensitive custom instance metadata keys and deploy instances using privileged workload identities.
The security engineer must implement least-privilege access controls with the following requirements:
iam.serviceAccounts.actAs).Which configuration should the security engineer implement?
This solution implements granular Identity and Access Management (IAM) permissions for administrators and developers outside the virtual machine while applying Google Cloud best practices for workload identities and API access scopes on Compute Engine instances.
compute.instances.get permission allows principals to retrieve instance metadata and configuration properties via the Google Cloud CLI, Console, or REST API without granting write permissions.roles/iam.serviceAccountUser role (which grants iam.serviceAccounts.actAs) and omitting compute.instances.setMetadata, developers cannot alter metadata scripts or launch/modify resources acting as the service account.https://www.googleapis.com/auth/cloud-platform access scope on VM instances delegates all authorization enforcement directly to IAM roles assigned to the user-managed service account, avoiding restrictive and inflexible legacy OAuth scope configurations.iam.serviceAccounts.actAs prevents unauthorized users from leveraging service account permissions bound to the VM.cloud-platform scope ensures IAM allow policies remain the single source of truth for application resource access.This approach aligns with Google Cloud architecture best practices by isolating metadata read operations from write/execution operations and centralizing application permission management in IAM rather than relying on double-filtering access scopes.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.