Prepare and test your skills
Prepare and test your skills
Manage and automate access reviews and policy enforcement is the practice of continuously verifying that every identity holds only the access it still needs and automatically removing access that violates policy. In Google Cloud, Identity and Access Management (IAM) (opens in a new tab) defines what is allowed, Cloud Audit Logs records what was actually used, Access Context Manager and Chrome Enterprise Premium enforce conditions on every request, and Google groups combined with service account impersonation create a reviewable path for privilege escalation.
Least-privilege review in IAM means granting only the roles required for a task at the smallest scope and then removing unused or excessive grants. Administrators apply Policy Intelligence role recommendations to find IAM policies with unused and excessive roles and replace broad grants with tighter roles. Organization policy constraints constraints/iam.disableServiceAccountKeyCreation and constraints/iam.disableServiceAccountKeyUpload enforce least privilege for long-lived service account keys (opens in a new tab) by blocking their creation and upload and forcing workloads toward short-lived alternatives. Because key material can be copied into gcloud CLI configuration files, local filesystems, or code repositories, disabling keys reduces the standing access that later reviews must clean up.
Automated escalation in Google Cloud separates the standing identity from the privileged capability by using a Google group that is granted permission to impersonate a privileged service account. In the documented pattern, an administrator creates a group named elevated-compute-access and a service account named elevated-compute-access that holds the roles/compute.admin role on the project. Group members receive no direct administrative role; they receive roles/serviceusage.serviceUsageConsumer on the project and roles/iam.serviceAccountTokenCreator on the service account, so traffic flows from the user identity to service account impersonation and then to Compute Engine APIs. Membership in the group becomes the approval and justification boundary, and privileged access either expires through time-bound membership or is reviewed periodically for recertification.
The escalation path is built in an explicit order:
elevated-compute-access Google group that will hold approved users.elevated-compute-access service account and enable the IAM Service Account Credentials API.roles/compute.admin to the service account, so the service account depends on the project IAM policy for its power.roles/serviceusage.serviceUsageConsumer to the group, which permits members to use the project to impersonate.roles/iam.serviceAccountTokenCreator on the service account to the group, which permits members to mint short-lived tokens as the service account.example-instance-1 that only current group members can administer the instance.After the binding exists, additional enforcement requires 2-Step Verification for all privileged users and an Access Context Manager access level such as requiring the corporate network when privileged access is used.
Activity analysis for access reviews relies on Cloud Audit Logs (opens in a new tab) to compare privileged access requests and access patterns against approved policy. Administrators enable ADMIN_READ, DATA_READ, and DATA_WRITE audit log types for services such as compute.googleapis.com by exporting the project IAM policy, adding an auditConfigs block, and reapplying the policy. Log data flows from Google Cloud APIs to Cloud Audit Logs storage, where administrators review who impersonated privileged service accounts, what resources were touched, and whether patterns indicate anomalies, dormant accounts, or policy violations. Enterprises export these logs to long-term storage to preserve evidence for audit and to support periodic recertification that privileged access either expired or was explicitly reapproved.
Request-time enforcement in Google Cloud combines a user-centric control and a resource-centric control that are evaluated when API traffic arrives. Chrome Enterprise Premium configures an access level and binding that evaluates attributes on every API request, including IP-based access or certificate-based access for mutual TLS, and rejects user API traffic that does not meet the conditions even when the credential itself is valid. VPC Service Controls defines perimeters within which resources can communicate and applies to traffic crossing those perimeters. When used together, Chrome Enterprise Premium and VPC Service Controls reduce the effectiveness of compromised credentials used from an attacker-controlled machine outside the environment.
| Control | Control focus | Identities evaluated | Boundary behavior |
|---|---|---|---|
| Chrome Enterprise Premium | User-centric, rejects user API traffic that fails conditions | Only user identities within the organization | Conditions such as IP or mutual TLS certificate are checked on every API request |
| VPC Service Controls | Resource-centric, controls which resources can communicate | All user identities and all service account identities | Communication is allowed inside the perimeter and denied across it |
Not all device attributes collected by Endpoint Verification are evaluated during every API request, so reviews cannot assume endpoint posture alone blocked access. For remote server access, OS Login with 2-Step Verification enforces reauthentication with password or security key for SSH to Compute Engine, blocking an attacker who holds compromised OAuth tokens but lacks the second factor. Remote Desktop Protocol (RDP) to Windows instances does not support the OS Login service, so granular 2-Step Verification cannot be enforced for RDP sessions and administrators must use coarse-grained controls such as session length, 2-Step Verification settings, disabling Allow user to trust the device, and Identity-Aware Proxy (IAP) Desktop paths.
Exam tip: Chrome Enterprise Premium applies only to user identities in your organization, while VPC Service Controls applies to both user identities and service account identities.
Automated remediation revokes active sessions and deletes persistent secrets so a failed review or suspected compromise immediately removes access. A prepared script using the Google Workspace Admin SDK lists users with customer: 'my_customer', lists OAuth tokens, matches the gcloud CLI client ID 32555940559.apps.googleusercontent.com, and calls token removal to invalidate refresh and access tokens and force reauthentication with password or security key. The security operations center (SOC) depends on this revocation script being built and tested in advance (opens in a new tab), because revocation must run quickly across many users during an incident.
Remediation differs by credential type, and each path names its actor and destination state:
gcloud auth application-default revoke, followed by deletion of application_default_credentials.json from $HOME/.config/gcloud/ on Linux and macOS or %APPDATA%\gcloud\ on Windows and recreation with gcloud auth application-default login, moves the workstation from compromised credential present to clean credential issued.roles/serviceusage.apiKeysAdmin) with apikeys.keys.create and apikeys.keys.delete regenerates the key, moving the project from exposed key valid to new key valid.Emergency access in Cloud Identity provides last-resort access that is intentionally exempt from standard Joiner, Mover, and Leaver (JML) lifecycle automation and from single sign-on (SSO). Emergency access users (opens in a new tab) are created directly in Cloud Identity or Google Workspace, hold the super admin privilege sufficient to fix misconfigurations in Cloud Identity, Google Workspace, or Google Cloud, and are not tied to a specific employee. Because exemption from JML means normal provisioning and deprovisioning workflows will never remove them, these accounts require their own recertification boundary in a dedicated organizational unit (OU) where custom configurations apply only to emergency users.
Redundancy and phishing-resistant authentication keep this highly privileged exception reviewable without creating a single point of failure:
Automated provisioning and deprovisioning workflows synchronize user creation, group membership, and resource access from an authoritative source and remove that access promptly when roles change or people leave. In Google Cloud, the workflow centers on Cloud Identity (opens in a new tab) as the identity as a service (IDaaS) control plane, Identity and Access Management (IAM) as the authorization control plane, and Google Groups as the binding between them. When a join, move, or leave event occurs in the authoritative source, group membership changes flow into IAM allow policies so access is granted, adjusted, or revoked without editing individual user bindings.
The provisioning model defines where users are created, how many accounts each person holds, and where the trust boundary sits between Google Cloud and an external identity provider (IdP). Google Workspace and Cloud Identity can act as the authoritative source, or an external IdP such as Microsoft Entra ID (formerly Azure AD) or Okta can remain authoritative and connect to Google Cloud for single sign-on. Choosing the model determines whether lifecycle automation depends on synchronization into Google-managed accounts or on federation trust that evaluates the external identity at sign-in time.
| Provisioning model | Where users are managed | Accounts per user |
|---|---|---|
| Cloud Identity or Google Workspace direct | Users and groups are created and managed in Cloud Identity or Google Workspace as managed user accounts | One Google-managed account |
| Federation using Cloud Identity or Google Workspace with sync | Users are managed in the external IdP and synchronized to matching Cloud Identity or Google Workspace accounts using Google Cloud Directory Sync (GCDS) | Two accounts: one external account plus one Google-managed account |
| Workforce Identity Federation | Users are created and managed only in the external IdP and sign in to Google Cloud through a workforce identity pool | One account: the external account, also called a federated identity |
Exam tip: Federation with GCDS synchronization requires two accounts per user, while Workforce Identity Federation requires only the external account.
Synchronization keeps Google Cloud group membership aligned with team, role, and employment status in the authoritative source so provisioning and moves happen automatically. With Cloud Identity direct management, administrators create managed user accounts, create a group for each administrative function, and assign users to the groups that match their responsibilities. With an external IdP, the connection is established through Workforce Identity Federation, where Google Cloud trusts the external provider to assert identities and group claims through a configured workforce pool.
Connecting an external IdP follows an ordered guided setup where each step depends on the previous one:
Data flows from the external IdP to the workforce pool at authentication time, then from group membership to IAM policies at authorization time. Because IAM evaluates the federated identity and its mapped attributes, suspending or deleting the user in the external IdP can cut off Google Cloud access only when suspension and deletion events are propagated through the federation configuration.
Group-based access is the mechanism that makes join-move-leave automation work without rewriting IAM policies for every personnel change. Role-based access control (RBAC) (opens in a new tab) assigns IAM roles to Google Groups according to job role, and users gain or lose permissions only by entering or leaving groups. This design enforces the principle of least privilege because each group carries the minimum permissions required for its function, and access ends as soon as membership ends.
Recommended administrative groups separate core functions so organization, billing, network, security, and development duties do not overlap in one principal:
gcp-organization-admins administers all organization resources and is assigned only to the most trusted users.gcp-billing-admins sets up billing accounts and monitors usage.gcp-network-admins creates Virtual Private Cloud networks, subnets, and firewall rules.gcp-hybrid-connectivity-admins creates network devices such as Cloud VPN instances and Cloud Router.gcp-logging-monitoring-admins uses all Cloud Logging and Cloud Monitoring features, while gcp-logging-monitoring-viewers has read-only access to a subset of logs and monitoring data.gcp-security-admins establishes organization security policies, including access management and organization constraint policies.gcp-developers designs, codes, and tests applications, while gcp-devops creates continuous integration and delivery pipelines and system provisioning.The IAM policy applies to the group object, and the group depends on Cloud Identity for its membership list. Moving a user from one group to another therefore revokes the allow policies of the previous group and grants the allow policies of the new group in one membership operation.
Deprovisioning removes a departing or transferred user's ability to reach projects, virtual machines (VMs), databases, and keys without manual cleanup of every credential. The design must link each secondary credential lifecycle to the primary Google identity lifecycle so suspension or deletion in Cloud Identity, Google Workspace, or the external IdP automatically invalidates derived access. Without that linkage, orphaned keys, database passwords, and VM logins can survive after the user account is gone.
Build revocation-ready projects by connecting resource access to identity state rather than to long-lived secrets. Use OS Login instead of metadata-based SSH keys so authorized keys remain linked to the Google identity and VM access is revoked automatically when the account is removed. Use the Cloud SQL Auth proxy and AlloyDB for PostgreSQL Auth proxy so database access follows suspension or deletion of the Google identity. Restrict external identities with the iam.allowedPolicyMemberDomains organization list constraint, restrict API keys to specific sites, IP addresses, and apps, and design service account keys, OAuth client secrets, and database root passwords so they support non-disruptive rotation after a departure or compromise. Revocation-ready design (opens in a new tab) ensures that disabling the primary identity also disables its derived access paths.
Continuous detection finds accounts and permissions that automation missed, such as users who changed roles or service accounts abandoned after tasks completed. Policy Intelligence provides the IAM recommender, which uses machine learning to recommend removal of unneeded role bindings and to maintain least privilege across the organization. The Recommender service also emits insights, which are findings about notable usage patterns such as unused permissions and unused service accounts.
At enterprise scale, recommendations flow from IAM recommender through the BigQuery Data Transfer Service into a BigQuery dataset for querying and visualization in Looker or Looker Studio. A query that filters on recommender = "google.iam.policy.Recommender" and recommender_subtype = "REMOVE_ROLE" returns candidates for rightsizing IAM role bindings. Administrators review the results and apply removals, so deprovisioning combines event-driven group removal with periodic machine-assisted cleanup.
Certification and auditing prove that the right individuals hold the right access for the right reasons and reveal who changed access when incidents occur. Policy Analyzer checks which users have access to which resources and in what capacity, supporting periodic access reviews for compliance and audit. Cloud Audit Logs (opens in a new tab) records the lifecycle events themselves, including IAM policy changes, service account creation, and service account key downloads.
Use Admin Activity audit logs for control-plane changes to projects, service accounts, and IAM policies, and use Policy Denied audit logs when access is refused because of a security policy violation. Because audit logs have a limited retention period, create a log sink that exports them to BigQuery or another destination for long-term forensics, trend analysis, and aggregate access analytics. Querying SetIamPolicy, google.iam.admin.v1.CreateServiceAccount, and google.iam.admin.v1.CreateServiceAccountKey in Logs Explorer shows permission grants and new workload credentials, while group membership change logs show the join-move-leave operations that drove those grants.
Integrating lifecycle management with security and compliance monitoring means connecting user provisioning systems to detective and corrective controls so every join, move, and leave event is visible, evaluated, and remediated. In Google Cloud, Cloud Identity provisions users and groups, Identity and Access Management (IAM) authorizes who can act on resources, Cloud Audit Logs records what happened, and Security Command Center (SCC) analyzes findings for threats and misconfigurations. Log data flows from IAM, Cloud Identity, and Google Workspace into Cloud Logging for central aggregation, then into Security Command Center and Google Security Operations for analysis, and then back to IAM and Organization Policy Service as remediation. This closed loop detects anomalies in the lifecycle process, supports compliance reporting for access governance, and removes orphaned access automatically.
Centralized audit logging for lifecycle visibility aggregates administrator activity, data access, and login events so provisioning and deprovisioning can be reconstructed and monitored. Cloud Audit Logs capture IAM policy changes, service account creation and deletion, and token generation, while Google Workspace and Cloud Identity login logs track interactive user authentication when exported to Cloud Logging. Central aggregation enables baselining of normal joiner-mover-leaver behavior, anomaly detection across projects and folders, and retention policies that balance security needs with storage costs. Access to sensitive logs must itself be protected with restricted IAM roles and reviewed under best practices for audit log security.
Configure alerts in Cloud Audit Logs for identity-specific lifecycle signals:
iamcredentials.googleapis.com methods such as GenerateAccessToken, GenerateIdToken, and SignJwt to audit service account token generation, which requires Data Access logs to be enabled.protoPayload.authenticationInfo.serviceAccountDelegationInfo.firstPartyPrincipal.principalEmail to audit user and service account impersonation and delegation chains.sts.googleapis.com exchange requests to detect anomalous identity assertions from Workload Identity Federation and external identity providers.Exam tip: Token-generation methods such as GenerateAccessToken do not appear unless Data Access audit logs are explicitly enabled, while impersonation must be traced through the serviceAccountDelegationInfo.firstPartyPrincipal field.
Security Command Center is the centralized security and risk management service that ingests asset inventory, audit logs, and threat telemetry to surface lifecycle anomalies as findings. Its Event Threat Detection source correlates IAM activity, login behavior, and service account usage against baselines to flag persistence, privilege escalation, evasion, and initial access techniques that often follow incomplete deprovisioning. Each finding links to recommended investigation steps, and findings can flow from Security Command Center to an existing security information and event management (SIEM) system or into Google Security Operations for further correlation and incident response. Complementary signals come from secret scanning in code repositories, Anomaly Detection, and Cloud Monitoring for service account key usage anomalies.
Monitor these Event Threat Detection findings for lifecycle compromise and orphaned access:
When a finding fires, the security operations center (SOC) must be notified promptly with playbooks, tools, and cross-console access across the Google Cloud console and the Admin console. If separate teams manage those consoles without pre-granted incident-response access, investigation of a compromised or orphaned identity will be delayed.
Continuous compliance for lifecycle management follows three stages in order: first assessment of regulatory obligations, then gap remediation of excessive or missing controls, and only after remediation, continual monitoring for drift. Assessment uses the Compliance resource center (opens in a new tab) for service support by regulation and for certifications and attestations, plus the Cloud Data Processing Addendum (CDPA) for contractual commitments on data processing and limits on Google support access. Remediation uses Assured Workloads to set baseline personnel controls, data residency through organization policies, key-management options including customer-managed encryption keys (CMEK), and access criteria for support personnel. Third-party verifications, such as ISO/IEC 27017 attestations, provide independent evidence that platform controls meet the claimed regime.
Resource annotation connects inventory to governance reporting so access reviews can group identities and resources consistently:
| Annotation | Applies to | Primary governance use |
|---|---|---|
| Security marks | Security Command Center assets | Classify resources to provide security insights and enforce policies on groups of resources |
| Labels | Google Cloud resources for billing and logging | Track resource spend in Cloud Billing and provide extra insights in Cloud Logging |
| Tags | Resources and firewall policy targets | Define sources and targets in global and regional network firewall policies and control IAM access by tag |
Policy as code extends the same governance into deployment pipelines, where Policy Controller (opens in a new tab) and Open Policy Agent (OPA) check infrastructure as code before changes deploy. Organization Policy Service provides centralized preventive control over how resources and identities can be configured, and IAM Conditions and tags with IAM provide conditional, attribute-based access control on top of IAM allow policies that bind principals to roles. VPC Service Controls then adds defense in depth by creating service perimeters that restrict data movement even when an IAM binding exists.
Automated remediation for orphaned accounts closes the lifecycle loop by removing or constraining access that monitoring proves is no longer justified. The remediation path flows from a detection in Security Command Center or Cloud Logging to an action on the IAM allow policy, service account, or organization policy that granted the access. Least-privilege enforcement depends on reviewing and applying IAM role recommendations to remove unused and excessive roles, avoiding overprovisioning during moves, and considering just-in-time privileged access through Privileged Access Manager for sensitive operations. Principal access boundary policies (opens in a new tab) further limit what an identity can do even when it holds broad grants elsewhere in the hierarchy.
Enforce preventive constraints so remediation has fewer deviations to correct:
constraints/iam.disableServiceAccountKeyCreation to block creation of long-lived service account keys.constraints/iam.disableServiceAccountKeyUpload to block upload of externally generated keys.This combination ensures that a departed user whose Cloud Identity account remains active, a service account key created outside the approved pipeline (opens in a new tab), or an IAM grant that violates separation of duties triggers both a detective finding and a corrective change. The SOC playbook, SIEM integration, and pre-aligned response-team access determine how fast that finding becomes revocation, key deletion, or policy rollback.
roles/iam.serviceAccountTokenCreator to impersonate a privileged service account, with membership as the approval boundary and time-bound membership for expiration.serviceAccountDelegationInfo.firstPartyPrincipal.Group-based role-based access control assigns Identity and Access Management (IAM) roles to Google Groups so users gain permissions by joining a group and lose permissions by leaving it without rewriting IAM policies. Moving a user from one group to another revokes the allow policies of the previous group and grants the allow policies of the new group in one membership operation, which enforces least privilege when each group carries only the minimum permissions for its function.
Automated escalation separates the standing identity from the privileged capability by granting a Google group roles/iam.serviceAccountTokenCreator on a privileged service account that holds roles/compute.admin, so members impersonate the service account with short-lived tokens instead of holding direct administrative roles. Membership in the group becomes the approval and justification boundary, and privileged access either expires through time-bound membership or is reviewed periodically for recertification.
Emergency access users in Cloud Identity are created directly in Cloud Identity or Google Workspace, are exempt from Joiner, Mover, and Leaver (JML) lifecycle automation and from single sign-on (SSO), and must be placed in a dedicated organizational unit (OU) with a minimum of two and a maximum of five users per account. They must use Fast IDentity Online (FIDO) security keys for 2-Step Verification, with 2-Step Verification enabled for every emergency user and two or more FIDO keys enrolled per user.
Chrome Enterprise Premium is user-centric and evaluates only user identities within the organization on every API request, rejecting user API traffic that fails conditions such as IP-based access or certificate-based access for mutual TLS even when the credential is valid. VPC Service Controls is resource-centric and applies to all user identities and all service account identities, allowing communication inside a perimeter and denying it across the perimeter, so together they reduce the effectiveness of compromised credentials used from an attacker-controlled machine.
A financial enterprise is updating its identity governance and privilege escalation policies across several Google Cloud production projects. The security team wants to eliminate permanent administrative role bindings, establish automated justification and approval workflows for time-bound access elevations integrated with their ITSM platform, and automatically detect when dormant service accounts are granted unauthorized impersonation roles.
Which combination of Google Cloud features should the security engineer implement to satisfy these requirements?
Configure Privileged Access Manager (PAM) entitlements requiring justification and automated service account approvers for ITSM integration; monitor Security Command Center Event Threat Detection for dormant service account impersonation findings and apply IAM Recommender recommendations.
Enforce OS Login with 2-step verification across all Compute Engine instances; configure Organization Policies with iam.disableServiceAccountKeyCreation and automated Cloud KMS key rotation.
Configure Policy Troubleshooter automated remediation rules; implement Principal Access Boundary policies to restrict dormant service account delegation chains across projects.
Implement Access Context Manager conditional levels with Chrome Enterprise Premium user-risk policies; configure VPC Service Controls perimeters and rely on custom Cloud Functions parsing Cloud Logging export sinks.
Last updated