Configuration Precedence#
TantoC2 uses a layered configuration system. Higher precedence wins:
- CLI arguments (highest)
- Environment variables (prefixed with
TANTOC2_) - Config file (
~/.tantoc2/config.yamlor$TANTOC2_CONFIG) - Built-in defaults (lowest)
Config File#
Default location: ~/.tantoc2/config.yaml
Override with the TANTOC2_CONFIG environment variable:
| |
Example Config#
| |
Environment Variables#
Any configuration field can be overridden with the TANTOC2_ prefix:
| |
Configuration Reference#
| Field | Type | Default | Env Var | Description |
|---|---|---|---|---|
host | str | 0.0.0.0 | TANTOC2_HOST | Bind address |
port | int | 8443 | TANTOC2_PORT | API server port |
data_dir | str | ./data | TANTOC2_DATA_DIR | Root data directory |
log_level | str | INFO | TANTOC2_LOG_LEVEL | Logging level (DEBUG, INFO, WARNING, ERROR) |
tls_enabled | bool | false | TANTOC2_TLS_ENABLED | Enable TLS on the API port |
tls_cert_file | str | — | TANTOC2_TLS_CERT_FILE | PEM-encoded TLS certificate |
tls_key_file | str | — | TANTOC2_TLS_KEY_FILE | PEM-encoded TLS private key |
default_engagement_dir | str | engagements | TANTOC2_DEFAULT_ENGAGEMENT_DIR | Subdirectory for engagement databases |
bg_dead_agent_interval | int | 60 | TANTOC2_BG_DEAD_AGENT_INTERVAL | Dead agent scan interval (seconds) |
bg_stale_task_interval | int | 300 | TANTOC2_BG_STALE_TASK_INTERVAL | Stale task cleanup interval (seconds) |
bg_key_rotation_interval | int | 300 | TANTOC2_BG_KEY_ROTATION_INTERVAL | Key rotation check interval (seconds) |
key_rotation_enabled | bool | false | TANTOC2_KEY_ROTATION_ENABLED | Enable automatic session key rotation |
key_rotation_session_ttl | int | 3600 | TANTOC2_KEY_ROTATION_SESSION_TTL | Maximum session key age before rotation (seconds) |
task_pending_ttl | int | 3600 | TANTOC2_TASK_PENDING_TTL | Pending task TTL before cleanup (seconds) |
task_sent_ttl | int | 7200 | TANTOC2_TASK_SENT_TTL | Sent task TTL before cleanup (seconds) |
log_redaction_enabled | bool | true | TANTOC2_LOG_REDACTION_ENABLED | Redact sensitive values from logs |
task_archival_age | int | 86400 | TANTOC2_TASK_ARCHIVAL_AGE | Auto-archive completed tasks older than this (seconds) |
clock_drift_tolerance | int | 300 | TANTOC2_CLOCK_DRIFT_TOLERANCE | Acceptable clock drift for crypto and agent tracking (seconds) |
TLS Setup#
Self-Signed (Automatic)#
Set tls_enabled: true without specifying certificate files. The server generates self-signed certificates automatically.
Custom Certificates#
Generate with OpenSSL:
| |
Configure:
| |
Listener TLS#
Listeners support TLS independently of the API server. Specify per-listener certificates when creating HTTPS listeners:
| |
Log Redaction#
Enabled by default. The server filters sensitive values from log output:
- Credentials and secrets
- Callback addresses
- Cryptographic keys and tokens
Disable temporarily for debugging:
| |
Re-enable redaction before operational use to prevent accidental exposure of sensitive data.