Intrigued by the art of cloud architecture? Discover how to design, develop, and manage robust, secure, scalable, and dynamic solutions on Google Cloud as you prepare for the Professional Cloud Architect exam!
Identity and Access Management (IAM) is a security framework that lets administrators control who can take action on specific Google Cloud resources. The principle of least privilege is a core security concept where users receive only the minimum permissions necessary to perform their jobs, reducing the risk of accidental changes or security breaches.
Google Cloud provides different types of roles to manage permissions effectively. Primitive roles like Owner, Editor, and Viewer offer broad access across an entire project but are often too powerful for daily tasks. Instead, administrators should use predefined roles, which provide granular access to specific services, or custom roles for unique business needs. Custom roles let you bundle specific permissions to meet exact requirements, while predefined roles are created and maintained by Google for specific services.
The resource hierarchy plays a vital role in how permissions are applied and managed. Access can be granted at the organization, folder, or project level, and these permissions are inherited by all resources living underneath them. To ensure resource isolation, it is best practice to grant access at the lowest possible level, such as a specific Cloud Run service or an Artifact Registry repository.
Service accounts are special identities used by applications and automated systems to interact with Google Cloud services. Using conditional role bindings allows you to further restrict these accounts, ensuring they can only perform actions when specific criteria, like resource names or attributes, are met. The IAM Recommender analyzes actual usage patterns and suggests removing unnecessary permissions, helping you refine access controls over time. The Policy Analyzer helps you understand which principals have access to your resources by searching through complex allow policies, so you can identify and remove excessive permissions.
The Google Cloud resource hierarchy is a structured way to organize and manage cloud assets, similar to a computer's file system. It consists of the Organization node at the top, followed by Folders, Projects, and individual Resources. This structure provides a clear chain of ownership and serves as the foundation for applying security policies across an entire enterprise.
Policy inheritance is the process where security settings applied at a higher level of the hierarchy automatically flow down to all child resources. The effective policy for any specific resource is the union of the permissions granted directly to it and those inherited from its ancestors. Permissions are additive, meaning a user gains all rights granted at every level of the hierarchy, which allows for broad access control at the folder level while maintaining specific rules for individual projects.
To maintain strict governance, organizations use the Organization Policy Service to enforce specific configurations across the hierarchy. These constraints allow administrators to set global guardrails, such as domain-restricted sharing, which limits which external identities can be granted access. Organization policies are inherited by descendants but can be superseded by more specific rules at lower levels when necessary.
While allow policies grant permissions, deny policies can be used to explicitly prevent certain actions regardless of any other granted roles. Deny policies are always evaluated before allow policies, providing a powerful tool for resource isolation and security. This ensures that sensitive data remains protected even if a user is accidentally granted broad access at a higher folder level.
Best practices for designing a hierarchy include using a single organization node to reduce management overhead and implementing standardized naming conventions. Administrators should keep bootstrapping resources and common services in separate folders to maintain a clean environment. It is also recommended to use folders to segregate different stages of development, such as production environments for live workloads, staging environments for testing, and development environments for initial coding.
Service accounts are special types of non-human accounts used by applications and virtual machines to access Google Cloud resources. It is vital to avoid using default service accounts because they often have broad permissions that increase security risks. Instead, developers should create custom service accounts that are tailored to specific tasks and workloads.
Implementing the principle of least privilege is a core strategy for securing these non-human identities. This means granting only the minimum permissions necessary for a service to function, which limits the potential damage if an account is compromised. To achieve this, administrators should use custom IAM roles instead of broad basic roles like "Editor," regularly identify and remove unused service accounts to reduce the attack surface, and use IAM tags to conditionally allow or deny access based on resource labels.
Managing service account keys is a major security challenge because they are long-lived credentials that can be leaked or stolen. To reduce this risk, organizations should require regular key rotation and monitor for any unauthorized usage. Whenever possible, it is better to use short-lived credentials or service account impersonation to avoid the dangers of static, permanent keys.
For containerized environments, Workload Identity for GKE provides the most secure way to manage non-human identities. This feature links Kubernetes service accounts to Google Cloud service accounts, allowing applications to authenticate automatically. Using this method eliminates the risks associated with storing sensitive keys inside container images or as Kubernetes secrets.
Finally, organization policies help enforce security standards across an entire cloud environment. For example, administrators can disable the creation of new service account keys to force teams toward more secure authentication methods. Using Cloud Audit Logs ensures that all actions taken by these accounts are recorded for monitoring and incident response.
Prepare and test your skills
Prepare and test your skills
Primitive roles provide broad access across an entire project, whereas predefined roles offer granular access to specific services and are created and maintained by Google. Custom roles allow administrators to bundle specific permissions together to meet unique business needs.
The effective policy for a resource is the union of the permissions granted directly to it and all permissions inherited from its ancestor organization, folders, and projects. Because permissions are additive, users gain all rights granted across every level of the hierarchy, though deny policies are evaluated before allow policies to explicitly block actions.
Workload Identity for GKE enhances security by linking Kubernetes service accounts directly to Google Cloud service accounts so workloads can authenticate automatically. This approach eliminates the security risks of storing sensitive, long-lived service account keys inside container images or Kubernetes secrets.
An enterprise is reviewing the security posture of an analytics environment in Google Cloud. Several data engineers currently have the primitive roles/editor role granted at the project level, which grants overly broad permissions across Google Cloud services such as Cloud Bigtable and BigQuery.
You have the following operational and security requirements:
Which strategy should you implement?