350-401 Question 262
Select 3A network engineer is implementing a REST API solution for a Cisco network device. To ensure secure communication and protect sensitive data, which of the following security measures should be implemented?
- A
Use HTTPS instead of HTTP for communication
- B
Implement token-based authentication such as OAuth2
- C
Enable basic authentication over plain-text HTTP for simplicity
- D
Validate and sanitize all input data sent to the API
- E
Avoid using encryption to reduce processing overhead
Show answer and explanation
Correct answers: A, B, D
Explanation
REST API security is crucial to ensuring that sensitive data and communications are protected. Key measures include using HTTPS for encrypted communication, implementing secure authentication mechanisms like OAuth2, and validating input data to prevent attacks. Insecure practices such as basic authentication over plain HTTP or avoiding encryption can expose APIs to significant vulnerabilities.
- A. Correct.
Using HTTPS ensures that the communication between the client and the API is encrypted, protecting sensitive data from eavesdropping or interception.
- B. Correct.
Token-based authentication methods, such as OAuth2, offer a secure and scalable way to authenticate API clients and reduce the risk of unauthorized access.
- C. Incorrect.
Basic authentication over plain-text HTTP is insecure as credentials are transmitted in plain text, making them vulnerable to interception.
- D. Correct.
Validating and sanitizing input data mitigates risks like injection attacks, ensuring that only safe and expected data is processed by the API.
- E. Incorrect.
Avoiding encryption compromises data security, exposing sensitive information to potential interception or tampering.