# vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response architecture

> Architecture diagram of the GitHub repository vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response
- Repository: https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response

## Overview

This is a Zero Trust endpoint detection and response platform. Its main workflow collects endpoint telemetry, sends it to the manager for normalization and evaluation, updates risk/trust and policy decisions, then records incidents and response commands; operators monitor and manage the system through the API and dashboard. The README also describes agent-side offline detection/queuing and Windows active response. Several internal links are documented or visible in excerpts; unsampled wiring is represented only where the README supports it.

Main entry points: [`engine/pipeline.py`](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/pipeline.py) (Processing pipeline), [`agent/agent_daemon.py`](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/agent_daemon.py) (Agent daemon), [`api/ingestion.py`](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/ingestion.py) (Telemetry ingestion), [`agent/collectors.py`](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/collectors.py) (Event collectors)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Endpoint agent"]
  node_collectors["Event collectors<br/>[collectors.py]"]
  node_daemon["Agent daemon<br/>[agent_daemon.py]"]
  node_localrules["Local detection"]
  node_offline[("Offline event queue<br/>[offline_queue.py]")]
  node_commands["Command receiver"]
  node_executor["Safe script execution<br/>[script_executor.py]"]
end

subgraph group_manager["Manager processing"]
  node_ingestion["Telemetry ingestion<br/>[ingestion.py]"]
  node_api["Manager API<br/>[server.py]"]
  node_eventmodel["Canonical event model<br/>[models.py]"]
  node_wazuh["Wazuh adapter<br/>[wazuh_adapter.py]"]
  node_serialization["Event serialization<br/>[serialization.py]"]
  node_pipeline["Processing pipeline<br/>[pipeline.py]"]
  node_correlation["Behavior correlation<br/>[engine.py]"]
  node_conditions["Condition evaluation<br/>[conditions.py]"]
  node_risk["Risk scoring<br/>[engine.py]"]
  node_trust["Trust evaluation<br/>[engine.py]"]
  node_policy["Adaptive policies<br/>[engine.py]"]
  node_database[("SQLite persistence<br/>[database.py]")]
  node_background["Background worker<br/>[background.py]"]
end

subgraph group_response["Response execution"]
  node_responseengine["Response decisions<br/>[engine.py]"]
  node_builder["Signed command builder<br/>[command_builder.py]"]
  node_powershell["PowerShell executor<br/>[ps_executor.py]"]
  node_windows["Windows sessions"]
end

subgraph group_operator["Operator interface"]
  node_dashboard["Dashboard<br/>[run_dashboard.py]"]
end

node_endpoint(("Managed endpoint"))
node_operator(("Security operator"))

node_endpoint -->|"produces telemetry"| node_collectors
node_collectors -->|"supplies events"| node_daemon
node_daemon -->|"checks events"| node_localrules
node_daemon -->|"queues offline"| node_offline
node_daemon -.->|"uploads telemetry"| node_ingestion
node_ingestion -.->|"adapts alerts"| node_wazuh
node_wazuh -->|"creates events"| node_eventmodel
node_serialization -->|"encodes events"| node_eventmodel
node_api -.->|"routes ingestion"| node_ingestion
node_background -.->|"runs processing"| node_pipeline
node_pipeline -->|"builds context"| node_serialization
node_pipeline -.->|"correlates events"| node_correlation
node_pipeline -->|"evaluates rules"| node_conditions
node_pipeline -->|"updates risk"| node_risk
node_pipeline -->|"evaluates trust"| node_trust
node_pipeline -.->|"evaluates policies"| node_policy
node_pipeline -->|"persists results"| node_database
node_trust -->|"reads scores"| node_risk
node_pipeline -->|"builds commands"| node_builder
node_pipeline -.->|"dispatches actions"| node_responseengine
node_builder -.->|"delivers commands"| node_commands
node_commands -.->|"dispatches scripts"| node_executor
node_responseengine -->|"executes templates"| node_powershell
node_powershell -.->|"checks sessions"| node_windows
node_operator -->|"views status"| node_dashboard
node_dashboard -.->|"uses API"| node_api

