Skip to main content
When you self-host, policy decisions are written to a ClickHouse instance backing the audit dashboard. The commands below start a local one via Docker for dev and self-hosting; in production, point the platform at your own ClickHouse cluster. On Hexgate Cloud this is fully managed — nothing to run. For the conceptual overview see audit trail; for the engineering spec see internals/audit-pipeline.
Schema lives in platform/clickhouse/init/schema.sql.
Schema init runs once. The Docker image applies init/schema.sql exactly once, on first container start with an empty data volume — editing the SQL afterwards is ignored on existing environments. To apply a schema change, either make clickhouse-reset (wipes data) or connect with make clickhouse-cli and run the migration SQL by hand. In production, treat schema changes as a deliberate maintenance step against your ClickHouse cluster.
The service binds to 127.0.0.1 only, on host ports 8124 (HTTP) and 9001 (native) rather than ClickHouse’s default 8123/9000, so it coexists with any other local ClickHouse instance (e.g. a Langfuse-bundled one).

Ingest endpoint

Once both make clickhouse-up and make platform-api are running, the ingest endpoint POST /v1/audit/decisions accepts one decision per request:
Integration tests (pytest -m integration) round-trip rows through the live ClickHouse — opt-in so the default make platform-api-test stays offline-friendly.

Seed data

Inserts 800 normal rows spread over 30 days (Alice, Bob, Charlie across all tools) plus 20 anomaly rows where Bob probes restricted tools (refund_customer, create_ticket) with a default role in a 5-minute window 10 days ago.