Skip to content
Browse documentation

Configuration

Flags, environment variables, and the policy file. There is no `cirvix.toml` — configuration is deliberately a short list rather than a format to learn.

Three things configure Cirvix: command-line flags, environment variables, and the rule set itself. Flags win over environment variables. There is no configuration file format beyond the policy file — a container has to be configurable without a rebuild, and a config file baked into an image is one someone will forget to rotate.

The policy file

cirvix.policy.json is an ordered array of rules, or { rules: [...] }. It is the same file wherever it is read — the CLI, CI, the gateway, and both SDKs evaluate it identically. See the policy schema.

TerminalShell
$ cirvix check --policy cirvix.policy.json --action fs.read --resource .env$ cirvix gateway --policy cirvix.policy.json --servers ~/.cursor/mcp.json

Endpoint environment variables

VariableUsed byMeaning
CIRVIX_API_URLgateway, daemon, why, replayControl-plane base URL. Same as --api
CIRVIX_API_KEYgateway, daemon, why, replayAPI key, cvx_…. Same as --key
NO_COLOR / FORCE_COLORallColour control

Control-plane environment variables

Configuration comes from the environment only.

VariableRequiredDefaultNotes
CIRVIX_JWT_SECRET**yes**—≥32 chars. The process refuses to start without it
CIRVIX_MASTER_KEYfor secrets—≥32 chars. Absent → the secret routes are not served
CIRVIX_DATA./data/cirvix.dbDatabase path
PORT8787
CIRVIX_CORS_ORIGINfor browsersnoneThe console's exact origin. No wildcard mode
CIRVIX_CONSOLE_URLnoneDeep links in alerts; the default SSO redirect base
CIRVIX_SSO_REDIRECT_URISfor SSO<console>/dashboard/sso/callbackComma-separated allowlist
CIRVIX_RATE_LIMIT600Requests/min per credential
CIRVIX_METRICS_TOKENnoneRequires a bearer token on /metrics
CIRVIX_LEAD_TOKENfor lead triagenoneOperator token for GET /v1/leads. Never issued to a tenant; unset → everyone is refused
CIRVIX_ALLOW_PRIVATE_EGRESSunsetPermits outbound requests to private ranges
CIRVIX_BOOTSTRAP_ORGfirst boot—Ignored once any tenant exists
CIRVIX_BOOTSTRAP_EMAILfirst bootowner@example.com
CIRVIX_BOOTSTRAP_PASSWORDfirst boot—

Console environment variables

VariableNotes
NEXT_PUBLIC_CIRVIX_APIControl-plane origin. Inlined at build time **and** compiled into the CSP connect-src — a change needs a rebuild
Two keys are not recoverable
Losing CIRVIX_JWT_SECRET signs everyone out, which is survivable. Losing CIRVIX_MASTER_KEY loses every stored secret permanently — values are sealed under a key derived from it, and there is deliberately no escrow. Back both up wherever you keep other root credentials, and never in the same place as the database.

Fail-closed by construction

There is no fail_open setting. An empty or unparseable rule set denies everything, an unknown condition operator fails closed, and a control-plane outage leaves the last cached rule set enforcing rather than opening the door. That is not configurable, because the configuration that turns it off is the one nobody discovers until it is being used against them.

Edit this page on GitHub
Was this page helpful?