click node_collectors "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/collectors.py"
click node_daemon "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/agent_daemon.py"
click node_localrules "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/rules/local_rule_engine.py"
click node_offline "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/storage/offline_queue.py"
click node_commands "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/commands/command_receiver.py"
click node_executor "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/execution/script_executor.py"
click node_ingestion "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/ingestion.py"
click node_api "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/server.py"
click node_eventmodel "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/models.py"
click node_wazuh "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/wazuh_adapter.py"
click node_serialization "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/serialization.py"
click node_pipeline "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/pipeline.py"
click node_correlation "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/correlation/engine.py"
click node_conditions "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/conditions.py"
click node_risk "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/risk/engine.py"
click node_trust "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/trust/engine.py"
click node_policy "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/policy/engine.py"
click node_database "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/storage/database.py"
click node_responseengine "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/response/engine.py"
click node_builder "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/response/command_builder.py"
click node_powershell "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/powershell/ps_executor.py"
click node_windows "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/powershell/windows_sessions.py"
click node_dashboard "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/dashboard/run_dashboard.py"
click node_background "https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/background.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_collectors,node_daemon,node_localrules,node_offline,node_commands,node_executor toneBlue
class node_ingestion,node_api,node_eventmodel,node_wazuh,node_serialization,node_pipeline,node_correlation,node_conditions,node_risk,node_trust,node_policy,node_database,node_background toneAmber
class node_responseengine,node_builder,node_powershell,node_windows toneMint
class node_dashboard toneRose
class node_endpoint,node_operator toneIndigo
```

## Components

### Endpoint agent

- [Event collectors](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/collectors.py): `agent/collectors.py`
- [Agent daemon](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/agent_daemon.py): `agent/agent_daemon.py`
- [Local detection](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/rules/local_rule_engine.py): `agent/rules/local_rule_engine.py`
- [Offline event queue](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/storage/offline_queue.py): `agent/storage/offline_queue.py`
- [Command receiver](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/commands/command_receiver.py): `agent/commands/command_receiver.py`
- [Safe script execution](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/agent/execution/script_executor.py): `agent/execution/script_executor.py`

### Manager processing

- [Telemetry ingestion](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/ingestion.py): `api/ingestion.py`
- [Manager API](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/server.py): `api/server.py`
- [Canonical event model](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/models.py): `engine/events/models.py`
- [Wazuh adapter](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/wazuh_adapter.py): `engine/events/wazuh_adapter.py`
- [Event serialization](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/serialization.py): `engine/events/serialization.py`
- [Processing pipeline](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/pipeline.py): `engine/pipeline.py`
- [Behavior correlation](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/correlation/engine.py): `engine/correlation/engine.py`
- [Condition evaluation](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/events/conditions.py): `engine/events/conditions.py`
- [Risk scoring](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/risk/engine.py): `engine/risk/engine.py`
- [Trust evaluation](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/trust/engine.py): `engine/trust/engine.py`
- [Adaptive policies](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/policy/engine.py): `engine/policy/engine.py`
- [SQLite persistence](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/storage/database.py): `storage/database.py`
- [Background worker](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/api/background.py): `api/background.py`

### Response execution

- [Response decisions](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/response/engine.py): `engine/response/engine.py`
- [Signed command builder](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/engine/response/command_builder.py): `engine/response/command_builder.py`
- [PowerShell executor](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/powershell/ps_executor.py): `powershell/ps_executor.py`
- [Windows sessions](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/powershell/windows_sessions.py): `powershell/windows_sessions.py`

### Operator interface

- [Dashboard](https://github.com/vimalrootben/zero-trust-continuous-authentication-framework-for-insider-threat-detection-and-response/blob/main/dashboard/run_dashboard.py): `dashboard/run_dashboard.py`

### Other components

- **Managed endpoint**
- **Security operator**

## Connections

- Managed endpoint → Event collectors: produces telemetry (evidence: `README.md`)
- Event collectors → Agent daemon: supplies events (evidence: `README.md`)
- Agent daemon → Local detection: checks events (evidence: `README.md`)
- Agent daemon → Offline event queue: queues offline (evidence: `README.md`)
- Agent daemon → Telemetry ingestion: uploads telemetry (evidence: `README.md`)
- Telemetry ingestion → Wazuh adapter: adapts alerts (evidence: `README.md`)
- Wazuh adapter → Canonical event model: creates events (evidence: `engine/events/wazuh_adapter.py`)
- Event serialization → Canonical event model: encodes events (evidence: `engine/events/serialization.py`)
- Manager API → Telemetry ingestion: routes ingestion (evidence: `README.md`)
- Background worker → Processing pipeline: runs processing (evidence: `README.md`)
- Processing pipeline → Event serialization: builds context (evidence: `engine/pipeline.py`)
- Processing pipeline → Behavior correlation: correlates events
- Processing pipeline → Condition evaluation: evaluates rules (evidence: `engine/pipeline.py`)
- Processing pipeline → Risk scoring: updates risk (evidence: `engine/pipeline.py`)
- Processing pipeline → Trust evaluation: evaluates trust (evidence: `engine/pipeline.py`)
- Processing pipeline → Adaptive policies: evaluates policies (evidence: `README.md`)
- Processing pipeline → SQLite persistence: persists results (evidence: `engine/pipeline.py`)
- Trust evaluation → Risk scoring: reads scores (evidence: `engine/trust/engine.py`)
- Processing pipeline → Signed command builder: builds commands (evidence: `engine/pipeline.py`)
- Processing pipeline → Response decisions: dispatches actions
- Signed command builder → Command receiver: delivers commands (evidence: `README.md`)
- Command receiver → Safe script execution: dispatches scripts (evidence: `README.md`)
- Response decisions → PowerShell executor: executes templates (evidence: `engine/response/engine.py`)
- PowerShell executor → Windows sessions: checks sessions
- Security operator → Dashboard: views status (evidence: `README.md`)
- Dashboard → Manager API: uses API (evidence: `README.md`)
