GSEC Defense in Depth Practice Question
A software development company wants to protect its source code repositories from insider threats and external attackers. The company already uses network segmentation and endpoint detection. The security team proposes adding a control that requires two distinct factors before developers can access repositories, even from within the corporate network. Which control best meets this requirement?
⚠ Common exam trap
It's easy for candidates to confuse access control mechanisms like RBAC or bastion hosts with authentication factors; only MFA enforces two distinct factors.
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
✓
Implementing multi-factor authentication (MFA) for repository access
The requirement is to require two distinct authentication factors before granting repository access, even from inside the corporate network. Multi-factor authentication is the only option that provides this by combining something the user knows with something they have or are. Bastion hosts, RBAC, and IP allowlisting are valuable defense-in-depth controls but do not enforce two-factor authentication on their own.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Deploying a bastion host that developers must use to reach repositories
Why it's wrong here
A bastion host centralizes and controls access to internal systems, but it does not inherently require two distinct authentication factors. It can be combined with MFA, but by itself it only provides a single authentication step. The scenario specifically requires two distinct factors, so a bastion host alone is insufficient.
- ✗
Enforcing role-based access control (RBAC) on repositories
Why it's wrong here
RBAC limits what authenticated users can do based on their roles, but it does not add a second authentication factor. It is an authorization control, not an authentication control. The requirement is to require two distinct factors before access, which RBAC does not provide.
- ✓
Implementing multi-factor authentication (MFA) for repository access
Why this is correct
MFA requires two or more distinct authentication factors, such as a password plus a hardware token, before granting access. This directly meets the requirement of requiring two distinct factors even from inside the network. It adds an identity-layer control that strengthens defense in depth against credential theft and insider misuse.
- ✗
Configuring IP allowlisting for repository access
Why it's wrong here
IP allowlisting restricts access to specific network addresses, which can prevent external access, but it does not require two distinct authentication factors. An attacker on an allowed IP could still access repositories with a single stolen credential. The scenario demands multi-factor authentication regardless of network location.
Quick reference
Access Control Model Comparison
| Model | Acronym | Who Controls Access? | Best For |
|---|---|---|---|
| Discretionary Access Control | DAC | Resource owner | Small teams, file shares |
| Mandatory Access Control | MAC | System / security labels | Classified govt / military |
| Role-Based Access Control | RBAC | Administrator (via roles) | Enterprise environments |
| Attribute-Based Access Control | ABAC | Policy engine (user + resource attributes) | Fine-grained, dynamic policies |
| Rule-Based Access Control | RuBAC | System rules / ACLs | Firewall rules, network ACLs |
About these practice questions
This GSEC question is part of Courseiva's 351-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 GIAC exam blueprint
This GSEC practice question is part of Courseiva's free GIAC 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 GSEC exam.