Google Professional Cloud Developer Question 79
Select 3Google Cloud PlatformYou are designing a cloud-based application on Google Cloud that processes sensitive user data. To ensure the application is secure, which of the following practices should you implement?
- A
Use IAM roles with the principle of least privilege to control access to resources.
- B
Store sensitive data in plaintext to simplify data processing.
- C
Enable encryption for data at rest and in transit.
- D
Use service accounts with hardcoded keys for authentication in the application code.
- E
Regularly scan the application for vulnerabilities and apply patches.
Show answer and explanation
Correct answers: A, C, E
Explanation
Designing secure applications involves following best practices such as implementing the principle of least privilege for access control, encrypting sensitive data, and proactively scanning for and addressing vulnerabilities. Avoid insecure practices like storing sensitive data in plaintext or hardcoding keys, as they increase the risk of data breaches.
- A. Correct.
Correct: Using IAM roles with the principle of least privilege ensures that users and services have only the permissions they need, reducing the risk of unauthorized access.
- B. Incorrect.
Incorrect: Storing sensitive data in plaintext is insecure and exposes the data to potential breaches. Sensitive data should always be encrypted.
- C. Correct.
Correct: Encrypting data at rest and in transit protects sensitive information from being intercepted or accessed by unauthorized individuals.
- D. Incorrect.
Incorrect: Hardcoding keys in application code is insecure and can lead to key exposure if the codebase is compromised. Use secure mechanisms like Secrets Manager instead.
- E. Correct.
Correct: Regularly scanning for vulnerabilities and applying patches helps mitigate security risks by addressing known vulnerabilities in your application and dependencies.