Domain Model
All entities in SOCSuite, their relationships, and the database schema. Reference guide for developers implementing new endpoints or services.
Entity-Relationship Diagram
erDiagram
Tenant ||--o{ User : "has"
Tenant ||--o{ Asset : "owns"
Tenant ||--o{ Case : "belongs to"
Tenant ||--o{ DetectionRule : "defines"
User ||--o{ Case : "handles"
User ||--o{ Task : "assigned to"
Asset ||--o{ Vulnerability : "has"
Asset ||--o{ Alert : "generates"
Asset ||--o| AgentDetails : "has_one"
Asset ||--o{ AgentApiKey : "has_many"
Asset ||--o{ AgentMetrics : "has_many"
Asset ||--o{ Mission : "receives"
Case ||--o{ Alert : "aggregates"
Case ||--o{ Task : "contains"
Case ||--o| Incident : "escalates to"
DetectionRule ||--o{ Alert : "generates"
Playbook ||--o{ Case : "automates"
Workflow ||--o{ Playbook : "orchestrates"
Asset {
uuid id PK
string type "agent | device | server"
string hostname
string ip_address
string os_name
string status
timestamp last_seen
}
Case {
uuid id PK
string title
string severity "low | medium | high | critical"
string mitre_tactic
string status
}
Alert {
uuid id PK
string rule_name
string severity
jsonb raw_event
}Entities
| Entity | Meaning |
|---|---|
| Alert | SIEM notification from OpenSearch after rule evaluation |
| Case | Aggregation of alerts + attack path (MITRE ATT&CK). Work unit for analysts |
| Incident | ITIL ticket (types: incident, approval, manual_task). approval tickets = approval request with approved/rejected workflow + audit fields (approved_by/at/comment). Description required (min. 10 chars, Dev_o-357). Every ticket action is recorded in an append-only audit timeline; comments enable discussion (→ Ticket Audit) |
| Task | Task within a case |
| Detection Rule | SIGMA detection rule (synced to OpenSearch, creatable via UI) |
| Playbook | Automated response script |
| Workflow | Automation sequence |
| Mission | Task pushed to agents |
| Asset | IT asset — agents are assets (see below) |
| Vulnerability | Vulnerability on an asset, including CVE enrichment |
Ticket Audit (Timeline + Comments)
Every ticket carries two audit dimensions (analogous to the case domain, Dev_o-358):
Audit Timeline (ticket_timeline)
Append-only — events are only added, never modified or deleted. Every write operation on a ticket produces exactly one event including the actor (user ID + username, ON DELETE SET NULL).
| Event type | Triggered by |
|---|---|
created | Ticket creation |
status_changed | Status change (incl. close/reopen) |
assigned | Assignment to an analyst (assignee in metadata) or unassignment (DEV-161, assignee_id NULL) |
priority_changed | Escalation / priority change (old/new in metadata) |
approved / rejected | Approval decision (comment in metadata) |
comment_added | New discussion entry (comment ID in metadata) |
Timeline write points are best-effort: a failed audit write never breaks the main operation.
Comments (ticket_comments)
Discussion on the ticket: CRUD with author (ID + name, denormalized), edited_at on modification. Delete-cascade with the ticket.
Endpoints & Permissions
| Endpoint | Permission |
|---|---|
POST /api/v1/tickets/{id}/assign | ticketing.tickets.assign (DEV-161) |
POST /api/v1/tickets/{id}/unassign | ticketing.tickets.assign (DEV-161) |
GET /api/v1/tickets/{id}/timeline | ticketing.tickets.view (ticket group) |
GET /api/v1/tickets/{id}/comments | ticketing.tickets.view (ticket group) |
POST /api/v1/tickets/{id}/comments | ticketing.tickets.create |
PUT /api/v1/tickets/{id}/comments/{commentId} | ticketing.tickets.edit |
DELETE /api/v1/tickets/{id}/comments/{commentId} | ticketing.tickets.edit |
The UI (ticket detail) renders both sources as one merged, time-sorted feed (events + comments).
Critical Pattern: Agents = Assets
:::error [No separate agents table]
There is no dedicated agents table. Agents are assets with type = 'agent'.
Any direct access to a hypothetical agents table is incorrect.
:::
-- Correct query for all agents:
SELECT * FROM assets WHERE type = 'agent';Fields of an Agent Asset
| Field | Description |
|---|---|
hostname | System hostname |
ip_address | IP address |
os_name | Operating system name |
os_version | Operating system version |
agent_version | Version of the Satellite agent |
status | Current agent status |
last_seen | Last contact timestamp |
Relations
| Relation | Type | Description |
|---|---|---|
agent_api_keys | has_many | API keys belonging to the agent |
agent_details | has_one | Extended agent metadata |
agent_metrics | has_many | Metrics and telemetry data |
Data Flow: From Satellite to Analyst
flowchart TD
SAT["Satellite / K8s Collector"] -->|"Logs, events, telemetry"| OS["OpenSearch<br/>Live rule evaluation"]
OS -->|Rule match| ALERT["Alert<br/>SIEM notification"]
ALERT -->|"Aggregation + MITRE ATT&CK"| CASE["Case<br/>Work unit"]
CASE -->|"~90% automated"| PB["Playbook"]
CASE -->|"~10% manual"| AN["Analyst"]Pagination
:::warn [Mandatory above 100 items] All list endpoints with potentially more than 100 entries must be paginated. :::
| Parameter | Value |
|---|---|
| Default | 50 |
| Maximum | 1000 |
See Also
- Architecture — Clean Architecture and layered model
- API Reference — REST endpoints for each entity
- Orchestrator — Service definitions and invariants