Home / Google Cloud Professional Cloud Security Engineer / Mock exam
Google Cloud Professional Cloud Security Engineer Exam-style mock test

Google Cloud Professional Cloud Security Engineer Practice Exams|Practice test

Full explanations Exam format Pass line 70%
33 USD One-time · lifetime access
Enroll →

Sample questions

Example1 · Configuring Access
A global retail bank runs its production workloads in a dedicated Google Cloud folder. Auditors require that nobody can grant the roles/owner primitive role on any project inside that folder, even if an administrator mistakenly tries to do so. The security team wants a preventive control applied once at the folder scope rather than per-project cleanup. Which approach meets this requirement?
✓Create an IAM deny policy at the folder that denies the setIamPolicy permission for the Owner role to all principals.
Correct. An IAM deny policy attached at the folder can deny the specific permission needed to grant Owner, enforcing the restriction preventively across all contained projects for all principals.
・Apply an organization policy with the constraint that blocks all role grants below the folder for every team.
Incorrect. There is no org policy constraint that selectively blocks only the Owner role; org policy constraints govern configuration, not arbitrary role-grant filtering.
・Attach a custom role at the folder that omits owner and ask every administrator to use only that custom role from now on.
Incorrect. Providing a custom role does not prevent a privileged administrator from still granting roles/owner, so the control relies on voluntary compliance.
・Enable Cloud Audit Logs on the folder and configure an alert that revokes Owner whenever it is detected.
Incorrect. Audit logging plus alerting is detective and reactive; Owner would still be granted temporarily before any automated revocation runs.
Explanation
IAM deny policies evaluate before allow policies and can block specific permissions regardless of granted roles. Attaching the deny at the folder enforces it preventively for every project and principal beneath it.
Example2 · Securing Communications and Boundary Protection
A global retail bank runs its core payments application in a Shared VPC host project. The network team must ensure that the PCI cardholder data environment (CDE) subnet cannot reach the general corporate subnet, while both remain in the same VPC for centralized routing. Which VPC design satisfies the isolation requirement with the least operational overhead?
✓Keep both subnets in the Shared VPC and apply tag-based or service-account-based firewall rules that deny traffic between the CDE and corporate subnets.
Correct. Within a single Shared VPC, firewall rules keyed on network tags or service accounts enforce segment-to-segment isolation while preserving centralized routing and minimizing extra infrastructure.
・Place the CDE and corporate workloads in two separate VPC networks and peer them, then rely on peering to block the undesired traffic automatically.
Incorrect. VPC Network Peering does not block traffic by default; peered networks have full reachability unless firewall rules restrict it, so peering alone provides no segmentation.
・Move the corporate subnet into a standalone project and expose the payments application only through a public external load balancer reachable over the internet.
Incorrect. Exposing the payments application over the public internet through an external load balancer increases attack surface and violates PCI boundary expectations rather than isolating subnets.
・Enable Private Google Access on the CDE subnet so that corporate hosts are prevented from initiating any connections toward cardholder systems.
Incorrect. Private Google Access only affects reachability to Google APIs from instances lacking external IPs; it does not govern east-west traffic between two subnets.
Explanation
Segmentation inside a single VPC is achieved with firewall rules that match tags or service accounts, not with peering or Private Google Access. This keeps routing centralized in the Shared VPC while denying lateral movement into the CDE.
Example3 · Ensuring Data Protection
A global retail bank runs weekly batch jobs that load millions of customer support transcripts into a BigQuery dataset. The data governance team must automatically profile these tables on an ongoing schedule to surface which columns contain high-sensitivity data such as credit card numbers and national IDs, without analysts writing custom scans for each new table. Which Sensitive Data Protection capability meets this requirement?
✓Configure a discovery scan that continuously profiles the dataset and emits data profiles with predicted infoTypes and sensitivity scores.
Correct. Discovery scan configurations continuously generate data profiles for BigQuery tables, predicting infoTypes and sensitivity scores without per-table manual jobs.
・Run a one-time inspection job against each table and export the findings to a Pub/Sub topic for manual review.
Incorrect. A one-time inspection job does not provide the ongoing, automatic profiling of newly loaded tables that the requirement demands.
・Enable Object Versioning on the underlying storage so previous column states are retained for audit.
Incorrect. Object Versioning retains prior object states but performs no sensitive-data classification or profiling at all.
・Apply a deterministic cryptographic tokenization template to every single string column in the dataset before each weekly batch load is allowed to complete.
Incorrect. Tokenization de-identifies data but does not discover or profile which columns hold sensitive infoTypes across the dataset.
Explanation
Sensitive Data Protection discovery continuously profiles BigQuery (and other) resources, predicting infoTypes and sensitivity levels so governance teams do not script per-table scans. Inspection jobs, versioning, and tokenization address different needs.
Example4 · Managing Operations
A hospital network must prove to auditors that every read of patient imaging objects in a Cloud Storage bucket is recorded, including reads performed by its own data scientists. By default these reads are not captured. Which configuration records them?
・Rely on Admin Activity audit logs, which are already on and capture every access to the bucket
Incorrect. Admin Activity logs record configuration changes to the bucket, not the individual object read operations performed by users.
✓Enable the Cloud Storage DATA_READ Data Access audit log type for the bucket's project so that every object read is captured
Correct. Object reads are Data Access logs, and the DATA_READ type must be explicitly enabled for the Storage API because these logs are off by default, which captures every object read.
・Turn on bucket usage logs delivered hourly to a separate logging bucket for billing analysis
Incorrect. Usage and storage logs report access patterns for billing and are not the per-caller Data Access audit trail that auditors require.
・Add a log sink that routes the existing Storage logs to BigQuery for long-term analysis
Incorrect. A sink only routes logs that already exist, so it cannot capture reads that were never recorded in the first place.
Explanation
Object reads fall under Data Access audit logs, which are disabled by default and must be turned on per service with the DATA_READ type. Admin Activity logs, usage logs, and sinks do not create the read records themselves.
Example5 · Supporting Compliance
A life-sciences company runs genomic analysis pipelines that must meet FedRAMP High and ITAR data-residency rules, with a contractual guarantee that Google personnel cannot access the data without justified, logged approval. Which Google Cloud offering is purpose-built to enforce these regulatory and data-sovereignty controls as a package?
・VPC Service Controls perimeters configured around every single project that stores the genomic datasets
Incorrect. VPC Service Controls prevents data exfiltration across a perimeter but does not enforce personnel screening, data residency, or FedRAMP packaging.
✓Assured Workloads, which enforces the chosen compliance regime's personnel screening and data-residency controls across the entire folder
Correct. Assured Workloads applies a chosen compliance package (such as FedRAMP High) that pins data location, restricts support personnel to screened US persons, and bundles the residency and access controls.
・Organization Policy constraints restricting resource creation to approved US regions
Incorrect. Organization Policy can restrict regions but cannot deliver the personnel, support, and contractual guarantees that the regulatory regime requires.
・Cloud Key Management Service with customer-managed keys for all storage buckets
Incorrect. CMEK protects keys but alone provides no data-residency enforcement, personnel screening, or compliance-regime packaging.
Explanation
Assured Workloads is the managed offering that bundles data residency, personnel controls, and support restrictions for regulated regimes like FedRAMP High and ITAR. The other controls address single dimensions but do not package the full regulatory requirement.
Example6 · Configuring Access
A hospital network runs its electronic health record platform in a dedicated Google Cloud folder. Compliance requires that no individual user account can ever be granted the Owner role on any project inside that folder, even if a project-level administrator tries to add it. Which approach enforces this rule across all current and future projects in the folder?
✓Attach an IAM deny policy at the folder that blocks setting the Owner role binding for inherited principals
Correct. An IAM deny policy at the folder blocks the targeted permission for inherited principals regardless of allow bindings.
・Create an organization policy custom constraint on each project that lists Owner as a forbidden role value for user members
Incorrect. Org policy custom constraints govern resource configuration fields, not the assignment of a specific IAM role to user members.
・Give each project a conditional role binding that expires the Owner role after a short lease period defined in the condition
Incorrect. A conditional expiry still permits Owner to be granted; it only times out later, so it does not prevent the binding.
・Ask project admins to manually audit and remove unexpected Owner role grants every week
Incorrect. Manual weekly audits are reactive and allow a window of unauthorized Owner access, failing the always-enforced requirement.
Explanation
IAM deny policies evaluate before allow policies and can be attached to the folder so they inherit to all projects. Scoping an exception to a break-glass group preserves emergency access while blocking all other Owner grants.
Example7 · Configuring Access
A logistics company runs a fleet-telemetry platform in a project where plant technicians must read Pub/Sub messages only from devices located in the Osaka warehouse. Each device publishes to topics tagged with a resource tag such as site=osaka. Technicians should not gain read access to topics for other warehouses. Which IAM approach grants exactly this access with the least privilege?
✓Grant the technician group the Pub/Sub Subscriber role on the project with an IAM condition matching resource.matchTag('<org-id>/site', 'osaka') so that only the Osaka-tagged topics become readable.
Correct. A conditional binding on the Subscriber role using resource.matchTag limits the grant to topics tagged site=osaka, enforcing least privilege technically without exposing other warehouse sites.
・Grant the technician group the Pub/Sub Viewer role on the whole project and rely on documented operating procedures to keep technicians from reading other sites.
Incorrect. Viewer on the whole project exposes every warehouse's topics, so procedures rather than enforcement are the only control, violating least privilege.
・Grant the technician group the Pub/Sub Editor role on the folder containing the project so every current and future warehouse topic is covered.
Incorrect. Editor at the folder level is far broader than read access and spans every warehouse, which is the opposite of least privilege.
・Create one service account per technician and attach the Pub/Sub Subscriber role directly to each Osaka topic, distributing the keys to the technicians.
Incorrect. Distributing per-user service account keys to humans creates key-management risk and does not restrict by site any better than a condition would.
Explanation
IAM conditions using resource.matchTag let you scope a role binding to resources carrying a specific tag. Combining the Subscriber role with a site tag condition grants read on only the Osaka topics. Broad project or folder roles and distributed keys all over-provision.
Example8 · Configuring Access
A manufacturer wants to guarantee that no principal in its production folder can delete Compute Engine instances that run SCADA controllers, even if an administrator mistakenly grants an overly broad role. The security team must create a hard, evaluated-first guardrail that overrides any allow grant. Which mechanism satisfies this?
✓Create an IAM deny policy on the folder that denies compute.instances.delete for all principals except a break-glass group.
Correct. IAM deny policies are evaluated before allow policies and block the specified permission regardless of any granted role, forming a hard guardrail with an exception group.
・Remove the Compute Admin role from every principal in the folder and audit the bindings weekly to catch any reintroduction of the role.
Incorrect. Periodic auditing is reactive and does not prevent a broad grant from being effective between audits, so it is not a hard guardrail.
・Add an organization policy constraint that restricts which Compute Engine machine types may be used so that the SCADA instances cannot easily be recreated after deletion.
Incorrect. A machine-type constraint governs creation parameters, not deletion, so it does nothing to stop an existing instance from being deleted by an over-broad role.
・Grant the SCADA instances the Compute Viewer role so that principals can only view rather than delete them through the console.
Incorrect. Granting Viewer to the instances does not remove delete permission that other allow bindings may confer, so deletion remains possible.
Explanation
IAM deny policies are evaluated before allow policies and can block a permission such as compute.instances.delete regardless of how roles are granted. Auditing, machine-type constraints, and viewer roles cannot override an existing allow grant.
Example9 · Configuring Access
An IoT platform team runs ingestion workloads on Google Kubernetes Engine and needs pods to call Cloud Storage and BigQuery without any long-lived service account keys stored in the cluster. The security engineer must bind the Kubernetes service account used by the ingestion pods to a Google service account. Which feature should be configured?
・Mount a downloaded service account JSON key as a Kubernetes Secret and reference it from each pod spec through an environment variable pointing at the key file.
Incorrect. A mounted JSON key is a long-lived credential, exactly what must be avoided, and it increases the blast radius if a pod is compromised.
✓Enable Workload Identity Federation for GKE so the Kubernetes service account can impersonate a Google service account using short-lived tokens.
Correct. Workload Identity Federation for GKE lets a Kubernetes service account act as a Google service account with short-lived tokens, removing exported keys.
・Assign the node pool a broadly-scoped service account and let every pod inherit the node's credentials.
Incorrect. Relying on the node's service account gives all pods the same broad identity, violating per-workload least privilege and still risking scope abuse.
・Store a static key in Secret Manager and have an init container fetch it at startup and write it to a shared volume.
Incorrect. Fetching a static key from Secret Manager still uses a long-lived key, so the key-management risk the team wants to eliminate remains.
Explanation
Workload Identity Federation for GKE maps Kubernetes service accounts to Google service accounts and issues short-lived credentials, eliminating exported keys. Mounted or Secret-Manager-stored JSON keys and shared node identities all retain long-lived or over-broad credentials.
Example10 · Configuring Access
A B2B SaaS analytics company runs its game-telemetry platform in a project where a build pipeline service account must read objects from one specific Cloud Storage bucket named tenant-exports, but only during the nightly window of 01:00-03:00 UTC. Security requires that the grant stop working outside that window without anyone editing the binding. Which approach satisfies this with least privilege?
✓Grant roles/storage.objectViewer on the tenant-exports bucket with an IAM condition on request.time for the nightly hours
Correct. A bucket-scoped roles/storage.objectViewer binding with a request.time IAM condition enforces the time window automatically and limits the grant to read-only on exactly one bucket.
・Grant roles/storage.objectViewer at the project level and rely on an organization policy to block access outside business hours
Incorrect. Project-level objectViewer over-grants to every bucket, and org policy constraints do not evaluate request time to gate IAM access.
・Grant roles/storage.admin on the tenant-exports bucket and manually disable the pipeline service account each morning once the batch job has finished running
Incorrect. roles/storage.admin grants write and delete far beyond read, and manual daily toggling violates the no-edit requirement and least privilege.
・Add the pipeline service account to a Google group and schedule a Cloud Scheduler job that adds and removes the membership around the window
Incorrect. Scheduler-driven group churn is fragile, leaves a race window, and still grants broadly rather than using a native time condition.
Explanation
IAM conditions let you attach a time-bound expression to a specific resource binding so access expires automatically. Scoping to the bucket and read role preserves least privilege while request.time enforces the nightly window.
Example11 · Configuring Access
A gaming studio's security team discovers that a broadly granted roles/editor on the production folder lets a support engineer delete Compute Engine instances, which must never happen even though she legitimately needs most editor permissions for debugging. Leadership wants deletions blocked for that user regardless of any current or future allow grant. What should the team configure?
・A custom role that copies roles/editor but omits the compute.instances.delete permission, then rebind the engineer to it
Incorrect. A custom role only removes the permission from that one binding; any other allow grant could still let her delete, so it does not guarantee the block.
・An organization policy constraint that disables the Compute Engine API in the production folder
Incorrect. Disabling the Compute Engine API breaks all instance operations for everyone, far exceeding the targeted deletion restriction.
✓An IAM deny policy on the folder denying compute.instances.delete for the engineer's principal
Correct. IAM deny policies evaluate before allow policies, so denying compute.instances.delete for that principal blocks the action no matter what allow roles exist now or later.
・A VPC Service Controls perimeter configured to block instance deletion
Incorrect. VPC Service Controls guard API data exfiltration across perimeters and do not deny a specific IAM permission for one user.
Explanation
Deny policies provide a guardrail that overrides allow grants for named principals and permissions. This is the correct tool when a specific action must be impossible even as allow bindings evolve.
Example12 · Configuring Access
A state department of education runs its GCP organization through Cloud Identity. A newly onboarded contractor from a staffing agency needs to collaborate for a six-week pilot, but the agency manages its own external Google Workspace tenant. The security team requires that the contractor authenticate with their agency credentials, never receive a managed account in the education tenant, and have access that is scoped only to a single analytics project. Which approach best satisfies these requirements?
・Create a managed Cloud Identity account for the contractor in the education tenant and assign a narrowly scoped project-level role.
Incorrect. Creating a managed account violates the requirement that the contractor never receive an account provisioned in the education tenant.
・Provision a user-managed service account in the analytics project, generate a downloadable key, and send it to the contractor by email.
Incorrect. Distributing a service account key by email exposes long-lived credentials and does not tie access to the contractor's agency credentials.
✓Grant IAM roles on the analytics project directly to the contractor's existing external Google identity.
Correct. Granting IAM on the project to the contractor's existing external Google identity gives externally authenticated, project-scoped access with no managed account created in the tenant.
・Verify the agency domain as a secondary organization domain and grant folder-level roles.
Incorrect. Verifying the agency domain as a secondary domain would absorb those users into the education tenant and broaden scope to a folder, not a single project.
Explanation
External Google identities can be granted IAM roles directly on a resource without being provisioned as managed accounts in the organization. This keeps authentication with the agency credentials and limits scope precisely to the analytics project.
Example13 · Configuring Access
An energy utility stores grid telemetry in a Cloud Storage bucket inside a project used by its operations team. Auditors must be able to read objects only during the quarterly audit window, between the 1st and 7th of the first month of each quarter. The security engineer wants access to disappear automatically after the window without manual revocation. Which IAM configuration meets this need most directly?
・Grant roles/storage.objectViewer at the project level and remove the binding manually afterward.
Incorrect. Project-level grants with manual removal rely on an operator remembering to revoke and do not expire automatically.
・Add the auditors to a Google group and schedule a Cloud Function to delete the group membership every quarter.
Incorrect. Scheduling a function to edit group membership is brittle, adds moving parts, and still leaves access active between runs.
・Create a deny policy that blocks all storage reads and manually suspend it during each audit window.
Incorrect. Manually suspending a deny policy during the window reintroduces the manual step the requirement is meant to eliminate.
✓Grant roles/storage.objectViewer with an IAM condition on request.time that restricts the viewer binding to the defined date range.
Correct. An IAM condition on request.time scopes the viewer binding to the exact date range so access is granted and expires automatically without manual action.
Explanation
IAM conditions using the request.time attribute let a role binding apply only within a specified time range. This provides time-bound access that activates and expires automatically, eliminating manual revocation.
Example14 · Configuring Access
Voyagio, a travel booking platform, runs its claims-reconciliation workload in a project. An auditor must read Cloud Storage objects in that project only between 08:00 and 18:00 UTC on weekdays, enforced centrally without changing the auditor's group membership. Which approach grants this access?
・Add the auditor to the project Owner role and review audit logs afterward for any out-of-hours access.
Incorrect. Owner grossly violates least privilege, and after-the-fact audit review does not prevent out-of-hours access.
・Create a deny policy on the organization that blocks storage.objects.get for everyone and schedule a Cloud Scheduler job to delete it each morning.
Incorrect. A deleting-and-recreating deny policy driven by a scheduler is brittle, affects everyone, and is not a supported time-window pattern.
・Grant the auditor a static service account key scoped to the bucket and rotate it manually at the start and end of each workday by the operations team.
Incorrect. Static service account keys do not impersonate a human auditor and manual rotation does not implement a time condition.
✓Bind the auditor's group to the Storage Object Viewer role with an IAM condition on request.time restricting the allowed hours and days.
Correct. An IAM condition using request.time with a CEL expression on the hour and day of week limits when the Storage Object Viewer binding is effective, enforced centrally.
Explanation
IAM conditions evaluate attributes such as request.time, letting you scope a role binding to specific hours and weekdays. This enforces the time window centrally while keeping the auditor's group membership unchanged.
Example15 · Configuring Access
SafeHarbor Insurance mandates that no principal anywhere in the organization may ever delete Cloud KMS keys, even if someone later grants them an admin role on a project. Which mechanism enforces this prohibition with the highest precedence?
✓An IAM deny policy attached at the organization node that explicitly denies the cloudkms.cryptoKeyVersions.destroy permission for every principal across the entire hierarchy.
Correct. IAM deny policies are evaluated before allow policies, so an org-level deny on the destroy permission across the hierarchy overrides any allow grant regardless of later role assignments.
・Removing the Cloud KMS Admin role from every project and documenting the change in a policy wiki.
Incorrect. Removing roles does not prevent a future admin from re-granting them, so the prohibition is not durable.
・An organization policy constraint that disables usage of the Cloud KMS API across every project in the organization hierarchy.
Incorrect. Disabling the KMS API would break all key usage, not just prevent destruction.
・A custom role that simply omits the key-destroy permission, assigned in place of predefined KMS roles.
Incorrect. A custom role only constrains principals assigned that role; other roles can still allow destruction.
Explanation
Deny policies take precedence over allow policies and apply even when a conflicting allow exists. Placing the deny at the organization node blocks the destroy permission for every principal everywhere.
▶ Try 10 free questions (graded)
Measure your readiness with a full mock exam
All questions · full explanations · lifetime access
Enroll(33 USD)