How factionsecurity/faction works
Project Type & Purpose
• This is a full-stack, Java-based web application (monolithic at the service level) packaged as a WAR and deployed via Docker (Tomcat).
• Frontend: JSPs, static assets (CSS/JS), Webpack build, served by the Java web server.
• Backend: Struts/Spring controllers (com.fuse.actions, com.fuse.api, com.fuse.servlets), service/business logic, DAO layer (Hibernate/JPA), extensibility API, report-generation engine (docx4j).
• Persistence: Primary relational database (configured via persistence.xml + Hibernate), plus optional MongoDB for some features (noted in README).
• Integrations: LDAP/OAuth for authentication, SMTP for email, external Burp Suite extension via REST API.
File Structure (High-Level)
• Top level: Docker + Maven configs (Dockerfile, docker-compose.yml, pom.xml).
• WebContent: all UI (JSP + static libs + Webpack output).
• src/com/fuse: Java code—actions (MVC controllers), api (REST endpoints), dao (data access), utils, servlets, extenderapi, tasks, reporting.
• tests & unittests: JUnit tests for core workflows and extension API.
a. Users & Clients
• Browser clients (UI)
• Burp Suite extension (third-party PenTest tool)
• External systems calling the REST API
b. Frontend Layer
• Static Asset Server (Tomcat serves WebContent/dist, JSP engine).
• JSP Views + Taglibs + Webpack-generated JS/CSS
c. Backend Layer (Single Java Service)
• Web Container (Tomcat inside Docker)
• MVC Controllers (Struts/Spring)
• REST API Controllers (com.fuse.api)
• Business Services + Extender API (com.fuse.extenderapi)
• Report Generation Module (docx4j)
• Asynchronous Task Queue (EmailThread, ReportGenThread)
d. Data Layer
• Primary RDBMS (configured via src/META-INF/persistence.xml, Hibernate)
• Optional MongoDB service (noted as a requirement, spun up in docker-compose)
e. External Integrations
• LDAP / OAuth2.0 Identity Provider
• SMTP Mail Server
• S3 (for report templates, if configured)
• Burp Suite Extension (via REST over HTTPS)
Relationships & Data Flows
• Browser → HTTP(S) → Tomcat/JSP (UI requests, form posts, AJAX)
• Tomcat Controllers → Service Layer → DAO → RDBMS (CRUD on assessments, vulnerabilities, users)
• Report requests → Reporting Module → docx4j → generated DOCX delivered to browser or stored
• Task Queue → asynchronous threads → SMTP (email notifications)
• REST API endpoints → consumed by Burp Suite extension or other clients
• Authentication flows → Tomcat → LDAP/OAuth provider → session token/cookie
• Extensions (custom JARs) loaded by Extender API → invoked at event hooks
Architectural Patterns & Principles
• Layered Architecture (Presentation → Controller → Service → DAO → Persistence)
• Plugin / Extension Pattern (ExtensionClassLoader + ExtensionActionListener)
• Asynchronous Task Processing (thread pool executor for email, report generation)
• MVC via Struts/Spring + REST via JAX-RS controllers
• Configuration via Docker Compose for environment isolation
Final Checklist
[ ] All major tiers (UI, App, Data, External) clearly labeled
[ ] Notes on async flows (task queue threads)
[ ] Call-outs for extension/plugin loading