Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Database Engineer practice bank has an additional 769 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A development team is deploying a Python application on an external Platform as a Service (PaaS) provider that assigns dynamic, ephemeral outbound IP addresses. The application must connect to a Cloud SQL for PostgreSQL instance over its public IP address while meeting the following security requirements:
Which approach should you implement?
Enabling Private Services Access (PSA) and removing the public IP address prevents direct public internet exposure, but an external PaaS cannot route directly to a private IP address, and a direct connection fails the automatic token-refresh and certificate-management requirements.
Private Services Access establishes a VPC Network Peering connection between your Google Cloud VPC and the Google-managed service producer VPC hosting Cloud SQL. This assigns an internal RFC 1918 IP address to the database instance so resources within the peered VPC can communicate without traversing the public internet.
--export-subnet-routes-with-public-ip) and authorized network entries.The Python application ran inside a Google Cloud VPC (such as on Compute Engine or GKE with VPC-native routing) where low-latency direct private IP connectivity was prioritized and Cloud SQL Auth Proxy or Language Connectors were not required for automatic token rotation.
Even when using Private Services Access without a public IP, organizations with strict IAM database authentication and zero-trust requirements often pair private IP connectivity with a Cloud SQL connector to automate TLS 1.3 encryption and OAuth 2.0 token management.
Using the Cloud SQL Python Connector paired with IAM database authentication and connector enforcement provides end-to-end encrypted, identity-verified, and centrally authorized connectivity without relying on static IP allowlists.
The Cloud SQL Python Connector is an official Cloud SQL Language Connector library that establishes secure TLS 1.3 connections directly from Python applications to Cloud SQL instances. Rather than running a separate local proxy process, the library handles connection establishment, identity verification, and credential refresh inside the application runtime. Connector enforcement (--connector-enforcement REQUIRED) is an instance-level policy that blocks direct connections and mandates that every client connects through either a Cloud SQL Language Connector or the Cloud SQL Auth Proxy.
roles/cloudsql.client) instead of source IP checks, dynamic and ephemeral PaaS IP addresses do not need to be added to authorized networks.cloudsql.iam_authentication), the connector automatically fetches and refreshes short-lived OAuth 2.0 access tokens for the application's service account, replacing static database passwords.--connector-enforcement REQUIRED via gcloud sql instances patch ensures that unproxied direct connections cannot bypass these encryption and IAM authorization controls.For Python, Java, Go, and Node.js applications connecting over a public IP address, Cloud SQL Language Connectors are recommended over direct connections or standalone proxies. Unlike direct connections, they remove manual certificate rotation, static IP allowlisting, and custom token-refresh logic while enforcing strict TLS 1.3 security across every session.
Configuring Private Service Connect (PSC) without Private Services Access (PSA) and attempting to pair it with authorized networks violates Cloud SQL networking constraints and does not solve connectivity from an external PaaS over the public internet.
Private Service Connect creates private service endpoints within specific consumer Virtual Private Cloud (VPC) networks, allowing applications in multiple VPCs, projects, or organizations to reach a Cloud SQL instance over internal IP addresses without VPC Network Peering.
Applications hosted across multiple Google Cloud VPCs in different projects or organizations needed private, non-peered internal connectivity to the Cloud SQL instance.
Network isolation features like PSC and PSA control the network path to the database, whereas Cloud SQL connectors control client authorization, TLS 1.3 encryption, and IAM database authentication token lifecycle.
A direct connection with self-managed SSL/TLS certificates and authorized networks can encrypt traffic in transit, but it creates significant operational overhead and fails to address dynamic IP addresses, automatic credential rotation, and connector-level enforcement.
A direct connection allows a standard PostgreSQL client driver to connect directly to the Cloud SQL instance's IP address without using a Cloud SQL connector. Setting --ssl-mode to ENCRYPTED_ONLY configures the database server to reject unencrypted connections and require SSL/TLS encryption using server and client certificates.
ENCRYPTED_ONLY enforces transport encryption, not IAM-authorized proxy or connector usage.The application ran inside a Google Cloud VPC connecting over a private IP address from a known internal subnet, where direct connections are recommended for lower latency and RFC 1918 addresses are automatically authorized.
Even when using Cloud SQL connectors, traffic is automatically encrypted with TLS 1.3 regardless of the instance's --ssl-mode setting, giving you strong encryption without self-managed certificates.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated