CIA triad & control types
Confidentiality, integrity, availability, and preventive vs detective vs corrective controls. Every design answer should map back to these — it is the vocabulary of the field.
The mental model
Think about how a bank protects the cash in its vault. It does not have one giant lock. It has a locked door (only the right people get in), a tamper-evident seal on every cash bundle (you can tell if someone opened it), and a second branch that can open tomorrow if this one floods (the money is still available to customers). Those three concerns — who can see it, has it been changed, can I get to it when I need it — are not the same problem, and a control that solves one often does nothing for the other two.
That is the CIA triad: Confidentiality, Integrity, Availability. It exists because "make it secure" is not an engineering instruction — it is three different instructions that pull in different directions. Encrypting a database protects confidentiality but does nothing for availability; in fact it reduces availability, because now a lost key means lost data. Adding five redundant replicas improves availability but multiplies the number of places an attacker can read your data from, hurting confidentiality. Every real security decision is a trade among the three, and the triad is the vocabulary that lets you say which one you are buying and which one you are spending.
The second half of the vocabulary is control types, because knowing what you want to protect is useless without knowing how a control acts in time:
- A preventive control stops the bad thing from happening — a firewall rule, a parameterized query, an access check.
- A detective control tells you the bad thing happened — a SIEM alert, an audit log, a file-integrity monitor.
- A corrective control fixes it afterward — a backup restore, session revocation, an auto-scaling group replacing a dead node.
Without this framing, teams over-invest in prevention and discover, mid-breach, that they have no idea an attacker has been inside for ninety days. The entire discipline of blue-teaming exists because prevention always eventually fails, and the only thing that saves you is a detective control firing before the damage is done.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision