How to securely connect dynamic IP apps to Cloud SQL?
You need to connect multiple applications with dynamic public IP addresses to a Cloud SQL instance. You configured users with strong passwords and enforced the SSL connection to your Cloud SQL instance. You want to use Cloud SQL public IP and ensure that you have secured connections. What should you do?
Community Votes
100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests the ability to select the correct secure access method for dynamic clients, where the trap is attempting to manage IP whitelists instead of using the Auth proxy.
To securely connect applications with dynamic public IPs to Cloud SQL, use the Cloud SQL Auth proxy instead of Authorized Networks. The community confirms that the proxy handles authentication and encryption via IAM, eliminating the need for IP whitelisting.
A common mistake is choosing Option B (manually updating networks) or Option D (opening 0.0.0.0/0), failing to realize that the Auth proxy provides the necessary security without IP management.
Community Discussion (7 comments)
- Using the Cloud SQL Auth proxy is a recommended method for secure connections, especially when dealing with dynamic IP addresses. - The Auth proxy provides secure access to your Cloud SQL instance without the need for Authorized Networks or managing IP addresses. - It works by encapsulating database traffic and forwarding it through a secure tunnel, using Google's IAM for authentication. - Leaving the Authorized Networks empty means you're not allowing any direct connections based on IP addresses, relying entirely on the Auth proxy for secure connectivity. This is a secure and flexible solution, especially for applications with dynamic IPs.
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
Option C is the correct solution because the Cloud SQL Auth proxy is designed to handle secure access for clients with dynamic or unknown IP addresses. It authenticates connections using Google IAM and encrypts traffic through a secure tunnel, making the use of Authorized Networks (IP whitelisting) unnecessary.Why the Other Options Are Wrong
Option A is incorrect because adding 0.0.0.0/0 exposes the database to the entire internet, creating a significant security risk. Option B is operationally inefficient, as manually updating Authorized Networks for dynamic IPs is unsustainable and error-prone. Option D is incorrect because while it uses the proxy, adding 0.0.0.0/0 to Authorized Networks is redundant and violates the principle of least privilege.Community Comment Notes
Community comments strongly support Option C, emphasizing that the Auth proxy is the recommended method for secure connections. Users noted that the proxy encapsulates database traffic and uses IAM for authentication, effectively removing the need to manage IP addresses or configure SSL manually.Official Reference
Exam Strategy
When encountering questions about dynamic IP addresses and Cloud SQL security, always prioritize the Cloud SQL Auth proxy over IP whitelisting. Avoid options that suggest opening 0.0.0.0/0 or manual IP maintenance, as the proxy is the Google-recommended best practice.