Sign in
Home/Google Cloud/Professional Cloud Security Engineer (Google Cloud)/Free questions

Professional Cloud Security Engineer (Google Cloud) — Free Practice Questions

10 free sample questions from a bank of 321, with the correct answers and explanations. No signup required — start practising right now.

1Your team needs to make sure that a Compute Engine instance does not have access to the internet or to any Google APIs or services. Which two settings must remain disabled to meet these requirements? (Choose two.)
  • Public IP
  • IP Forwarding
  • Private Google Access
  • Static routes
  • IAM Network User Role
Answer: A, C

The short version

AC — no internet and no Google APIs means no public IP and no Private Google Access. The settled key removes both external and private API paths.

Key concepts in this question

  • Public IP effect: attaches internet-routable egress and ingress to the Compute Engine NIC.
  • Private Google Access effect: lets private-IP VMs reach Google APIs and services internally.
  • Combined isolation: disabling both leaves the instance with no internet and no API reachability.
  • IP Forwarding contrast: enables packet forwarding as a router, not API or internet access itself.
  • IAM and routes contrast: permissions and static routes shape who can act, not the data-path switch here.

Why AC is correct

A is correct because any public IP would provide internet connectivity, violating the first requirement. C is correct because Private Google Access would still allow Google API reachability from a private address, violating the second requirement. Only with both disabled does the instance meet the dual-denial goal.

Why the others are wrong

  • B. IP Forwarding controls routing behavior, not API or internet enablement.
  • D. static routes steer traffic but do not themselves grant API access.
  • E. IAM Network User Role governs who can use networks, not API reachability.

PCSE exam tip

For total isolation remember two offs: public IP off plus Private Google Access off.

2Which two implied firewall rules are defined on a VPC network? (Choose two.)
  • A rule that allows all outbound connections
  • A rule that denies all inbound connections
  • A rule that blocks all inbound port 25 connections
  • A rule that blocks all outbound connections
  • A rule that allows all inbound port 80 connections
Answer: A, B

The short version

AB — every VPC starts with allow-egress and deny-ingress implied rules. The settled key states the two default behaviors.

Key concepts in this question

  • Implied rules purpose: lowest-priority defaults that apply when no custom firewall rule matches.
  • Egress allow: permits all outbound connections so instances can initiate updates and API calls.
  • Ingress deny: blocks all inbound connections unless an explicit allow rule opens a port.
  • Port-25 nuance: SMTP throttling is enforced separately, not as an implied firewall rule.
  • Port-80 nuance: web ingress requires an explicit allow rule, it is never implied.

Why AB is correct

A is correct because Google documents an implied allow-egress rule with the lowest priority that lets VMs initiate outbound traffic. B is correct because the companion implied deny-ingress rule drops unsolicited inbound packets by default. Together they create default-closed ingress with default-open egress, the foundation for custom rules.

Why the others are wrong

  • C. blocking port 25 is not an implied rule, it is platform mail policy.
  • D. blocking all outbound contradicts the allow-egress default.
  • E. allowing port 80 inbound requires explicit configuration, never implied.

PCSE exam tip

Memorize implied pair as out-open plus in-closed: allow egress, deny ingress.

3A customer needs an alternative to storing their plain text secrets in their source-code management (SCM) system. How should the customer achieve this using Google Cloud Platform?
  • Use Cloud Source Repositories, and store secrets in Cloud SQL.
  • Encrypt the secrets with a Customer-Managed Encryption Key (CMEK), and store them in Cloud Storage.
  • Run the Cloud Data Loss Prevention API to scan the secrets, and store them in Cloud SQL.
  • Deploy the SCM to a Compute Engine VM with local SSDs, and enable preemptible VMs.
Answer: B

The short version

B — replace SCM secrets with CMEK-encrypted objects in Cloud Storage. The settled key separates code from encrypted secret storage.

Key concepts in this question

  • SCM risk: plain-text secrets in git history leak to every clone and fork.
  • CMEK control: customer-managed keys in Cloud KMS enable rotation and revocation.
  • Cloud Storage role: durable object store for ciphertext blobs outside source control.
  • SQL contrast: Cloud SQL is a relational database, not the credited secret blob store here.
  • DLP and VM contrast: scanning or local SSDs do not provide managed-secret separation.

Why B is correct

