Configuration Guide
This document explains how to configure Decision Engine for local and on-prem deployments.Primary Config Files
config/development.toml: used for host/source runsconfig/docker-configuration.toml: used for Docker and Compose runshelm-charts/config/development.toml: Kubernetes chart template config
config.example.toml, which is incomplete.
Config Sections
Server
host is the bind address. Use 0.0.0.0 for Docker/deployed, 127.0.0.1 for local-only.
Logging
log_format accepts "default" (human-readable) or "json" (structured, recommended for prod).
Metrics
host:port/metrics. Used by the monitoring Compose profile (Prometheus scrapes 9094, Grafana at 3000).
Rate Limiting
request_count requests allowed per duration seconds.
Redis cache config
Database
MySQL and PostgreSQL use separate config sections. MySQL:config/docker-configuration.toml.
Multi-Tenant Schema
config/development.toml, config/docker-configuration.toml) define only the public tenant — add entries for any additional tenant you want to support.
Some routes resolve the tenant from an x-tenant-id request header rather than the authenticated merchant, and reject the request outright if it’s missing (TE_03). Send x-tenant-id: public on GET /health/diagnostics, every GET /analytics/* route, and POST /gateway-score/reset — see API Guide.
Redis
Auth
jwt_secret — 32+ characters recommended. Set email_verification_enabled = true if you’ve wired an email provider.
Admin Secret
POST /merchant-account/create endpoint (admin bootstrap). Change this in production.
API Key Auth
true, protected routes accept x-api-key in addition to JWT bearer tokens. When false, the auth middleware allows all requests through without authentication — this effectively disables auth for every protected route. Do not set this to false in any environment that should enforce auth.
Analytics
Both Kafka and ClickHouse requireenabled = true — without it, analytics is disabled even if the connection details are configured.
TLS
API Client
identity to a PEM path if you need mTLS.
Secrets Management
By default, secrets in config are stored in plaintext. For production, use one of the two supported backends.AWS KMS
Requires thekms-aws feature (included in the release feature set).
HashiCorp Vault
Requires thekms-hashicorp-vault feature.
database.password and user_auth.jwt_secret are resolved from the vault rather than the config file.
Environment Overrides
Selected values can be overridden at runtime via environment variables. This is useful in Helm deployments viaextraEnvVars. Consult src/config.rs for the full mapping.