Lab 18: Database Security Architecture
Step 1: Defense-in-Depth Framework
┌─────────────────────────────────────────────────────────────────┐
│ DEFENSE-IN-DEPTH LAYERS │
├─────────────────────────────────────────────────────────────────┤
│ LAYER 1: Network │ VPC, private subnet, security groups │
│ LAYER 2: Transport │ TLS 1.2+ for all connections │
│ LAYER 3: Authentication│ Strong passwords, certificates, MFA │
│ LAYER 4: Authorization │ RBAC, least privilege, Row-Level Sec. │
│ LAYER 5: Data │ TDE at rest, column encryption │
│ LAYER 6: Application │ Parameterized queries, input validation│
│ LAYER 7: Monitoring │ Audit logs, anomaly detection, alerts │
└─────────────────────────────────────────────────────────────────┘
Attacker must breach ALL layers — you only need ONE to hold.Step 2: Network Isolation (VPC / Private Subnet)
Step 3: TLS In Transit Configuration
Step 4: Transparent Data Encryption (TDE) at Rest
Step 5: Column-Level Encryption with pgcrypto
Step 6: Least Privilege Role Architecture
Step 7: SQL Injection Prevention & Database Activity Monitoring
Step 8: Capstone — Security Validation Suite
Summary
Layer
Control
Implementation
Last updated
