Soru

Zorluk: ZorIdentity and Access Management (IAM) Roles and Resource Hierarchy

A principal attempts to execute an API call on a Compute Engine instance residing in a project nested within a folder hierarchy under an Organization node. IAM Deny policies and IAM Allow policies are configured across multiple levels of the resource hierarchy. In what correct chronological order does Google Cloud IAM evaluate these policies to determine whether to authorize or reject the request?

  1. 1Evaluate Organization-level IAM Deny policies applicable to the requesting principal and permission.
  2. 2Evaluate Folder-level IAM Deny policies sequentially down through the parent folder tree.
  3. 3Evaluate Project-level IAM Deny policies attached to the resource's immediate project container.
  4. 4Evaluate IAM Allow policies across Organization, Folder, Project, and Resource levels in effective union.
  5. 5Render final authorization decision: grant access if a matching Allow policy exists, otherwise deny access by default.

Cevap

The correct sequence begins with top-down evaluation of IAM Deny policies starting from the Organization level, followed by intermediate Folder levels, and then the Project level. Next, inherited and direct IAM Allow policies across the entire hierarchy are evaluated in effective union. Finally, the system renders an authorization decision granting access only if a valid Allow policy exists and no Deny policies apply.
In Google Cloud IAM, policy evaluation follows a strict order: Deny policies are evaluated first, starting at the root Organization node and moving down through Folders to the target Project. If no Deny policy matches, IAM computes the union of all inherited and direct Allow policies across Organization, Folder, Project, and Resource levels. If at least one Allow policy grants the permission, access is authorized.

Adım Adım Çözüm

1
Evaluate Organization-level Deny policies
Highest priority Deny rules checked first
Google Cloud IAM Deny policies take precedence over Allow policies and are evaluated starting from the root Organization node.
2
Evaluate Folder-level Deny policies
Hierarchical Deny check traverses intermediate parent folders
Deny policies set at parent folder levels inherit downwards and block access before project policies or allow policies are considered.
3
Evaluate Project-level Deny policies
Project container Deny rules checked
Project-scoped Deny policies form the final layer of explicit denial checks before evaluating permissions.
4
Evaluate effective Union of IAM Allow policies across all levels
Aggregated inherited and direct permissions evaluated
IAM Allow policies are additive across Organization, Folder, Project, and Resource nodes. If no Deny rule matched, all granted roles are evaluated together.
5
Render authorization decision
Access authorized or implicitly denied
If an Allow rule grants the required permission, access is authorized; if no matching Allow rule is found, IAM denies access by default.

Anahtar Kavram

GCP IAM Policy Evaluation Order and Resource Hierarchy Inheritance
Bu soruyu puanla