We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Security Architecture
Free preview: the first 2 parts of this 5-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Security Architecture
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
A startup built their platform in 18 months without a security review. Speed mattered. They stored passwords in MD5, sent API responses containing full user objects including hashed passwords, and used a single superuser database connection for all queries.
When they hired their first security engineer at 50,000 users, remediation took 6 months. Migrating password hashes required a gradual re-hash on login (detect MD5, re-hash as bcrypt, overwrite). Stripping sensitive fields from APIs meant auditing 200+ endpoints and building a serialization layer. Creating scoped database users meant understanding every query across 30 services. The total cost was roughly 10x what it would have been to design correctly from day one.
IBM's Systems Sciences Institute measured this ratio: a defect found during design costs $1 to fix. The same defect found in testing costs $15. In production, it costs $100. A security vulnerability found after a breach can cost millions.
Security by design means considering security at every stage of development. Not as a final checklist before launch, but as a design constraint as fundamental as performance or usability.
Security by design maps security activities to each phase of software development. The earlier you catch an issue, the cheaper the fix.
| Phase | Security Activity | Tools | Cost of Finding a Bug Here |
|---|---|---|---|
| Requirements | Security requirements, compliance mapping | OWASP ASVS, regulatory checklists | Lowest |
| Design | Threat modeling, architecture review | Microsoft Threat Modeling Tool, draw.io | Low |
| Development | Secure coding, SAST, dependency scanning | SonarQube, Semgrep, Snyk, Dependabot | Medium |
| Testing | DAST, penetration testing, fuzzing | Burp Suite, OWASP ZAP, AFL | Medium-High |
| Deployment | Container scanning, config validation, IaC scanning | Trivy, Checkov, tfsec | High |
The shift-left philosophy is simple: move security activities earlier. A missing CSRF token caught in code review is a 5-minute fix. The same missing CSRF token found during a penetration test requires scheduling a fix, re-testing, and re-deploying. Found after a breach, it triggers incident response, disclosure, and potentially regulatory fines.
GitHub's Dependabot, Snyk, and Renovate automate the most tedious part of shift-left: dependency vulnerability scanning. They open pull requests when a dependency has a known CVE. This is not optional. The Log4Shell vulnerability (CVE-2021-44228) affected nearly every Java application on the planet. Organizations with automated dependency scanning detected and patched it in hours. Organizations without it took weeks.
| Runtime monitoring, SIEM, incident response |
| Datadog, Splunk, PagerDuty |
| Highest |