Question 404 of 509
Design for security and compliancehardMultiple ChoiceObjective-mapped

Quick Answer

The answer is to deploy Cloud SQL Auth Proxy as a sidecar container in each pod and configure IAM database authentication. This is correct because the sidecar proxy, combined with Workload Identity, eliminates static database credentials by binding the pod’s Kubernetes service account to an IAM service account, so authentication is handled through IAM roles rather than stored secrets. Even if a container is compromised, the attacker cannot reuse exfiltrated credentials because they are ephemeral and tied to the pod’s identity, and the proxy also enforces SSL/TLS encryption automatically. On the Google Professional Cloud Architect exam, this scenario tests your understanding of defense-in-depth for database access, often appearing as a trap where candidates mistakenly focus on network controls like private IP or authorized networks, which don’t prevent credential reuse after a breach. A key memory tip: think of the sidecar as a “bouncer” that checks IAM badges at the door, not just a locked gate—so stolen keys are useless.

Google PCA Design for security and compliance Practice Question

This PCA practice question tests your understanding of design for security and compliance. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

Your company runs a multi-region web application on Google Kubernetes Engine (GKE) with pods that process sensitive user data. The application uses Cloud SQL for PostgreSQL as the backend database. Your security team has implemented the following controls: 1) All traffic to the database is encrypted using SSL/TLS. 2) The GKE cluster uses Workload Identity to bind Kubernetes service accounts to IAM service accounts. 3) The Cloud SQL instance is configured with a public IP address and authorized networks to allow only the GKE cluster's node IP ranges. 4) The database credentials are stored in Secret Manager and mounted as volumes in the pods. Recently, a security audit revealed that a pod was compromised due to a container vulnerability. The attacker was able to exfiltrate sensitive data directly from the Cloud SQL database using the credentials from Secret Manager. The security team wants to prevent such exfiltration in the future while minimizing changes to the application code. Which course of action should you recommend?

Question 1hardmultiple choice
Full question →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Deploy Cloud SQL Auth Proxy as a sidecar container in each pod, and configure IAM database authentication to replace static credentials.

Option A is correct because deploying Cloud SQL Auth Proxy as a sidecar container enforces IAM-based authentication, eliminating static credentials that can be exfiltrated. The proxy also handles SSL/TLS encryption automatically and allows fine-grained access control via IAM permissions, so even if a pod is compromised, the attacker cannot reuse stolen credentials because they are tied to the pod's identity via Workload Identity. This approach requires minimal code changes since the application connects to localhost instead of the Cloud SQL public IP.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Deploy Cloud SQL Auth Proxy as a sidecar container in each pod, and configure IAM database authentication to replace static credentials.

    Why this is correct

    Cloud SQL Auth Proxy with IAM authentication removes static credentials and uses IAM roles to control access, preventing credential exfiltration.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Migrate the database to Cloud Spanner, which has built-in IAM integration and automatic encryption.

    Why it's wrong here

    Migrating to a different database is a major change and not necessary to solve the credential exfiltration problem.

  • Rotate the database password and store the new password in Secret Manager, then update the application to fetch the password from Secret Manager at startup.

    Why it's wrong here

    While rotating passwords improves security, the credentials are still static and could be exfiltrated again.

  • Change the Cloud SQL instance to use a private IP address and disable public access, ensuring only the GKE cluster can reach it via VPC peering.

    Why it's wrong here

    This reduces network exposure but does not prevent a compromised pod from using stored credentials to access the database.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the misconception that network-level controls (like private IPs) are sufficient to prevent data exfiltration from a compromised pod, but the real vulnerability is the use of static credentials that can be stolen and reused regardless of network isolation.

Detailed technical explanation

How to think about this question

Cloud SQL Auth Proxy uses IAM database authentication by mapping the pod's Workload Identity (via the Kubernetes service account) to a Cloud SQL IAM user, such as a service account. The proxy listens on localhost and validates connections using short-lived OAuth 2.0 tokens, which are automatically refreshed and cannot be reused after expiration. This eliminates the need for long-lived passwords in Secret Manager and ensures that even if a container is compromised, the attacker cannot extract reusable credentials because the token is ephemeral and bound to the pod's identity.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A company's IT admin needs to give a contractor read-only access to production logs without sharing account credentials. Using role-based access control (RBAC) and temporary scoped permissions — not a permanent shared password — is the correct pattern. Questions like this test whether you can apply least-privilege access across cloud identity services.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related PCA practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free PCA practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this PCA question test?

Design for security and compliance — This question tests Design for security and compliance — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Deploy Cloud SQL Auth Proxy as a sidecar container in each pod, and configure IAM database authentication to replace static credentials. — Option A is correct because deploying Cloud SQL Auth Proxy as a sidecar container enforces IAM-based authentication, eliminating static credentials that can be exfiltrated. The proxy also handles SSL/TLS encryption automatically and allows fine-grained access control via IAM permissions, so even if a pod is compromised, the attacker cannot reuse stolen credentials because they are tied to the pod's identity via Workload Identity. This approach requires minimal code changes since the application connects to localhost instead of the Cloud SQL public IP.

What should I do if I get this PCA question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This PCA practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCA exam.