B is correct because encrypting secrets with a CMEK and storing ciphertext in Cloud Storage removes plain text from SCM while keeping customer key control. Applications decrypt at runtime with IAM-gated key use. That pattern directly answers the alternative-to-plain-text requirement in this syllabus.

Why the others are wrong

  • A. storing secrets in Cloud SQL still couples secrets near code without the credited encryption pattern.
  • C. DLP scanning finds leaks but does not replace SCM secret storage.
  • D. local SSDs on preemptible VMs are ephemeral and unsuitable for secret management.

PCSE exam tip

Secrets out of SCM equals encrypt with CMEK plus store outside code.

4Your team wants to centrally manage GCP IAM permissions from their on-premises Active Directory Service. Your team wants to manage permissions by AD group membership. What should your team do to meet these requirements?
  • Set up Cloud Directory Sync to sync groups, and set IAM permissions on the groups.
  • Set up SAML 2.0 Single Sign-On (SSO), and assign IAM permissions to the groups.
  • Use the Cloud Identity and Access Management API to create groups and IAM permissions from Active Directory.
  • Use the Admin SDK to create groups and assign IAM permissions from Active Directory.
Answer: A

The short version

A — sync AD groups with Cloud Directory Sync then grant IAM on groups. The settled key centralizes permission by on-premises membership.

Key concepts in this question

  • Cloud Directory Sync purpose: provisions users and groups from Active Directory into Cloud Identity.
  • Group-based IAM: bindings on synced groups automatically follow AD membership changes.
  • SSO contrast: SAML sign-in authenticates users but does not provision groups for IAM.
  • API and SDK contrast: programmatic group creation is custom effort, not the managed sync path.
  • Central management goal: one membership change on-premises updates GCP access everywhere.

Why A is correct

A is correct because Cloud Directory Sync replicates AD groups into Google Cloud, where IAM policies attached to those groups enforce permissions by membership. That satisfies central management from on-premises AD. SSO alone would authenticate without syncing the group objects needed for authorization.

Why the others are wrong

  • B. SAML SSO enables login but does not sync groups for IAM binding.
  • C. IAM API custom sync adds maintenance versus managed directory sync.
  • D. Admin SDK scripting is bespoke and not the credited central solution.

PCSE exam tip

AD groups to GCP permissions always means Directory Sync plus IAM on groups.

5When creating a secure container image, which two items should you incorporate into the build if possible? (Choose two.)
  • Ensure that the app does not run as PID 1.
  • Package a single app as a container.
  • Remove any unnecessary tools not needed by the app.
  • Use public container images as a base image for the app.
  • Use many container image layers to hide sensitive information.
Answer: B, C

The short version

BC — secure images carry one app and minimal tooling. The settled key enforces small attack surface in container builds.

Key concepts in this question

  • Single-app packaging: one process per container simplifies patching and least privilege.
  • Tool removal: stripping shells and debug binaries denies post-exploit utilities to attackers.
  • PID 1 nuance: proper init handling matters, but not-running as PID 1 is not the credited control.
  • Public base contrast: unvetted public images import unknown vulnerabilities instead of reducing them.
  • Layer-hiding myth: many layers do not conceal secrets, they preserve them in history.

Why BC is correct

B is correct because packaging a single app per container limits blast radius and clarifies vulnerability ownership. C is correct because removing unnecessary tools shrinks the exploit toolkit available after compromise. Together they implement minimal-surface best practice taught for secure builds.

Why the others are wrong

  • A. avoiding PID 1 is not the credited secure-build item here.
  • D. public base images increase supply-chain risk rather than hardening.
  • E. extra layers retain secrets in history and add no hiding benefit.

PCSE exam tip

Secure image equals one app plus nothing extra: single purpose, minimal tools.

6A customer needs to launch a 3-tier internal web application on Google Cloud Platform (GCP). The customer's internal compliance requirements dictate that end- user access may only be allowed if the traffic seems to originate from a specific known good CIDR. The customer accepts the risk that their application will only have SYN flood DDoS protection. They want to use GCP's native SYN flood protection. Which product should be used to meet these requirements?
  • Cloud Armor
  • VPC Firewall Rules
  • Cloud Identity and Access Management
  • Cloud CDN
Answer: B

The short version

B — CIDR-scoped allow with SYN-flood protection means VPC Firewall Rules. The settled key uses native network filtering for the 3-tier app.

