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 security engineer is configuring access for a new data pipeline in Google Cloud. The deployment involves two projects:
Workloads running on Compute Engine in Project A must use a user-managed service account named data-processor@project-a.iam.gserviceaccount.com to read BigQuery data in Project B. A DevOps engineer needs permission to deploy and configure Compute Engine instances in Project A and attach data-processor@project-a.iam.gserviceaccount.com to those instances. The DevOps engineer must not be permitted to attach or impersonate any other service account in Project A, nor access BigQuery data directly with their personal identity.
Which combination of IAM role bindings meets these requirements while enforcing least privilege?
In Google Cloud IAM, service accounts possess a dual nature: they act as identities that can be granted access to resources, and as resources that other principals can manage, attach, or impersonate. Granting the Service Account User role (roles/iam.serviceAccountUser) directly on the service account resource provides granular control over who can attach that specific identity to compute resources.
roles/bigquery.dataViewer to serviceAccount:data-processor@project-a.iam.gserviceaccount.com on Project B treats the service account as an identity, giving the workload the necessary read permissions without exposing data to unauthorized users.roles/compute.instanceAdmin.v1 to the DevOps engineer on Project A provides the necessary permissions to create and manage virtual machine instances.roles/iam.serviceAccountUser specifically on the service account resource (data-processor@project-a.iam.gserviceaccount.com) allows the engineer to attach only this designated service account to VMs, without granting access to other service accounts in Project A.Managing IAM policies at the individual service account resource level adheres to the principle of least privilege by avoiding project-wide roles/iam.serviceAccountUser bindings that would inadvertently allow attachment of any existing or future service account in the project.
Keep the momentum going with these hand-picked practice scenarios
Want more questions like this?
Get a free certification question every week.