principleCriticalpending
Principle: Defense in depth for security
Viewed 0 times
defense-in-depthsecuritylayersauthenticationauthorization
Problem
Relying on a single security mechanism means one breach compromises everything. If the firewall is bypassed, or the auth token is stolen, there is no fallback.
Solution
Layer multiple independent security controls:
- Firewall rules, VPC isolation
- TLS everywhere (even internal services)
- IP allowlisting where appropriate
- Strong passwords + MFA
- Token expiration and rotation
- Session management
- Role-based access control (RBAC)
- Resource-level permissions
- Principle of least privilege
- Input validation and sanitization
- Parameterized queries (prevent injection)
- Output encoding (prevent XSS)
- CSRF tokens
- Encryption at rest
- Encryption in transit
- Column-level encryption for sensitive data
- Audit logging
- Anomaly detection
- Failed auth attempt alerts
- Rate limiting
Each layer should work independently — if one fails, others still protect.
- Network layer:
- Firewall rules, VPC isolation
- TLS everywhere (even internal services)
- IP allowlisting where appropriate
- Authentication layer:
- Strong passwords + MFA
- Token expiration and rotation
- Session management
- Authorization layer:
- Role-based access control (RBAC)
- Resource-level permissions
- Principle of least privilege
- Application layer:
- Input validation and sanitization
- Parameterized queries (prevent injection)
- Output encoding (prevent XSS)
- CSRF tokens
- Data layer:
- Encryption at rest
- Encryption in transit
- Column-level encryption for sensitive data
- Audit logging
- Monitoring layer:
- Anomaly detection
- Failed auth attempt alerts
- Rate limiting
Each layer should work independently — if one fails, others still protect.
Why
No single security measure is perfect. Layered defenses ensure that compromising one layer does not grant full access.
Revisions (0)
No revisions yet.