Courseiva
mediumMultiple ChoiceObjective-mapped

PCSE Organization Policy Constraints Practice Question

A company is designing a CI/CD pipeline using Cloud Build. Security requirements mandate that the pipeline deploy only to projects that have been explicitly authorized. The security team wants to use a service account that can be assumed by Cloud Build to perform deployments, and they want to restrict which projects can be deployed to using organization policies. Which approach should they take?

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

Use the organization policy constraint 'constraints/iam.allowedPolicyMemberDomains' and set it to only allow the service account's domain.

The organization policy constraint `constraints/iam.allowedPolicyMemberDomains` restricts which domains' principals can be granted roles in the organization. By setting this constraint to only allow the domain that contains the service account used by Cloud Build, you ensure that only service accounts from that domain can be granted roles. Then, you grant that service account the necessary deployment roles (e.g., Compute Instance Admin, Kubernetes Engine Admin) only in the explicitly authorized projects. This combination of organization policy and IAM grants restricts deployment to only those projects, meeting the security requirement.

Answer analysis

Option-by-option breakdown

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

  • Use the organization policy constraint 'constraints/iam.serviceAccountKeyExpiryHours' to force key rotation.

    Why it's wrong here

    Wrong. `constraints/iam.serviceAccountKeyExpiryHours` forces key rotation, but does not restrict which projects the pipeline can deploy to.

  • Use the organization policy constraint 'constraints/iam.allowedPolicyMemberDomains' and set it to only allow the service account's domain.

    Why this is correct

    Correct. By restricting allowed member domains to the service account's domain, you ensure that only that service account can be used, and by granting it roles only in authorized projects, you limit deployment scope.

  • Use the organization policy constraint 'constraints/compute.restrictCrossProjectNw' to limit network access.

    Why it's wrong here

    Wrong. `constraints/compute.restrictCrossProjectNw` restricts network connectivity between projects, not deployment permissions.

  • Use the organization policy constraint 'constraints/iam.workloadIdentityPoolProviders' to restrict which workload identity pools can be used.

    Why it's wrong here

    Wrong. `constraints/iam.workloadIdentityPoolProviders` is for workload identity federation, not for restricting service account usage in Cloud Build.

About these practice questions

Courseiva writes every PCSE question from scratch — 960 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This PCSE 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 PCSE exam.