Skip to content

Operations

This section covers everything needed to run Caracal reliably in production: deployment topology, service configuration, database and Redis management, TLS, key management, observability, audit retention, and incident response.

Caracal consists of five services sharing two infrastructure dependencies:

ServiceRolePort
STSIssues and verifies ES256 mandates; serves JWKS; evaluates OPA policy8080
APIControl-plane REST; manages zones, applications, policies, grants3000
GatewayProxies inbound requests; enforces mandates; revocation-aware8081
CoordinatorAgent session lifecycle; delegation graph; invocation tracking4000
AuditConsumes audit event stream; persists to Postgres; Parquet export9090
PostgresPrimary durable store for all five services (separate DB roles)5432
RedisTransactional outbox relay, revocation stream, rate limits6379

Each service writes to Postgres under a dedicated role with minimum necessary permissions. Redis carries the transactional outbox (streams) and ephemeral rate-limit state. No service has direct access to another service’s tables.

PageWhat it covers
Deployment with Docker ComposeReference docker-compose.yml, startup order, volume strategy, first-run procedure
Environment VariablesAll required and optional env vars, grouped by service, with defaults
PostgreSQLSchema overview, migrations, pool sizing, partitioning, advisory locks
Redis StreamsStream provisioning, consumer groups, persistence config, retention
TLS and Production HardeningTLS certificate setup, INSECURE flags, SSRF defenses, production constraints
Key Management and RotationZONE_KEK, zone signing keys, JWKS, rotation procedure
Observability and Health/health, /ready, /metrics endpoints and what each check covers
Backup and RetentionAudit partition lifecycle, S3 Parquet export, tamper detection
Incident ResponseRevocation playbook, key compromise, audit alerts, escalation

Before deploying, generate the three HMAC/encryption secrets the stack requires:

Terminal window
openssl rand -hex 32 # ZONE_KEK
openssl rand -hex 32 # AUDIT_HMAC_KEY
openssl rand -hex 32 # STREAMS_HMAC_KEY

These must be set in the environment before any service starts. Changing them after initial deployment requires a key rotation procedure — see Key Management and Rotation.