Google Professional Cloud Developer Question 359
Select 3Google Cloud PlatformYou are a developer tasked with exposing an API for a retail application using Apigee. The API must be secured to ensure that only authenticated applications can access it. You also need to protect the API against threats such as SQL injection and ensure rate limiting to prevent abuse. Which steps should you take to meet these requirements?
- A
Enable OAuth 2.0 authentication for the API in Apigee.
- B
Add a ValidateRequest policy to check for SQL injection vulnerabilities.
- C
Use a Quota policy to enforce rate limiting on the API.
- D
Configure a CORS policy to restrict access to specific domains.
- E
Set up a KeyStore in Apigee to manage SSL certificates for your API.
Show answer and explanation
Correct answers: A, B, C
Explanation
To secure an API in Apigee, you need to use various policies that address authentication, threat prevention, and rate limiting. Enabling OAuth 2.0 ensures that only authenticated clients can access the API. A ValidateRequest policy helps safeguard against common threats like SQL injection. Lastly, a Quota policy enforces rate limiting to prevent abuse by controlling the number of requests a client can make. While CORS and SSL certificates are important for other aspects of API security, they do not directly address the requirements specified in this scenario.
- A. Correct.
Correct. Enabling OAuth 2.0 ensures that only authenticated clients can access your API, which is a critical step in securing it.
- B. Correct.
Correct. Adding a ValidateRequest policy in Apigee helps detect and prevent threats like SQL injection, enhancing the security of the API.
- C. Correct.
Correct. Using a Quota policy allows you to enforce rate limiting, which prevents abuse by limiting the number of requests a client can make within a given time frame.
- D. Incorrect.
Incorrect. While CORS policies are important for controlling browser-based access, they are not directly related to securing APIs against authentication, injection attacks, or rate limiting.
- E. Incorrect.
Incorrect. Setting up a KeyStore for SSL certificates is important for encryption and secure communication, but it does not directly address authentication, SQL injection, or rate limiting.