GCP Associate Cloud Engineer Practice Question 79: IAM Deny Policy Override

Google Cloud Associate Cloud Engineer · Test 8 · question 9 of 10

IAM & Least Privilegehard

A user has been granted the Editor role on a project, which includes permission to delete Compute Engine disks. Your security team wants to guarantee that no principal, regardless of any role grant now or in the future, can delete disks in this project, without having to audit every IAM binding for that permission. What should you configure?

Select one answer
Show answer and explanation

Answer:

  • A. Create an IAM deny policy on the project that denies the compute.disks.delete permission to all principals.

IAM deny policies override allow policies: if a deny rule blocks a permission for a principal, that principal cannot use the permission no matter what role grants it, including roles assigned later. This lets the security team enforce the restriction in one place instead of auditing every current and future binding.

Option B only fixes the one Editor grant found today; any future grant of Editor, Owner, or a custom role that includes compute.disks.delete would reopen the gap, which is exactly the ongoing audit burden the team wants to avoid. Option C blocks creating new Editor bindings but does not touch the permission itself, and it does nothing about other roles that also include compute.disks.delete. Option D, VPC Service Controls, restricts data exfiltration across a service perimeter boundary; it is not designed to deny a specific IAM permission to principals who are already inside the perimeter.

Reference: Deny access to resources

Practice Test 8 ›

Study guides for Google Cloud Associate Cloud Engineer