VARUX AXIS Deterministic PostgreSQL Write-Path Control
v0.6 · Pilot Readiness
AXIS Documentation / Core Concepts / Architecture

Architecture

Core verifiedControl planeNative wire lab POC

AXIS is a deterministic control layer for PostgreSQL write paths. It sits between applications or operators and the database: it classifies SQL, evaluates versioned policy, enforces the decision, and records durable evidence — all before execution-sensitive outcomes.

System overview

Clients / Services Apps · Scripts AI Agents AXIS Gate (Rust / Axum) Context Builder actor · app · tenant · env SQL Classifier parse · normalize · fingerprint Policy Engine versioned · deterministic · ALLOW / BLOCK / REQUIRE_APPROVAL Approval Workflow pending → immutable resolve → explicit retry Audit / Evidence Store PostgreSQL protected target axis_executor role ALLOW Human Approval Queue out-of-band · TTL · operator auth REQUIRE_APPROVAL Controlled Error structured · no execution BLOCK DB Adapter pool · timeouts · execution Control Plane dashboard · approvals · audit · policy lifecycle server-side proxy /api/axis/* Direct DB clients must be closed by policy BYPASS network + roles prevent this "AXIS protects database operations that pass through AXIS. It cannot protect SQL sent directly to PostgreSQL with credentials or network access that bypass AXIS."
AXIS gate components and the protected write path. Direct database access is outside AXIS control and must be closed by deployment (roles, network, credentials).

Components

ComponentResponsibilityStatus
HTTP listener / gateExposes POST /query and the API surface; validates requests and size limitsVerified
SQL classifierPostgreSQL dialect parsing, normalization, fingerprinting, operation detection, target extraction, scope estimation, risk signalsVerified
Session storeIn-memory session_id-scoped prepared statement metadata for AXIS-side PREPARE / EXECUTE / DEALLOCATE enforcementImplemented
Policy engineVersioned policy evaluation producing ALLOW, BLOCK or REQUIRE_APPROVAL; deterministicVerified
Approval storeLocal pending and resolved approval records (SQLite per install guide; JSONL-backed per security model); immutable resolutionVerified
Audit loggerWAL plus JSONL projection with event hashes and previous-hash linkage; fsync-backed, fail-fast on corruptionVerified
Evidence verifierRead-only hash-chain verification (GET /evidence/verify, /audit/verify)Implemented
Runtime log storeBounded in-memory operational log buffer exposed by GET /logs; operational visibility only, not durable proofImplemented
Policy lifecycle storeImmutable version files, active policy pointer, candidate state, validation, activation, rollback; manifest-authoritative startupVerified
Audit derived index V1Read-model index (audit_index_v1.json); safe to delete/rebuild; WAL remains canonicalImplemented
Evidence Bundle V1 exporterRedacted, WAL-backed export bundle (bundle_type: axis.evidence_bundle.v1) with optional Ed25519 signingImplemented
PostgreSQL executorExecutes ALLOW decisions through the configured executor with bounded pool and timeoutsVerified
Control PlaneNext.js operator surface; reads live endpoints via server-side proxy; mock mode is explicit demo-onlyImplemented
Native PG wire listener (lab)Disabled-by-default Simple Query listener (AXIS_PGWIRE_ENABLED=false); intercepts Q messages, enforces before forwardExperimental

Intentional read/write split

The pilot integration intentionally sends safe reads directly to PostgreSQL and protected writes through AXIS. This keeps the demo focused on policy-controlled mutation paths; it does not prove universal inspection of every read query. Reads default to ALLOW, writes default to BLOCK, DDL defaults to REQUIRE_APPROVAL.

Control Plane boundary

Trust boundaries

Trusted

AXIS process; local policy files and manifest; local audit WAL; local approval store; the configured PostgreSQL instance; AXIS-to-database forwarding (AXIS is trusted to enforce before forwarding).

Untrusted / verifiable

HTTP body to /query; SQL text; identity fields (actor, app, tenant, role, host, env); approval resolution input. v1 does not authenticate HTTP callers: identity fields are evidence and policy inputs, not verified identity claims.

Local SHA-256 integrity checks detect accidental or simple tampering but do not replace external key management or signed policy distribution. Audit WAL files are trusted for local review but are not an external tamper-proof ledger.

Architectural principles

Documented boundaries

Related: Security Model · Request Lifecycle · Native PG Wire Protocol