backend-server-v2/docs/secutity architecture.md

37 lines
3.1 KiB
Markdown

┌─────────────────────────────┐
│ Browser │
│ HTML + HTMX + UI Kit │
└──────────────┬──────────────┘
HTTPS (TLS)
┌──────────────▼──────────────┐
│ GoFiber App │
├─────────────────────────────┤
│ CORS Middleware │
│ Session Middleware │
│ CSRF (optional) │
│ Rate Limiter (Auth) │
└──────────────┬──────────────┘
┌───────────────────▼───────────────────┐
│ Auth & Authorization │
│ - RequireAuth │
│ - RequireAdmin │
│ - Role validation │
└───────────────────┬───────────────────┘
┌───────────────────▼───────────────────┐
│ Business Layer (Services) │
└───────────────────┬───────────────────┘
┌───────────────────▼───────────────────┐
│ Repository Layer (GORM) │
└───────────────────┬───────────────────┘
┌───────────────────▼───────────────────┐
│ Database │
│ - Users (bcrypt passwords) │
│ - Token hashes (SHA-256) │
│ - AuditLog │
└───────────────────────────────────────┘