CLOUD-DATABASE-ENGINEER practice question 12 of 25

You are a DBA of Cloud SQL for PostgreSQL. You want the applications to have password-less authentication for read and write access to the database. Which authentication mechanism should you use?

Full set: 141 questions
Answer options
A: Use Identity and Access Management (IAM) authentication. Correct answer
B: Use Managed Active Directory authentication.
C: Use Cloud SQL federated queries.
D: Use PostgreSQL database's built-in authentication.
Correct Answer:
A. Use Identity and Access Management (IAM) authentication.
Explanation

IAM database authentication is the designated Google Cloud feature for providing password-less access to Cloud SQL instances, including PostgreSQL. It allows applications, through service accounts, and users to authenticate using their IAM identity and permissions. Instead of a static password, the application uses a short-lived OAuth 2.0 access token obtained via the Cloud SQL Auth Proxy or a database connector. This method centralizes access control within IAM, enhances security by eliminating the need to manage database passwords, and directly fulfills the requirement for password-less authentication.

Why Incorrect

B. Use Managed Active Directory authentication: This authentication method is primarily designed for and supported by Cloud SQL for SQL Server, not PostgreSQL.
C. Use Cloud SQL federated queries: This is a feature of BigQuery that allows it to query data residing in Cloud SQL. It is not an authentication mechanism for applications connecting directly to the database.
D. Use PostgreSQL database's built-in authentication: While PostgreSQL has various authentication methods, the most common ones for applications (e.g., scram-sha-256) require passwords. IAM authentication is the recommended Google Cloud-native approach for password-less access.

References

1. Google Cloud Documentation: Cloud SQL for PostgreSQL > IAM database authentication.

"Cloud SQL IAM database authentication provides you with the following benefits: ... You don't need to manage database passwords. You can use IAM to centrally manage access to your database instances." This directly supports the use of IAM for password-less access.

"With IAM database authentication, access to your database is granted using an IAM user or service account and the Cloud SQL Admin API, rather than a password." This confirms the mechanism is password-less.

2. Google Cloud Documentation: Cloud SQL > Connect overview > IAM database authentication.

"Cloud SQL integrates with Identity and Access Management (IAM) to help you better manage access for users and service accounts to your databases. This feature is called IAM database authentication." This establishes IAM authentication as the integrated solution.

3. Google Cloud Documentation: Cloud SQL for SQL Server > Using Managed Service for Microsoft Active Directory with Cloud SQL.

This page details the integration of Managed AD, but it is explicitly in the context of Cloud SQL for SQL Server, confirming that it is not the standard solution for PostgreSQL.

Scroll to Top