Google Professional Cloud Developer Question 82
Select 3Google Cloud PlatformYou are designing a cloud-based application that processes sensitive user data and integrates with external APIs. Which of the following practices should you implement to ensure the application is secure?
- A
Encrypt sensitive data both in transit and at rest.
- B
Use hardcoded API keys in the application code to simplify access to external APIs.
- C
Implement Identity and Access Management (IAM) roles with the principle of least privilege.
- D
Store sensitive configuration data in Google Cloud Secret Manager.
- E
Disable logging to reduce the risk of sensitive data exposure in logs.
Show answer and explanation
Correct answers: A, C, D
Explanation
To design secure applications, it is essential to implement encryption, use the principle of least privilege, and securely manage sensitive configuration data. These practices reduce the risk of data breaches, unauthorized access, and accidental credential exposure. Hardcoding API keys and disabling logging are insecure practices and should be avoided.
- A. Correct.
Encrypting data in transit (e.g., using HTTPS) and at rest ensures that sensitive information is protected from unauthorized access.
- B. Incorrect.
Hardcoding API keys in application code is a security anti-pattern, as it increases the risk of credential exposure.
- C. Correct.
Using IAM roles with the principle of least privilege ensures that services and users only have the permissions they need, reducing the attack surface.
- D. Correct.
Google Cloud Secret Manager is designed to securely store sensitive configuration data, such as API keys or database passwords, minimizing the risk of accidental exposure.
- E. Incorrect.
Disabling logging is not recommended because logs are critical for troubleshooting and monitoring. Instead, sensitive information should be excluded from logs or redacted.