A security auditor holds the Viewer role on the organization node and must keep it for every project except one sensitive project, which the auditor must no longer be able to read. The organization grant is managed by a central team and must not be changed. What should you do?
Choose one.
IAM allow policies are additive: the effective allow policy on a project is the union of its own bindings and every inherited binding, so nothing in a child allow policy can subtract an ancestor's grant. IAM deny policies are a separate policy type that can be attached to an organization, folder or project; IAM checks deny policies before allow policies.
With the organization grant off-limits, the only way to remove access on one project is a deny policy attached to that project that names the auditor and the read permissions to block (permission groups such as all get or list permissions of a service are supported). Removing a project binding fails because the grant is inherited, an allow policy has no deny entries, and organization policy constraints govern configurations rather than principals.
- Locate the grant: it is inherited from the organization node, not set on the project.
- Recall that allow policies only add access, so a child allow policy cannot revoke it.
- Recall that deny policies are a separate policy type attachable at the project and checked first.
- Discard organization policy constraints, which do not target principals.
Exam tip: Allow policies only add; to carve an exception out of an inherited grant, attach an IAM deny policy lower down.
Setting Up Google Cloud Projects, Resource Hierarchy, and IAM — the lesson that teaches this.