Google Professional Cloud Developer Question 81
Select 3Google Cloud PlatformYou are developing a web application on Google Cloud that requires authentication for users to access sensitive data. Which of the following design considerations should you implement to ensure the application is secure?
- A
Use Google Cloud Identity-Aware Proxy (IAP) to enforce authentication and authorization.
- B
Store sensitive user credentials in environment variables.
- C
Implement OAuth 2.0 with scoped access for user permissions.
- D
Use HTTPS for all communication between the client and server.
- E
Hardcode API keys directly into the application code for convenience.
Show answer and explanation
Correct answers: A, C, D
Explanation
When designing secure applications, it's critical to use secure authentication and authorization mechanisms, such as Google Cloud IAP and OAuth 2.0, and to ensure all communication is encrypted with HTTPS. Avoid insecure practices like storing sensitive credentials in environment variables without proper protection or hardcoding API keys directly into application code.
- A. Correct.
Correct: Google Cloud IAP helps enforce authentication and authorization by integrating with Google's identity services, ensuring only authorized users access your application.
- B. Incorrect.
Incorrect: Storing sensitive user credentials in environment variables poses a security risk if the environment variables are not properly secured or are exposed in logs.
- C. Correct.
Correct: OAuth 2.0 enables secure authentication and authorization with scoped access, allowing fine-grained control over user permissions.
- D. Correct.
Correct: HTTPS ensures secure, encrypted communication between the client and server, protecting sensitive data from being intercepted during transmission.
- E. Incorrect.
Incorrect: Hardcoding API keys directly into application code is a bad practice, as it can lead to security vulnerabilities if the code is exposed or shared.