Security Architecture
Overview
Security Layers
┌─────────────────────────────────────────────────────────────────┐
│ Network Security │
│ • HTTPS enforcement │
│ • HSTS, CSP, security headers │
│ • CORS policies │
└───────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────▼─────────────────────────────────────────────┐
│ Authentication (FusionAuth) │
│ • OAuth 2.0 / OIDC │
│ • Self-registration with verification │
│ • MFA support │
│ • M2M via Entity Grants │
└───────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────▼─────────────────────────────────────────────┐
│ Authorization │
│ • FusionAuth roles → Database permissions │
│ • Granular resource:action permissions │
│ • Row-Level Security (RLS) │
└───────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────▼─────────────────────────────────────────────┐
│ Data Protection │
│ • Encryption in transit (TLS 1.3) │
│ • Tenant isolation via RLS │
│ • Personal vs work data separation │
│ • Secret management (AWS SSM, Cloudflare) │
└───────────────────┬─────────────────────────────────────────────┘
│
┌───────────────────▼─────────────────────────────────────────────┐
│ Application Security │
│ • Input validation (Zod schemas) │
│ • XSS protection │
│ • CSRF protection │
│ • SQL injection prevention (Drizzle ORM) │
└─────────────────────────────────────────────────────────────────┘Authentication Security
Key Security Properties
Property
Value
Self-Registration Safeguards
Authorization Security
Key Security Properties
Layer
What It Enforces
Row-Level Security (RLS)
Data Protection
Encryption in Transit
Connection
Encryption
Encryption at Rest
Storage
Encryption
Tenant Data Isolation
Personal vs Work Data Separation
Secret Management
Network Security
HTTPS Enforcement
Security Headers
CORS Policy
Application Security
Input Validation
Email Normalization
HRIS Email
User Logs In As
Match?
XSS Prevention
CSRF Protection
SQL Injection Prevention
Attack Prevention
Attack
Prevention
Audit Logging
Events to Log
Event
Data Captured
Log Structure
Compliance
GDPR
Requirement
Implementation
Data Deletion Flow
Security Checklist
Before Deployment
Regular Audits
Incident Response
Security Monitoring
Key Metrics
Related Documentation
Last updated