Key concepts in this question

  • CIDR restriction: allow traffic only when source matches a known-good range.
  • SYN-flood handling: GCP fabric provides native SYN-cookie style absorption for firewall-allowed flows.
  • VPC Firewall fit: stateful Layer 3 and 4 rules that filter by CIDR without extra services.
  • Cloud Armor contrast: Layer 7 policy and DDoS tiers for HTTP backends, beyond the accepted-risk scope.
  • IAM and CDN contrast: identity control and caching, not packet filtering.

Why B is correct

B is correct because VPC Firewall Rules natively enforce source-CIDR allow while the underlying Andromeda stack supplies SYN-flood absorption. That matches the customer acceptance of SYN-only protection from the network fabric. Cloud Armor would add unneeded application-layer scope.

Why the others are wrong

  • A. Cloud Armor targets HTTP security policies, not the requested native firewall path.
  • C. IAM controls identity access, not source-CIDR packet filtering.
  • D. Cloud CDN accelerates content and does not enforce CIDR allow.

PCSE exam tip

CIDR allow plus native SYN cover equals VPC Firewall, not Armor.

7A company is running workloads in a dedicated server room. They must only be accessed from within the private company network. You need to connect to these workloads from Compute Engine instances within a Google Cloud Platform project. Which two approaches can you take to meet the requirements? (Choose two.)
  • Configure the project with Cloud VPN.
  • Configure the project with Shared VPC.
  • Configure the project with Cloud Interconnect.
  • Configure the project with VPC peering.
  • Configure all Compute Engine instances with Private Access.
Answer: A, C

The short version

AC — private data-center reach from GCP means VPN or Interconnect. The settled key selects hybrid links over VPC sharing constructs.

Key concepts in this question

  • Hybrid requirement: Compute Engine must reach a locked server room over private addresses only.
  • Cloud VPN path: encrypted IPsec tunnels over the internet with private routing.
  • Cloud Interconnect path: dedicated or partner circuits for consistent private throughput.
  • Shared VPC contrast: shares a VPC among projects, it does not extend to on-premises rooms.
  • Peering and Private Access contrast: VPC peering links VPCs, private access reaches APIs, neither reaches the server room.

Why AC is correct

A is correct because Cloud VPN establishes private-routed connectivity suitable for moderate needs without public exposure. C is correct because Cloud Interconnect provides private dedicated capacity for demanding or stable workloads. Either satisfies the private-only constraint, so both are credited approaches.

Why the others are wrong

  • B. Shared VPC organizes cloud projects, not on-premises attachment.
  • D. VPC peering connects VPCs, not dedicated rooms.
  • E. Private Access enables API reach, not server-room workloads.

PCSE exam tip

On-premises private reach equals VPN for quick or Interconnect for dedicated.

8A customer implements Cloud Identity-Aware Proxy for their ERP system hosted on Compute Engine. Their security team wants to add a security layer so that the ERP systems only accept traffic from Cloud Identity-Aware Proxy. What should the customer do to meet these requirements?
  • Make sure that the ERP system can validate the JWT assertion in the HTTP requests.
  • Make sure that the ERP system can validate the identity headers in the HTTP requests.
  • Make sure that the ERP system can validate the x-forwarded-for headers in the HTTP requests.
  • Make sure that the ERP system can validate the userג€™s unique identifier headers in the HTTP requests.
Answer: A

The short version

A — lock ERP to IAP by validating the JWT assertion. The settled key proves proxied identity cryptographically.

Key concepts in this question

  • Identity-Aware Proxy flow: authenticates users, then forwards requests with a signed JWT identity token.
  • JWT validation: ERP checks signature, audience, issuer, and expiry using Google certs.
  • Header-spoofing risk: trusting plain identity or forwarded-for headers lets bypassers forge access.
  • Unique-ID contrast: raw identifiers without signatures are forgeable and insufficient.
  • Defense goal: only requests genuinely passing through IAP reach the ERP logic.

Why A is correct

A is correct because validating the IAP JWT assertion cryptographically confirms the request was authenticated and authorized by IAP. Signature and claims checks reject direct or spoofed calls. Documentation mandates JWT verification as the enforcement point for IAP-protected backends.

Why the others are wrong

  • B. identity headers alone are forgeable without JWT verification.
  • C. x-forwarded-for indicates source IP, not IAP authentication.
  • D. unique identifier headers lack signatures and prove nothing alone.

