Security as a Non-Functional Requirement
What you'll learn: How treating security as a fundamental quality attribute—not an afterthought—shapes safer systems from the start.
The Core Idea
When building software, we often focus on functional requirements—what the system must do (send emails, process payments, store data). Non-functional requirements describe how well the system performs these tasks: speed, reliability, maintainability, and security.
Security as a non-functional requirement means it's woven into every design decision, not added later as a patch or plugin. Just like you wouldn't build a bridge and then decide to make it strong enough to hold traffic, you don't build software and then make it secure.
Why It Matters
When security is "bolted on" afterward, you get:
- Vulnerabilities baked into architecture: Trust boundaries ignored, attack surfaces left wide open
- Expensive retrofits: Redesigning core systems costs far more than building them securely initially
- Conflicts with existing design: Adding encryption or access controls later can break functionality
When security is designed in from the beginning:
- You naturally apply principles like Defense in Depth and Least Privilege during architecture
- You identify trust boundaries before writing code
- You minimize attack surface by design, not through cleanup
The Analogy
Think of a house. Security as non-functional means installing locks, alarm systems, and reinforced doors during construction—not drilling through finished walls later. The electrical system accounts for security cameras from day one; the foundation supports a safe room if needed.
Key Takeaway: Security isn't a feature you add—it's a quality attribute that must be designed into every layer of your system from the earliest planning stages, just like performance or reliability.