ISC2 Certified Secure Software Lifecycle Professional (CSSLP) Practice Question
A development team wants to ensure its Kubernetes-hosted Java microservice automatically blocks network traffic originating from any CIDR range that is not on an approved list, without adding new logic to each controller class. Which action best demonstrates a declarative security approach to meet this requirement?
Write a servlet filter that programmatically inspects the Origin header and rejects untrusted sources.
Wrap every endpoint in a try/catch block that throws an exception when the client IP is not trusted.
Create a NetworkPolicy YAML manifest that only allows pod ingress from the whitelisted CIDR blocks.
Invoke a GeoIP service from business logic to decide at runtime whether to accept the request.
Declarative security expresses policy outside of the application logic so the runtime platform enforces the rule consistently. Defining a Kubernetes NetworkPolicy in a YAML manifest is declarative: the cluster enforces the ingress rule for all pods without the developers writing additional code. The other choices embed decision-making inside the application (try/catch checks, servlet filter, or GeoIP call), which are imperative (programmatic) security techniques that rely on custom code at each request.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a declarative security approach in Kubernetes?
Open an interactive chat with Bash
What is a Kubernetes NetworkPolicy?
Open an interactive chat with Bash
What makes imperative security different from declarative security?
Open an interactive chat with Bash
ISC2 Certified Secure Software Lifecycle Professional (CSSLP)
Secure Software Implementation
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .