Google Professional Cloud Database Engineer Question 99
Select 3Google Cloud PlatformYou are designing a PostgreSQL database hosted on Cloud SQL for a multi-tenant application. Each tenant requires strict isolation of their data. The application also needs to connect to the database securely via Compute Engine instances. Which steps should you take to ensure secure connectivity and proper access management for this setup?
- A
Enable private IP for the Cloud SQL instance and configure VPC peering between the database and Compute Engine network.
- B
Use IAM database authentication to manage user access and connect to the database.
- C
Set up SSL/TLS certificates for all database connections and enforce their usage.
- D
Configure a public IP for the Cloud SQL instance and use a firewall to restrict access to specific IP ranges.
- E
Create a separate database and user for each tenant, and restrict access to each tenant's data using GRANT/REVOKE SQL commands.
Show answer and explanation
Correct answers: A, C, E
Explanation
To ensure secure connectivity and proper access management, using private IP with VPC peering protects communication from being exposed to the public internet. SSL/TLS encryption safeguards data in transit. For tenant isolation, creating separate databases and users and applying fine-grained access controls ensures that each tenant's data is strictly isolated. Public IPs and IAM database authentication are not suitable for this scenario as they either increase security risks or lack the granularity needed for tenant isolation.
- A. Correct.
Enabling private IP and configuring VPC peering ensures secure, internal communication between the Compute Engine instances and the Cloud SQL database, avoiding exposure to the public internet.
- B. Incorrect.
IAM database authentication is not suitable for applications requiring tenant isolation since it does not provide fine-grained control over individual tenant data or database objects.
- C. Correct.
Using SSL/TLS certificates ensures all connections to the database are encrypted, protecting data in transit.
- D. Incorrect.
Configuring a public IP exposes the database to the public internet, increasing the attack surface, even if a firewall is used. This is not recommended for production setups requiring strict data isolation.
- E. Correct.
Creating separate databases and users for each tenant, combined with GRANT/REVOKE commands, provides tenant-level data isolation, which is essential for a multi-tenant application.