PCSE exam tip

Behind IAP always validate the signed JWT, never trust bare headers.

9A company has been running their application on Compute Engine. A bug in the application allowed a malicious user to repeatedly execute a script that results in the Compute Engine instance crashing. Although the bug has been fixed, you want to get notified in case this hack re-occurs. What should you do?
  • Create an Alerting Policy in Stackdriver using a Process Health condition, checking that the number of executions of the script remains below the desired threshold. Enable notifications.
  • Create an Alerting Policy in Stackdriver using the CPU usage metric. Set the threshold to 80% to be notified when the CPU usage goes above this 80%.
  • Log every execution of the script to Stackdriver Logging. Create a User-defined metric in Stackdriver Logging on the logs, and create a Stackdriver Dashboard displaying the metric.
  • Log every execution of the script to Stackdriver Logging. Configure BigQuery as a log sink, and create a BigQuery scheduled query to count the number of executions in a specific timeframe.
Answer: A

The short version

A — detect script re-execution with a Process Health alert. The settled key monitors the malicious process count directly.

Key concepts in this question

  • Process Health condition: Stackdriver metric tracking running process counts on Compute Engine.
  • Threshold alerting: fires when script executions exceed the desired baseline, with notifications attached.
  • CPU proxy contrast: high CPU correlates loosely and misses low-footprint re-runs.
  • Logging-only contrast: dashboards without alerting do not notify on recurrence.
  • BigQuery contrast: scheduled queries add latency and complexity versus direct alerting.

Why A is correct

A is correct because a Process Health alerting policy watches the exact rogue script process and notifies when executions breach threshold. That gives precise recurrence detection after the bug fix. CPU or log-sink paths are indirect, slower, or lack native notification in this design.

Why the others are wrong

  • B. CPU over 80 percent is noisy and may miss script reruns.
  • C. logging plus dashboard visualizes but does not alert.
  • D. BigQuery sink plus scheduled query is heavyweight and delayed.

PCSE exam tip

For hacked-process comeback, alert on process health, not CPU.

10Your team needs to obtain a unified log view of all development cloud projects in your SIEM. The development projects are under the NONPROD organization folder with the test and pre-production projects. The development projects share the ABC-BILLING billing account with the rest of the organization. Which logging export strategy should you use to meet the requirements?
  • 1. Export logs to a Cloud Pub/Sub topic with folders/NONPROD parent and includeChildren property set to True in a dedicated SIEM project. 2. Subscribe SIEM to the topic.
  • 1. Create a Cloud Storage sink with billingAccounts/ABC-BILLING parent and includeChildren property set to False in a dedicated SIEM project. 2. Process Cloud Storage objects in SIEM.
  • 1. Export logs in each dev project to a Cloud Pub/Sub topic in a dedicated SIEM project. 2. Subscribe SIEM to the topic.
  • 1. Create a Cloud Storage sink with a publicly shared Cloud Storage bucket in each project. 2. Process Cloud Storage objects in SIEM.
Answer: A

The short version

A — aggregate folder logs to PubSub with includeChildren for unified SIEM. The settled key scopes export to NONPROD hierarchy.

Key concepts in this question

  • Folder sink scope: folders/NONPROD parent captures all current and future dev projects beneath it.
  • includeChildren benefit: automatically includes child folders and projects without per-project sinks.
  • PubSub fit: streaming topic delivery suits near-real-time SIEM subscription.
  • Billing-account contrast: billing scope follows payment, not the NONPROD project hierarchy.
  • Per-project contrast: manual sinks per dev project create toil and miss new projects.

Why A is correct

A is correct because a folder-level log sink on NONPROD with includeChildren True exports every dev project log to one PubSub topic in the SIEM project. Subscribing the SIEM gives a unified streaming view that auto-scales with new projects. That matches least-effort centralized logging design.

Why the others are wrong

  • B. billing-account sink follows ABC-BILLING, over-collecting beyond NONPROD.
  • C. per-project topics multiply admin work and miss future projects.
  • D. public buckets plus batch processing weaken security and timeliness.

PCSE exam tip

Unified folder logs equals folder sink plus includeChildren plus PubSub.

Want the full bank of 321 questions for Professional Cloud Security Engineer (Google Cloud)? See all practice exams.