Skip to content
Talk to our solutions team

Configuration Files

A developer or operator touches four kinds of files.

/etc/config/config.yaml, selected with -f. Chassis identity keys plus storage:, per-hive sources:, auth:, and audit:. Development example:

service: config
version: 2.0.0-dev
sid: dev-local
host: ""
port: "7123"
zerotrust: false
storage:
mode: bbolt
bbolt:
path: /var/lib/config
hives:
cluster:
sources:
- name: dev-cluster
backend: localdir
path: /etc/config/data
owns: ["**"]
priority: 0
writable: true

Production highlights:

storage:
mode: etcd
etcd:
endpoints: [https://etcd-1:2379, https://etcd-2:2379, https://etcd-3:2379]
tls: # every etcd connection: snapshots, leases, leader election
ca_file: /etc/config/etcd-ca.pem
cert_file: /etc/config/etcd-client.pem
key_file: /etc/config/etcd-client.key
leader_election:
enabled: true
ttl: 15s
hives:
tenant:
sources:
- name: tenant-git
backend: git
url: https://git.example.com/platform/tenant-config.git
branch: main
owns: ["acme:**"]
priority: 0
auth_username: x-access-token
auth_token: ${env:GIT_TOKEN}
- name: break-glass
backend: postgres
dsn: ${env:PG_DSN}
table: infinity_config_overrides
owns: ["acme:**"] # the tenant hive refuses a source that owns ["**"]
priority: 100
writable: true
alert_on_write: pagerduty:break-glass

Source descriptor fields: name, backend (fs|localdir|git|etcd|postgres), url/path/dsn/endpoints, branch, table, owns (colon-separated path globs: "**", "prefix:**", exact), priority, writable, alert_on_write, poll_interval, local_open, auth_*, tls (etcd and git). An etcd source with auth enabled takes its user as auth_username and the password as auth_token.

config.svc reads its own blocks, storage, hives, auth, audit and revert, strictly. A key it does not have refuses the boot, named by its dotted path (auth.jwt.jwks_url: config.svc reads no such key), and so does a hive under hives: other than cluster and tenant (hives.<name>: the registry has no such hive). The other top-level keys belong to the chassis.

The connections config.svc dials take client TLS as ca_file, cert_file, key_file and server_name, each optional: storage.etcd.tls for every etcd connection, audit.tls for the audit endpoint, and an etcd or git source’s own tls. With no ca_file the server is verified against the system roots. A git remote is verified by its URL’s host, so a git source’s tls takes no server_name, and another backend’s tls refuses the boot.

Bootstrap changes require a restart. There is no live reload of the bootstrap itself.

This section is the format reference. For hands-on, copy-pasteable walkthroughs of each backend (fs single-file/tree, git local/remote, postgres, mixed priorities), see End-to-End Testing → Part A.

The one authoring format for fs, localdir, and git sources. Every *.yaml / *.yml anywhere under the source root is an independent document; folders and filenames carry no meaning. The only reserved keys are path: (colon-separated; "" = hive root) and match: (instance cohort labels):

hives:
cluster:
- path: ""
region: eu
- path: dc1:main:iam
log:
level: info
- path: dc1:main:iam
match: {ring: canary}
log:
level: debug
tenant:
- path: acme:prod:forge:tenant-a
dbpools:
main:
dsn: vault://tenant-a-dsn

localdir is the writable variant of the same format: server-side writes rewrite the entry in its owning file (comments are not preserved). Because the format is identical, a localdir tree can be pushed to git unchanged.

Each hive has an embedded CUE schema; validation mode is per hive: strict (invalid → no snapshot / 422 on write), warn, or off, operator-overridable in the bootstrap. Escape hatches for unschema’d customer data: metadata, annotations, extensions, and x_kisai_* keys are always allowed.

Fetch the schema and a canonical example at runtime:

Terminal window
kis config schema cluster
curl -H "X-Api-Key: $KEY" http://localhost:7123/hives/cluster/_meta/example

File-backed keys for machine access, referenced from auth: in the bootstrap:

Terminal window
config.svc config generate apikeys > /etc/config/apikeys.yaml

JWT bearer auth validates against a JWKS endpoint (auth.jwt.jwks_uri, typically the IAM service’s /.well-known/jwks.json), and mTLS client certificates are accepted where zerotrust is on. auth.mtls narrows which certificates authenticate: one must chain to ca_file and carry a CommonName in allowed_cns and a SAN in allowed_sans (DNS name, URI such as a SPIFFE ID, IP or email, compared exactly). A SPIFFE ID in allowed_sans may be a pattern: * stands for one path segment and a final ** for the rest, so spiffe://kis.ai/*/*/gateway/* is any gateway instance. The trust domain is always exact, and any other wildcard refuses the boot. Each key that is set applies, and an unreadable ca_file refuses the boot. Authorization is a per-hive expression policy over (subject, action, hive, path).