CAS-004 Security Architecture Practice Question
Which of the following best describes the security benefit of using an API gateway in a microservices architecture?
⚠ Common exam trap
The trap here is conflating availability features (load balancing) with security features, or assuming the gateway replaces rather than centralizes security controls — candidates often pick the 'eliminates validation' answer because it sounds efficient.
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
✓
It enforces security policies such as authentication and rate limiting centrally
An API gateway sits in front of microservices and acts as a single entry point for all client requests, making it the ideal enforcement point for cross-cutting security controls. Centralizing authentication (e.g., OAuth2/JWT validation), authorization, rate limiting, and threat protection at the gateway means individual microservices don't each need to reimplement these policies. This reduces attack surface and ensures consistent policy enforcement across the entire API estate.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It eliminates the need for input validation in individual microservices
Why it's wrong here
Input validation must remain in each microservice, since the gateway cannot know every service's schema; removing it exposes services to injection if the gateway is bypassed. It is tempting because centralised filtering reduces duplication, and it would be right where a single shared schema is enforced at one entry point.
- ✗
It encrypts all data between the client and server using mTLS
Why it's wrong here
mTLS encryption is a transport control configured on the gateway or services, not the security benefit of centralising policy enforcement and hiding internal microservices. It is tempting because gateways often terminate TLS, and mTLS would be correct if the question asked how service-to-service traffic is authenticated.
- ✓
It enforces security policies such as authentication and rate limiting centrally
Why this is correct
An API gateway sits in front of microservices and applies authentication, authorisation, throttling and rate limiting at that single ingress point. This centralises enforcement, so individual services need not each implement these controls, satisfying the requirement for consistent, centrally managed security policy.
- ✗
It automatically load balances traffic to ensure high availability
Why it's wrong here
Load balancing addresses availability, not the gateway's security role of centralising authentication, authorisation, and threat inspection at the entry point. It is tempting because gateways do distribute traffic, and load balancing would be the answer if the question asked about resilience rather than security benefit.
Go deeper
Related to this question
About these practice questions
This CAS-005 question is part of Courseiva's 973-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official CompTIA exam blueprint
This CAS-005 practice question is part of Courseiva's free CompTIA 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 CAS-005 exam.