Sections

server

Core server settings — listen address, workers, and request limits.

KeyTypeDefaultDescription
listenstringListen address and port for the EST HTTPS endpoint
admin_listenstringnoneAdmin API bind address (use localhost or internal network)
workersintegerCPU coresNumber of worker threads
max_body_sizeinteger1048576Request body size limit in bytes (1 MiB)
shutdown_timeoutinteger30Graceful shutdown timeout in seconds

Example

[server] listen = "0.0.0.0:8443" admin_listen = "127.0.0.1:9443" workers = 4

tls

TLS configuration for the EST HTTPS endpoint. The server certificate must include the id-kp-cmcRA extended key usage (RFC 7030 §3.3.2).

KeyTypeDefaultDescription
certpathServer certificate (PEM)
keypathServer private key (PEM)
min_versionstring"1.2"Minimum TLS version (1.2 or 1.3)
cipher_suitesarrayAEAD-onlyAllowed TLS 1.2 cipher suites

tls.client_auth

KeyTypeDefaultDescription
trust_anchorspathCA bundle for mTLS client certificate verification
modestring"optional"required, optional, or none

Example

[tls] cert = "/etc/kipuka/tls/server.pem" key = "/etc/kipuka/tls/server.key" [tls.client_auth] trust_anchors = "/etc/kipuka/tls/client-ca-bundle.pem" mode = "optional"

db

Database backend configuration. Supports SQLite, PostgreSQL, and MariaDB via the sqlx Any driver.

KeyTypeDefaultDescription
urlstringDatabase connection URL
max_connectionsinteger10Connection pool size
connect_timeoutinteger5Connection timeout in seconds
auto_migrateboolfalseRun migrations on startup (use kipuka migrate in production)

Connection URL formats

# SQLite url = "sqlite:///var/lib/kipuka/kipuka.db" # PostgreSQL url = "postgres://user:pass@host:5432/kipuka" # MariaDB url = "mysql://user:pass@host:3306/kipuka"

ca

Certificate authority definitions. Each [[ca]] block defines a CA that can issue certificates. Reference CAs by id in EST labels and HA groups.

KeyTypeDefaultDescription
idstringUnique identifier (referenced by labels and HA groups)
namestringDisplay name (logs and admin API)
certpathCA certificate (PEM)
keypathnoneCA private key (PEM). Omit if key is in an HSM
chainpathnoneFull chain up to (not including) root
validity_daysinteger398Default certificate validity period
max_validity_daysinteger398Maximum allowed validity (CA/B Forum BR limit)
default_key_usagearraysee belowKey usage constraints
default_ext_key_usagearraysee belowExtended key usage constraints
hsm_slotstringnoneHSM slot label (omit for file-based keys)

Example

[[ca]] id = "rsa-ca" name = "RSA Issuing CA" cert = "/etc/kipuka/ca/rsa-ca.pem" key = "/etc/kipuka/ca/rsa-ca.key" validity_days = 398

est

EST protocol settings and label-based certificate profile routing.

KeyTypeDefaultDescription
base_pathstring"/.well-known/est"Base path for EST endpoints
cacertsbooltrueEnable /cacerts
simpleenrollbooltrueEnable /simpleenroll
simplereenrollbooltrueEnable /simplereenroll
fullcmcbooltrueEnable /fullcmc
serverkeygenbooltrueEnable /serverkeygen
csrattrsbooltrueEnable /csrattrs
retry_afterinteger120Retry-After header value (seconds)

est.label

KeyTypeDefaultDescription
namestringLabel name (appears in URL path)
ca_idstringCA to use for this label
allowed_key_typesarrayallAllowed key types (e.g. "rsa:2048", "ec:p256")
required_ext_key_usagearraynoneRequired EKU OIDs
max_validity_daysintegerCA defaultMaximum validity for this label
require_sanboolfalseRequire Subject Alternative Name
subject_patternstringnoneRestrict Subject DN pattern (regex)

hsm

PKCS#11 HSM integration for protecting CA private keys. Only required if any [[ca]] block uses hsm_slot.

KeyTypeDefaultDescription
librarypathPKCS#11 shared library path
slotinteger0PKCS#11 slot number
token_labelstringnonePKCS#11 token label (alternative to slot)
pinstringnoneHSM PIN (not recommended for production)
pin_envstringnoneEnvironment variable containing PIN (preferred)
pin_filepathnoneFile containing PIN (must be mode 0400)

Vendor library paths

# Entrust nShield library = "/opt/nfast/toolkits/pkcs11/libcknfast.so" # Utimaco CryptoServer library = "/usr/lib/libcs_pkcs11_R3.so" # Kryoptic (dev/test) library = "/usr/lib/libkryoptic_pkcs11.so" # Thales Luna (CSP11) library = "/usr/safenet/lunaclient/lib/libCryptoki2_64.so"

otp

One-time password authentication for initial certificate enrollment.

KeyTypeDefaultDescription
enabledboolfalseEnable OTP authentication
token_lengthinteger24OTP token length (≥16 for NIAP)
default_ttlduration"24h"Default OTP validity period
max_usesinteger1Maximum uses per OTP token
hash_algorithmstring"argon2id"Hash algorithm (argon2id, bcrypt, sha256-hmac)
max_failuresinteger5Max failed attempts per IP per window
failure_windowduration"15m"Rate limiting window
lockout_durationduration"30m"Lockout duration after max failures

audit

NIAP FAU_GEN.1 compliant audit logging. Events are always stored in the database; additional destinations can be configured.

KeyTypeDefaultDescription
filepathnoneAppend-only audit log file (JSON lines)
syslogstringnoneSyslog destination URI (RFC 5424)
syslog_facilitystring"local0"Syslog facility
eventsarray["all"]Events to log: all, auth, enroll, revoke, admin, config, startup, error
include_cert_databoolfalseInclude full certificate DER in enrollment events

ha

High availability failover across multiple CA backends.

KeyTypeDefaultDescription
enabledboolfalseEnable HA failover
strategystring"active-passive"active-passive, round-robin, or weighted
check_intervalduration"30s"Health check interval
failure_thresholdinteger3Consecutive failures to mark unhealthy
recovery_timeoutduration"60s"Delay before retrying failed CA
check_timeoutduration"10s"Health check timeout per CA

ha.group

KeyTypeDefaultDescription
namestringHA group name
ca_idsarrayList of CA IDs in this group
strategystringglobalOverride strategy for this group

admin

Administrative API for OTP provisioning, CA management, and server health.

KeyTypeDefaultDescription
enabledboolfalseEnable the admin API
authstring"mtls"Auth method: mtls, bearer, or both
trust_anchorspathnoneAdmin client certificate CA bundle
bearer_token_envstringnoneEnv var containing bearer token