How mr-ans-2006/carta-zta works
CARTA-ZTA is a native Python zero-trust framework. Client requests pass through JWT verification, risk-aware policy decisions, and the protected application; asynchronously recorded telemetry feeds a frozen-model detector whose risk and health state inform later requests. The repository also provides traffic simulators, a live console, and benchmark/reporting tools. Edges follow shown calls or README descriptions; unsampled service wiring is identified by documentation rather than source inspection.
Main entry points: proxy.py PEP gateway · state_store.py JSON runtime state · detector.py Risk detector · runner.py System runner
Components 21
Request enforcement
- PEP gateway
pep_gateway/proxy.py - OPA policy
policy_engine/policy.rego - Python PDP fallback
policy_engine/pdp_fallback.py - Reference policy logic
common/policy_logic.py - Protected API
target_app/main.py
Risk assessment
- Window features
ai_engine/features.py - Frozen model training
ai_engine/train.py - Risk detector
ai_engine/detector.py
Shared state
- JSON runtime state
common/state_store.py - Shared configuration
common/config.py
Operations and demos
- System runner
runner.py - Web console server
gui/server.py - Dashboard UI
gui/dashboard.html - JWT issuer
simulator/generate_jwt.py - Normal traffic
simulator/normal_traffic.py - Attack scenarios
simulator/attack_scenarios.py
Evaluation and research
- Benchmark runner
evaluation/run_benchmarks.py - Result plots
evaluation/plot_results.py - Paper renderer
evaluation/render_paper.py
Other components
- API client
- PDP service
Connections 34
- API client → PEP gateway: sends requests
pep_gateway/proxy.py - PEP gateway → JSON runtime state: reads risk and health
pep_gateway/proxy.py - PEP gateway → PDP service: queries decisions
pep_gateway/proxy.py - PDP service → OPA policy: evaluates policy
README.md - PDP service → Python PDP fallback: uses if unavailable
README.md - PEP gateway → Reference policy logic: falls back locally
pep_gateway/proxy.py - Python PDP fallback → Reference policy logic: uses rules
policy_engine/pdp_fallback.py - PEP gateway → Protected API: forwards allowed requests
pep_gateway/proxy.py - Protected API → PEP gateway: returns response
pep_gateway/proxy.py - PEP gateway → JSON runtime state: appends telemetry asynchronously
pep_gateway/proxy.py - Risk detector → Window features: extracts windows
ai_engine/detector.py - Risk detector → Frozen model training: scores with hybrid models
ai_engine/detector.py - Risk detector → JSON runtime state: writes risk and heartbeat
ai_engine/detector.py - JSON runtime state → Risk detector: provides telemetry stream
ai_engine/detector.py - Frozen model training → Window features: trains on baseline data
ai_engine/train.py - PEP gateway → Shared configuration: uses service settings
pep_gateway/proxy.py - Protected API → Shared configuration: uses internal secret
target_app/main.py - Web console server → Dashboard UI: serves interface
gui/server.py - Web console server → JSON runtime state: reads live state
gui/server.py - Web console server → Normal traffic: launches traffic
gui/server.py - Web console server → Attack scenarios: launches scenarios
gui/server.py - Normal traffic → JWT issuer: issues tokens
README.md - Attack scenarios → JWT issuer: issues tokens
simulator/attack_scenarios.py - Normal traffic → PEP gateway: sends demo requests
README.md - Attack scenarios → PEP gateway: sends attack requests
simulator/attack_scenarios.py - System runner → PEP gateway: starts service
README.md - System runner → Risk detector: starts service
README.md - System runner → PDP service: starts service
README.md - System runner → Protected API: starts service
README.md - Benchmark runner → Attack scenarios: runs attack scenarios
evaluation/run_benchmarks.py - Benchmark runner → Normal traffic: measures normal traffic
evaluation/run_benchmarks.py - Benchmark runner → JSON runtime state: reads risk and health
evaluation/run_benchmarks.py - Benchmark runner → Result plots: produces result inputs
README.md - Result plots → Paper renderer: supports paper output
README.md