Перейти до основного вмісту

Threat Model

This document presents the threat model for the Bus Ticket Booking System, identifying assets, threat agents, and mitigations.


1. Assets

  • User Data: Personal and booking information
  • Payment Data: Transaction records
  • Credentials: JWT tokens, OAuth secrets
  • Infrastructure: Databases, message brokers

2. Threat Agents

  • External Attackers: Internet-based adversaries
  • Malicious Insiders: Compromised credentials
  • Third-Party Services: Compromise or misconfiguration of Keycloak, DB

3. Threat Scenarios & Mitigations

ThreatImpactMitigation
JWT token theftUnauthorized accessUse HTTPS, short-lived tokens, rotate signing keys
SQL InjectionData leakage/corruptionUse JPA/Hibernate with parameterized queries
Secret leakageFull system compromiseSOPS + Sealed Secrets, strict RBAC, audit logging
DDoS on booking endpointsDenial of serviceRate limiting, autoscaling, WAF
Misconfigured roles in KeycloakPrivilege escalationPeriodic role audits, least-privilege principle

4. Risk Ranking

  • High: Token theft, privilege escalation
  • Medium: DDoS, database overload
  • Low: Third-party outage, network latency

5. Continuous Review

  • Update threat model every quarter or after major changes
  • Conduct security reviews and penetration tests

  • Document Version: 1.0
  • Date: 2025-06-23
  • Author: ArturChernets