CloudGuild · Blog · Cheat sheets · Lessons · Certifications
Deploying Securely: Google Cloud's Credential Management
Learn how to securely connect your web application to a Cloud SQL database using Google Cloud features, focusing on credential management.
When deploying a web application on Google Cloud, securely connecting to a Cloud SQL database can trip candidates up. The options may seem similar, but the right choice is crucial for protecting your credentials.
The question
You are tasked with deploying a web application on Google Cloud that requires access to a Cloud SQL database. To ensure that your application can securely connect to the database without exposing any credentials in your code, which Google Cloud feature should you use?
- A. Cloud SQL Proxy
- B. Secret Manager
- C. Cloud Identity-Aware Proxy
- D. Service Accounts
Think before you scroll
Consider the main need: securely managing sensitive information, specifically database credentials. Each option has its purpose, but not all directly address the security of your credentials.
The answer
The correct option is B. Secret Manager. This feature allows you to securely store and access sensitive data, such as database credentials, without hardcoding them in your application. It ensures that your application can connect to Cloud SQL without exposing sensitive information.
Why the other options lose
A. Cloud SQL Proxy: This option provides a way to connect to your Cloud SQL instance, especially for local development. However, it does not manage or secure credentials. It simply allows connections without addressing credential exposure.
C. Cloud Identity-Aware Proxy: This option secures access to applications by verifying user identity and context. While it enhances security, it is not designed for managing database credentials and does not solve the problem presented in the question.
D. Service Accounts: Service accounts are great for granting permissions to applications and services. They do not, however, directly address the need for securely storing and managing sensitive credentials like database passwords.
The concept behind it
Understanding how to manage sensitive information is crucial in cloud environments. Secret Manager is specifically designed for this purpose, allowing developers to store, manage, and access secrets securely. This principle applies to any scenario where sensitive data needs protection, not just database credentials.
Exam trap to remember
Always choose the solution that directly addresses credential management when dealing with sensitive data in the cloud. Secret Manager is your go-to for secure storage and access of credentials.