Configuration
Configure t2e through environment variables, YAML rules, and evidence mappings.
Environment Variables
Key configuration options for the backend service:
| Variable | Default | Description |
|---|---|---|
| DATABASE_URL | postgresql+asyncpg://... | PostgreSQL connection string |
| REDIS_URL | redis://redis:6379 | Redis connection string |
| JWT_SECRET_KEY | change-me | Secret for signing JWTs |
| JWT_ALGORITHM | HS256 | JWT signing algorithm |
| JWT_EXPIRATION | 3600 | JWT expiry in seconds |
| EVIDENCE_RULES_DIR | /app/rules | Directory with YAML risk rules |
| EVIDENCE_MAPPINGS_DIR | /app/mappings | Directory with evidence mappings |
Risk Rules
Rules are defined in YAML and evaluated against incoming events. Each rule specifies:
# rules/otel.yaml
- id: OTLP-002
name: "Elevated error rate"
severity: MEDIUM
source: otel
condition: error_rate > 0.05
window_minutes: 15
controls:
- soc2:CC7.1
- iso27001:A.17.1
auto_resolve: true
resolve_condition: error_rate < 0.01 Rules support auto-resolution — when the condition no longer matches, the risk is automatically closed.
Evidence Mappings
Evidence mappings define how event types map to compliance controls across frameworks:
# mappings/evidence_mappings.yaml
evidence_types:
k8s_policy_violation:
description: "Kubernetes security policy violation"
retention_days: 365
controls:
- soc2:CC6.1
- iso27001:A.8.9
- pci_dss:2.2.1
change_record:
description: "Code change with peer review"
retention_days: 365
controls:
- soc2:CC8.1
- iso27001:A.8.32
ai_model_call:
description: "AI model inference telemetry"
retention_days: 730
controls:
- iso42001:AI-001
- soc2:CC6.1