Threat Models¶
Security threat analysis for MundiX components.
Authentication System¶
Assets¶
- User credentials
- JWT access tokens
- Refresh tokens
- Session data
Threats¶
- Brute Force Attack
- Impact: HIGH
- Mitigation: Rate limiting (5/min), account lockout
-
Status: ✅ Mitigated
-
Token Theft
- Impact: HIGH
- Mitigation: HTTPS only, short expiry (15min), refresh rotation
-
Status: ✅ Mitigated
-
SQL Injection
- Impact: CRITICAL
- Mitigation: SQLAlchemy ORM, parameterized queries
-
Status: ✅ Mitigated
-
Password Cracking
- Impact: HIGH
- Mitigation: Bcrypt (cost 12), salted hashes
-
Status: ✅ Mitigated
-
Race Condition (Refresh)
- Impact: MEDIUM
- Mitigation: SELECT FOR UPDATE, atomic transactions
- Status: ✅ Mitigated
Residual Risks¶
- User credential phishing: User education required
- Compromised environment variables: Secrets management needed
API Endpoints¶
Threats¶
- DDoS Attack
- Impact: HIGH
- Mitigation: Rate limiting, load balancing
-
Status: ⚠️ Partial (rate limiting only)
-
Unauthorized Access
- Impact: CRITICAL
- Mitigation: JWT validation, role-based access
- Status: ✅ Mitigated
Data Storage¶
Threats¶
- Database Breach
- Impact: CRITICAL
- Mitigation: Network isolation, password hashing
-
Status: ⚠️ Partial (encryption at rest needed)
-
Backup Exposure
- Impact: HIGH
- Mitigation: Encrypted backups
- Status: ❌ Not implemented
Overall Risk Level: MEDIUM
Action Required: Implement encryption at rest, backup encryption