CAS-004 Security Engineering Practice Question
A cloud security engineer is designing an architecture where workloads in a virtual private cloud must reach an on-premises database over a site-to-site VPN. The requirement is that only the database subnet can be reached, no other on-premises networks, and traffic must be encrypted in transit. Which design BEST satisfies this?
⚠ Common exam trap
The trap here is treating any encrypted connection, such as TLS to a public endpoint, as equivalent to a scoped private VPN path.
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
✓
Configure a customer gateway and virtual private gateway with a static route limited to the database subnet CIDR
A site-to-site IPsec VPN between a customer gateway and a virtual private gateway encrypts traffic, and constraining the static route to the database subnet CIDR enforces least-privilege reachability. Transit gateway full propagation, VPC peering, and public-IP exposure either broaden access or fail to provide an encrypted private path to the on-premises database.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploy a transit gateway and attach every on-premises VPC to it with full route propagation
Why it's wrong here
A transit gateway with full route propagation would advertise all attached networks, including ranges beyond the database subnet, violating the requirement to restrict reachability. While the transit gateway can encrypt traffic, the broad route table makes other on-premises networks reachable, so this design is over-permissive for the stated goal.
- ✗
Use VPC peering between the workload VPC and the on-premises database VPC
Why it's wrong here
VPC peering connects two cloud VPCs and cannot extend to an on-premises data center over the internet. It provides no IPsec tunnel and no encryption in transit across the WAN, so it fails both the connectivity model and the encryption requirement for reaching an on-premises database.
- ✗
Create an internet gateway and allow the workload subnet to reach the database's public IP over TLS
Why it's wrong here
Exposing the database on a public IP expands the attack surface and violates the intent of a private site-to-site path. Although TLS encrypts the payload, the database endpoint becomes internet-reachable and the design no longer restricts traffic to an internal VPN, making it a poor fit for the stated requirement.
- ✓
Configure a customer gateway and virtual private gateway with a static route limited to the database subnet CIDR
Why this is correct
A site-to-site VPN with a customer gateway on-premises and a virtual private gateway in the cloud encrypts traffic via IPsec, and advertising only the database subnet CIDR in the static route confines reachable destinations to that network. This meets both the encryption requirement and the least-privilege routing constraint without exposing other on-premises ranges.
Visual reference
Quick reference
VPN Protocol Comparison
| Protocol | Port | Encryption | Authentication | Use Case |
|---|---|---|---|---|
| IKEv2 / IPsec | UDP 500 / 4500 | AES-256 | Certificates / PSK | Site-to-site & remote access |
| SSL / TLS VPN | TCP 443 | TLS 1.3 | Certificates / MFA | Clientless remote access |
| L2TP / IPsec | UDP 1701 | AES (IPsec) | PSK / Certificates | Legacy remote access |
| WireGuard | UDP 51820 | ChaCha20 | Public keys | Modern high-performance VPN |
| PPTP | TCP 1723 | MPPE (weak) | MS-CHAPv2 | Legacy — avoid in production |
PPTP is considered insecure. IKEv2/IPsec and SSL VPN are the current recommended options.
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.