Courseiva
easyMultiple SelectObjective-mapped

200-901 Practice Question: A developer is building a RESTful API with Python…

A developer is building a RESTful API with Python Flask. Which TWO are recommended security best practices for exposing the API over HTTPS?

⚠ Common exam trap

Cisco often tests the misconception that HTTPS alone makes an API secure, but the trap here is that encryption only protects data in transit, not the application logic—so candidates must remember that input validation and rate limiting are still required server-side defenses.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Validate and sanitize all user input.

Validating and sanitizing all user input is a fundamental security practice that prevents injection attacks (e.g., SQL injection, cross-site scripting) against the Flask API. Even over HTTPS, encrypted transport does not protect against malicious payloads; input validation must be applied server-side, often using libraries like marshmallow or Flask-WTF to enforce data types and strip dangerous characters.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Use HTTP Basic Authentication for simplicity.

    Why it's wrong here

    Basic Auth sends credentials in base64; more secure alternatives like OAuth should be used.

  • Validate and sanitize all user input.

    Why this is correct

    This prevents injection attacks like SQLi and XSS.

  • Enable CORS for all origins.

    Why it's wrong here

    This allows any website to access the API, leading to CSRF attacks.

  • Store passwords in plaintext in the database.

    Why it's wrong here

    Passwords must be hashed and salted.

  • Implement rate limiting to prevent abuse.

    Why this is correct

    Rate limiting mitigates denial-of-service and brute force attacks.

About these practice questions

One of 989 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.