Professional Cloud Security Engineer
Identity and Access Management (IAM) governs who can perform what actions on which Google Cloud resource. Permissions are bundled into roles, which are assigned to users, groups, or service accounts through policy bindings. These policies are attached to resources within a hierarchy: Organization at the top, then Folders, then Projects, and finally individual resources like a Compute Engine instance.
Google Cloud provides three role types. Basic roles (Owner, Editor, Viewer) are broad and generally avoided for fine-grained control. Predefined roles offer granular permissions for specific services, like storage.objectViewer. Custom roles allow you to create a tailored set of permissions when predefined roles are too broad or too narrow, adhering to the principle of least privilege.
You can add IAM Conditions to a binding to make access context-aware. Conditions use the Common Expression Language (CEL) to evaluate attributes like the request time, the resource's name, or the caller's IP address. For example, you could grant a role only during business hours or only for resources with a specific name pattern. Conditional role bindings also enable time-bound access, such as granting a contractor temporary permissions that expire on a set date.
Permissions flow down the resource hierarchy through inheritance. A role granted at the Organization level applies to all Folders and Projects underneath it. However, you can also set more specific bindings at lower levels to override or narrow inherited access. It's important to note that policies for Access Context Manager (which defines security perimeters) are managed separately at the Organization level and are not inherited from Folder or Project policies.
When access is denied, the Policy Troubleshooter tool helps diagnose the problem. It simulates whether a principal has permission for a specific action on a resource, checking all applicable allow policies, deny policies, and principal access boundary policies. The tool reveals if access was blocked by a missing permission, a conflicting deny rule, or a boundary policy, allowing for precise remediation.
To find and fix over-permissioned accounts, use Policy Analyzer and IAM Recommender. These tools analyze the effective permissions a principal has across the hierarchy, identifying roles that grant more access than needed. They provide actionable recommendations, such as replacing a broad predefined role with a more granular custom role. Common fixes include updating bindings, adding exceptions to deny rules, or removing unnecessary permissions directly from a custom role's definition.
For temporary, elevated access needs, use Privileged Access Manager (PAM). Instead of granting permanent powerful roles, PAM allows you to create entitlements for just-in-time, time-bound access. A user must request access, often providing a business justification, which can trigger automated checks or require manual approval. This process prevents privilege creep—the accumulation of permanent standing access—and enhances security for sensitive operations.
Special attention must be paid to non-human identities like service accounts. Minimize the use of long-lived service account keys by enforcing organization policies that mandate short-lived credentials or workload identity federation. Furthermore, combining IAM Conditions with tools like VPC Service Controls ensures access decisions also consider context, such as whether the request originates from a trusted network, adding another layer of security boundary.
Legacy Access Control Lists (ACLs) are a fine-grained, object-level permission system for Cloud Storage. You can set different permissions on each bucket and on each individual object inside it. While this offers granularity, it creates management complexity and security risks. Auditing who has access to what becomes difficult, and it is easy to accidentally grant overly permissive access on a single object, violating the principle of least privilege.
Uniform Bucket-Level Access (UBLA) simplifies this by centralizing all permission management through Cloud IAM. When you enable UBLA on a bucket, it disables all legacy ACLs on that bucket and its objects. All access decisions are then made solely by the IAM policies attached to the bucket, project, or folder. This unified model is easier to manage, audit, and secure, as it eliminates the risk of hidden, permissive object-level ACLs that conflict with bucket-level intentions.
Migrating from ACLs to UBLA requires a careful plan. First, audit all existing ACLs on your buckets and objects to map current access. Next, translate those ACL permissions into equivalent IAM policies at the bucket level. It is critical to test these new IAM policies thoroughly before enabling UBLA to prevent unauthorized access during the switch. The transition should be monitored closely to ensure no legitimate access is broken and to detect any unintended access attempts.
Successfully migrating to UBLA results in a more secure and maintainable storage environment. Centralized IAM policies provide a consistent security model aligned with the rest of your Google Cloud resources, reduce administrative overhead, and minimize the attack surface. This move is a key step in enforcing robust, principle-of-least-privilege authorization across your data estate.
Gauge your current knowledge
Gauge your current knowledge