You want to secure an API that returns user profiles. Which combination of methods best ensures security and privacy?
hard📝 Application Q15 of 15
Rest API - Authentication and Authorization
You want to secure an API that returns user profiles. Which combination of methods best ensures security and privacy?
AAllow all requests but log IP addresses for later review.
BUse HTTPS, require API tokens, and validate user permissions before sending data.
CSend user data over HTTP with a simple password in the URL.
DUse HTTP and require no authentication for faster access.
Step-by-Step Solution
Solution:
Step 1: Identify secure transport and authentication
HTTPS encrypts data in transit, API tokens verify caller identity, and permission checks protect privacy.
Step 2: Compare options for best security practice
Use HTTPS, require API tokens, and validate user permissions before sending data. combines encryption, authentication, and authorization, which is the best approach. Others are insecure or incomplete.
Final Answer:
Use HTTPS, require API tokens, and validate user permissions before sending data. -> Option B
Quick Check:
HTTPS + tokens + permissions = secure API [OK]
Quick Trick:Combine HTTPS, tokens, and permission checks [OK]
Common Mistakes:
Ignoring encryption with HTTP
Skipping authentication
Not checking user permissions
Master "Authentication and Authorization" in Rest API
9 interactive learning modes - each teaches the same concept differently