Google Cloud IAM Permissions: How to Scope Roles and Policy Inheritance Safely
Google Cloud Identity and Access Management (IAM) determines which actions an authenticated person or system can perform on which Google Cloud resources. Instead of assigning individual permissions one by one, you usually grant a role to a principal at a particular resource scope. Because grants can be inherited from an organization, folder, or project, the scope of a grant is as important as the role itself.
Google Cloud IAM Permissions: How to Scope Roles and Policy Inheritance Safely
Google Cloud Identity and Access Management (IAM) determines which actions an authenticated person or system can perform on which Google Cloud resources. Instead of assigning individual permissions one by one, you usually grant a role to a principal at a particular resource scope. Because grants can be inherited from an organization, folder, or project, the scope of a grant is as important as the role itself.
How are authentication and authorization different?
Authentication establishes who or what sent a request. Authorization decides whether that identified principal may perform the requested action. Google Cloud IAM primarily manages authorization. People can be represented by Google accounts or groups; applications and automation can act as service accounts or federated workload identities. Successfully signing in or obtaining credentials does not by itself grant permission to use every resource.
An action in Google Cloud requires specific permissions. For example, publishing a message to a Pub/Sub topic requires the relevant publish permission. IAM roles package related permissions under a named role. An administrator grants a role to a principal by adding a binding to an allow policy on a resource.
How do principals, roles, resources, and policies fit together?
A principal is the person or system receiving access. A role is a collection of permissions, and a resource is the target of those permissions. An allow policy contains bindings that associate one or more principals with a role; a binding can also include a condition based on request context, such as the target resource or time. In practical terms, a grant answers: who receives which role on which resource?
Google Cloud has three main role types. Basic roles (Owner, Editor, and Viewer) include broad permissions across many services, so they are rarely the first choice for production. Predefined roles are managed by Google Cloud for common service tasks. Custom roles let you select permissions, but you take on the work of maintaining that role as services and required permissions change. Start by looking for a narrowly scoped predefined role; consider a custom role only when no suitable predefined role exists.
At what scope should you grant a role?
Google Cloud resources generally follow a hierarchy of organization, folders, projects, and service resources. Folders can be nested and are optional.
Organization
└─ Folder (optional; can be nested)
└─ Project
└─ Service resource (for example, a Pub/Sub topic)An allow policy on a parent container such as an organization, folder, or project is inherited by descendant resources. A resource’s effective allow access combines its direct policy with inherited allow policies from its ancestors. A principal granted access on a parent project can therefore perform an action on a child resource even when that child has no direct grant. Looking only at the resource’s own policy can miss the access that actually applies.
Hypothetical example: Suppose an order service needs to publish events to a Pub/Sub topic named orders-prod. For an automation principal that only publishes to that topic, consider the Pub/Sub Publisher role on the topic instead of Editor on the whole project. If several automations need the same access, a managed group or appropriate workload identity can be a useful principal. A project-level grant may be easier to manage when the same access is needed across many services, but it also broadens access to descendant resources in that project.
How are allow and deny policies evaluated together?
Allow policies grant roles to principals. Grants inherited from a parent and grants set on a child are evaluated independently; a valid binding that supplies the required permission can allow the action. This is why multiple role grants can accumulate.
Deny policies act as guardrails that prevent specified principals from using specified permissions. Relevant deny policies are evaluated before allow policies, so an applicable deny rule can block an action even when a role grants the permission. Deny policies attached at the organization, folder, or project level can affect descendant resources. Support varies by permission, so check that the permission you want to restrict is supported before relying on a deny policy.
A condition limits when a role binding applies based on attributes such as request time or the target resource. Conditions can be useful for temporary access, but they are not supported for every role and resource combination. Also, adding a conditional binding does not restrict a separate unconditional binding for the same role. Before relying on a condition, inspect existing bindings and inherited grants.
What is a practical order for reviewing or changing access?
To reduce excess access, decide in this order: the task that is needed, the role that supplies the required permissions, and the narrowest resource scope that supports the task.
**Identify the principal.** Decide whether access belongs to an individual, a managed group, or a workload identity for an application.
**Describe the required action.** Be specific—publishing, reading objects, or deploying—rather than asking broadly for “project access.”
**Inspect the role’s permissions.** Look for a service-specific predefined role first. Avoid a broad basic role when a narrower option works; consider a custom role only when necessary.
**Choose the smallest useful scope.** Grant on one resource when that is sufficient. Use a folder or organization scope only when the common task truly spans its descendants.
**Check inherited and restricting policies.** Review parent allow policies, applicable deny policies, group membership, and conditions for unexpected grants or blocks.
**Review the impact and record.** Before replacing a broad role, use a tool such as Policy Simulator to check the effect. Audit logs can help trace allow-policy changes; review the ownership and membership of groups used in grants.
IAM changes might not affect every access check immediately. Consider propagation delay before treating a just-applied change as ineffective. When changing an allow policy through an API or client library, include its current etag so a concurrent update is not silently overwritten. If an update conflicts, read the latest policy and reapply the intended change.
What mistakes commonly lead to overbroad or confusing access?
One mistake is granting Owner or Editor at the project level for a single task. These basic roles can include far more permissions than the requested action needs. Check the permissions in a service-specific predefined role first, and narrow the scope of the grant.
Another is checking only a child resource’s policy and concluding that access is absent. A parent folder or project may already grant the same permission. Conversely, one grant at a high level can reach more service resources than expected. Trace the resource hierarchy when investigating effective access.
A third mistake is treating a conditional binding as a restriction on all access. Conditions apply to the binding that contains them; an unconditional role grant inherited from a parent or attached elsewhere can still provide access. Use conditions, deny policies, and inheritance for their distinct purposes, then review the effective policy after a change.
References
[Google Cloud documentation: IAM overview and authorization model](https://docs.cloud.google.com/iam/docs/overview)
[Google Cloud documentation: role and permission overview](https://docs.cloud.google.com/iam/docs/roles-overview)
[Google Cloud documentation: using the resource hierarchy for access control](https://docs.cloud.google.com/iam/docs/resource-hierarchy-access-control)
[Google Cloud documentation: allow policy structure and inheritance](https://docs.cloud.google.com/iam/docs/allow-policies)
[Google Cloud documentation: IAM policy types](https://docs.cloud.google.com/iam/docs/policy-types)
[Google Cloud documentation: IAM Conditions overview](https://docs.cloud.google.com/iam/docs/conditions-overview?hl=en)
[Google Cloud documentation: how deny policies work](https://docs.cloud.google.com/iam/docs/deny-overview?hl=en)
[Google Cloud documentation: IAM security best practices](https://docs.cloud.google.com/iam/docs/using-iam-securely?hl=en)
Google Cloud’s official documentation was reviewed on November 21, 2026. IAM terminology, roles, supported policy types, and permission coverage can change; check current documentation and resource support before granting access.