Files
kryptkeeper/env.example
T
bpmforge e0d82a4ed0 Kryptkeeper 1.0.0
First stable release. Notes: docs/release/RELEASE_NOTES_v1.0.0.md
Lab record: docs/release/LIVE_RESULTS_v1.0.0.md
2026-10-19 14:43:23 -04:00

529 lines
25 KiB
Plaintext

# Kryptkeeper — Environment Configuration
# Copy to .env and customize. Configuration is env-only (D-020) — this file is meant to be
# the complete documentation surface for every variable the code reads. Grouped by prefix
# canon: APP_* (hub app/provider config), KRYPTKEEPER_* (product-wide + CLI/agent), then
# per-integration blocks (auth, cloud KMS, notifications, protocols, k8s).
# ============================================================================
# Core / bootstrap
# ============================================================================
# Required: bootstrap auth token. Generate one with `openssl rand -hex 32`.
# The hub refuses to start while this (or the keystore passphrase, signing
# secrets or peppers) still begins with "change-me".
APP_BOOTSTRAP_TOKEN=change-me-generate-with-openssl-rand-hex-32
# Set true to make the raw bootstrap token never authenticate (login sessions still work).
# KRYPTKEEPER_DISABLE_BOOTSTRAP_TOKEN=false
# Auth mode: bootstrap (dev), jwt, oidc
AUTH_MODE=bootstrap
# HTTP listen address is HOST (APP_BIND_ADDR, default 127.0.0.1) + PORT (default 8080);
# the two are joined, so APP_BIND_ADDR takes a host only, never ":8080".
# APP_BIND_ADDR=127.0.0.1
# PORT=8080
# Reverse proxies whose forwarding headers the hub believes, as a
# comma-separated CIDR list. Default EMPTY: no header is trusted and every
# IP-keyed rate limit (login, refresh, SSO, ACME/OCSP/CRL/EST/SCEP/CMP/WSTEP/
# XCEP) buckets by the TCP peer -- which behind a proxy is the proxy itself,
# so ALL users share one bucket. Set it to your proxy's address(es), e.g. the
# compose network's subnet (`docker network inspect <project>_default`) or
# the nginx container's IP/32. When the peer is trusted the client is the
# rightmost X-Forwarded-For entry that is not itself a trusted proxy;
# X-Real-IP is used only when X-Forwarded-For is absent. Your proxy MUST
# append to X-Forwarded-For ($proxy_add_x_forwarded_for in nginx, as the
# shipped nginx.conf does) -- a proxy that forwards the client's header
# unchanged lets that client choose its own bucket. Never list a range that
# untrusted clients can connect from. Restart the hub after changing it.
# APP_TRUSTED_PROXY_CIDRS=
# Memory: the hub needs 512Mi to 2Gi depending on inventory size. Set GOMEMLIMIT
# to about 80% of the container memory limit (for a 2Gi limit, GOMEMLIMIT=1600MiB).
# GOMEMLIMIT=1600MiB
# See KRYPTKEEPER_BASE_URL below for the externally-reachable URL the ACME
# server advertises in its directory/order/challenge URLs -- required when
# fronting the hub with a TLS-terminating reverse proxy (some real ACME
# clients, e.g. lego, refuse a plain-HTTP directory outright).
# Deployment metadata surfaced on /healthz, /readyz, /meta
# APP_ENV=development
# APP_VERSION=
# APP_COMMIT=
# Error response envelope format: legacy (default) or rfc7807
# APP_ERROR_FORMAT=legacy
# Postgres password (for docker compose)
POSTGRES_PASSWORD=changeme
# ============================================================================
# Providers — file (stub), db (database), or a real backend (ca/scanner/delivery)
# ============================================================================
APP_CERTIFICATE_PROVIDER=ca
# Discovery provider: db (persisted inventory, flags, posture, every scan type
# and custom ports; the default), file (read-only dev stub), or scanner (minimal
# in-memory mode: 443 only, ignores scan_type/ports, persists nothing).
APP_DISCOVERY_PROVIDER=db
# Notification provider: delivery (sends via SMTP/Slack/PagerDuty/webhook and
# persists alert rules; the compose default), db (records deliveries, does NOT
# send), file (code default when unset; dev stub). db and file never deliver:
# the renewal scheduler skips alerts under them and audits outcome=skipped.
APP_NOTIFICATION_PROVIDER=delivery
# APP_CA_PROVIDER=file
# APP_TEMPLATE_PROVIDER=file
# APP_USER_PROVIDER=file
# Audit trail store. Unset: "db" when the hub has a core database (every
# APP_CERTIFICATE_PROVIDER=ca install), otherwise "file". Set "file" or "db" to
# force one. The hub refuses to start if the chosen store cannot be opened.
# The file store is append-only JSON Lines at APP_AUDIT_FILE; a legacy
# JSON-array file is converted on first start and kept as <file>.bak.
# APP_AUDIT_PROVIDER=db
# Unset, the summary follows APP_CERTIFICATE_PROVIDER: ca mode counts the core
# DB the issuer writes to; otherwise the file store. Set to pin either (S-68).
# APP_CERTS_SUMMARY_PROVIDER=db
# APP_DASHBOARD_ACTION_PROVIDER=file
# APP_DASHBOARD_ACTION_DEMO=true # file provider only: serve three sample history rows (demos); unset = empty history
# APP_PROTOCOL_PROVIDER=file
# File-backed provider paths (used when the corresponding provider above is "file").
# Unset, each store lives in $KRYPTKEEPER_DATA_DIR (bootstrap-cas.json, bootstrap-templates.json,
# bootstrap-certificates.json, bootstrap-audit.json, certs-summary.json); with no data dir it is
# ./var/<same name>, relative to the working directory. An existing ./var file is kept (with a
# startup warning) until the data dir holds its own copy, so upgrades never strand data.
# APP_CA_FILE=./data/cas.json
# APP_TEMPLATE_FILE=./data/templates.json
# APP_CERTIFICATE_FILE=./data/certificates.json
# APP_AUDIT_FILE=./data/audit.json # default ./var/bootstrap-audit.json; keep on a persistent volume
# APP_CERTS_SUMMARY_FILE=./data/certs_summary.json
# DB-backed provider DSNs (used when the corresponding provider above is "db"; each falls
# back to KRYPTKEEPER_DB_DSN, then DATABASE_URL, then a per-service sqlite file under
# KRYPTKEEPER_DATA_DIR)
# APP_CORE_DB_DSN=
# APP_AUDIT_DB_DSN=
# APP_USER_DB_DSN=
# APP_DISCOVERY_DB_DSN=
# APP_DASHBOARD_DB_DSN=
# APP_NOTIFICATION_DB_DSN=
# APP_CERTS_SUMMARY_DB_DSN=
# ============================================================================
# Kryptkeeper product-wide
# ============================================================================
# Keystore passphrase. REQUIRED by docker-compose.yml and must differ from
# APP_BOOTSTRAP_TOKEN: the token is a network credential, the passphrase
# protects CA private keys at rest. Generate with `openssl rand -hex 32`.
# Upgrading a compose stack that relied on the old default (passphrase ==
# token)? Set this to your current APP_BOOTSTRAP_TOKEN value so the existing
# keystore still decrypts, then rotate both deliberately.
# The "change-me" prefix below is rejected at startup; replace the whole value.
KRYPTKEEPER_KEYSTORE_PASSPHRASE=change-me-generate-with-openssl-rand-hex-32
# CA name / org name (auto-created root CA on first start; ORG_NAME is the root CA's O= and the org name on evidence PDFs)
# KRYPTKEEPER_CA_NAME=My Organization Root CA
# KRYPTKEEPER_ORG_NAME=My Organization
# Creates the default root CA ("Kryptkeeper Root CA", or KRYPTKEEPER_CA_NAME)
# on first start. Without it (and without KRYPTKEEPER_DEFAULT_CA_ID) a fresh
# hub starts in first-run mode with zero CAs so the UI onboarding wizard can
# create the first root; until then the listener serves an ephemeral self-signed certificate and the
# protocol endpoints answer 503. It only acts when no CA exists and a CA-list
# error is fatal rather than treated as "empty", so it is safe to leave set.
KRYPTKEEPER_BOOTSTRAP_CREATE_ROOT=true
# Database mode: sqlite (default), postgres
# KRYPTKEEPER_DB_MODE=sqlite
# Seconds to keep serving after SIGTERM/SIGINT with /readyz returning 503 (/healthz stays 200),
# before the listener closes. 0-120; 0 = close immediately (code default; image and chart use 5).
# Keep the orchestrator's stop timeout above this + 10s. Unrelated to KRYPTKEEPER_SHUTDOWN_DRAIN
# (renewal scheduler's wait for in-flight scans).
# KRYPTKEEPER_READINESS_DRAIN_SECONDS=5
# KRYPTKEEPER_DB_MAX_OPEN_CONNS=3 # postgres: per-store pool cap (about 33 pools per hub)
# KRYPTKEEPER_DB_MAX_IDLE_CONNS=1
# KRYPTKEEPER_DB_DSN=
# DATABASE_URL=
# KRYPTKEEPER_DATA_DIR=./data
# Key backend: software (default), pkcs11, vault, cloudkms-{aws,gcp,azure}
# KRYPTKEEPER_KEY_BACKEND=software
# KRYPTKEEPER_KEYSTORE_DIR=./data/keystore
# Recovery only. By default the hub refuses to start if an active CA has no key
# in the keystore (wrong dir/volume/passphrase). Set true to start anyway; those
# CAs cannot issue or sign CRL/OCSP. Remove once keys are restored.
# KRYPTKEEPER_ALLOW_MISSING_CA_KEYS=false
# Default CA used where a request doesn't name one; default issuance template/policy
# KRYPTKEEPER_DEFAULT_CA_ID=
# KRYPTKEEPER_XCEP_POLICY_ID=
# Hub base URL: the address protocol clients (ACME directory/order/challenge
# URLs) and integration status links (SCEP/XCEP/WSTEP endpoints) use to reach
# this hub. REQUIRED whenever APP_BIND_ADDR is a wildcard (0.0.0.0, ::) or
# this hub is reached from any host other than the one it runs on -- the bind
# address is never a client-reachable URL by itself, and advertising it
# verbatim breaks every ACME client (W19-13, UAT W19-04, 2026-09-10). Must be
# an absolute http(s) URL; a trailing slash is stripped.
# KRYPTKEEPER_BASE_URL=http://localhost:8080
# Signer TTL for in-memory signing sessions (minutes, default 60)
# KEYSTORE_SIGNER_TTL_MINUTES=60
# TLS for the hub's own listener (W19-14). RFC 7030 (EST) mandates TLS, and a
# PKI product must not default to serving its own protocol endpoints in
# cleartext -- so absent any of the three knobs below, the hub self-issues a
# listener certificate from its own default CA (APP_CERTIFICATE_PROVIDER=ca)
# rather than silently falling back to plain HTTP; with no CA engine at all
# it falls back to plain HTTP with a loud startup warning. Exactly one of
# KRYPTKEEPER_TLS_CERT_FILE+KEY_FILE / KRYPTKEEPER_TLS_SELF_ISSUE /
# KRYPTKEEPER_TLS_DISABLE should be set.
#
# Operator-supplied cert/key pair, served as-is (TLS 1.2 floor, HTTP/2 on):
# KRYPTKEEPER_TLS_CERT_FILE=
# KRYPTKEEPER_TLS_KEY_FILE=
#
# Self-issue the listener certificate from the hub's own default CA at
# startup (requires APP_CERTIFICATE_PROVIDER=ca). Persisted under
# KRYPTKEEPER_DATA_DIR/tls/ (key file 0600) and reused across restarts until
# 30 days before its 90-day validity expires, then re-issued.
# KRYPTKEEPER_TLS_SELF_ISSUE=true
#
# SANs (CSV of DNS names/IPs) for a self-issued listener certificate.
# Defaults to localhost,127.0.0.1 plus the host of KRYPTKEEPER_BASE_URL when
# that's set.
# KRYPTKEEPER_TLS_SANS=localhost,127.0.0.1
#
# Explicit opt-in to plain HTTP -- silences the cleartext startup warning.
# KRYPTKEEPER_TLS_DISABLE=true
# ============================================================================
# CLI / agent tooling (kryptkeeper-agent, kryptkeeper-certmanager, kryptkeeper-mcp)
# ============================================================================
# Agent registration (kryptkeeper-agent)
# KRYPTKEEPER_HUB_URL=https://hub.example.com
# KRYPTKEEPER_AGENT_TOKEN=
# KRYPTKEEPER_AGENT_ID=
# KRYPTKEEPER_AGENT_NAME=
# KRYPTKEEPER_AGENT_TYPE=
# KRYPTKEEPER_POLL_INTERVAL=30s
# Hub TLS trust (kryptkeeper-agent, W19-32) -- the Hub self-issues its own
# TLS listener certificate by default (APP_CERTIFICATE_PROVIDER=ca); set one
# of these so the agent can verify it instead of only public CAs. Used for
# every Hub call: register/heartbeat/inventory/tasks/renewal-result and the
# ACME renewer's directory/order/challenge calls. Unset means system roots
# (unchanged behaviour). There is no skip-verify option -- an agent that can
# be told to skip verification can be pointed at a fake hub.
# KRYPTKEEPER_HUB_CA_CERT=
# KRYPTKEEPER_HUB_CA_CERT_FILE=
# KRYPTKEEPER_SCAN_PATHS=
# KRYPTKEEPER_CONFIG_PATHS=
# KRYPTKEEPER_WEB_ROOT=
# Delivery plugins (W20-19/W20-20, D-113..D-120): community certificate
# delivery targets as sandboxed WebAssembly modules, managed at
# /api/v1/delivery-plugins. On by default when the hub has a database.
# "off" is the kill switch: no plugin loads and plugin targets fail.
# KRYPTKEEPER_DELIVERY_PLUGINS=off
# SCEP (RFC 8894), W20-16: enrollment uses one-time challenges, each minted
# for one device's names with POST /api/v1/scep/challenges (pki-admin or
# pki-operator). The certificate carries the challenge's names, never the
# CSR's. Needs the hub database. KRYPTKEEPER_SCEP_CHALLENGE (one static
# shared challenge) is no longer supported: if it is set, SCEP stays off.
# KRYPTKEEPER_SCEP_ENABLED=true
# W19-15: the CA SCEP issues from and decrypts PKIOperation envelopes with.
# Must hold an RSA key (SCEP's PKCS#7 EnvelopedData has no EC recipient
# option) -- unset falls back to the default CA only if it is RSA; SCEP
# stays disabled (logged) rather than silently provisioning one.
# KRYPTKEEPER_SCEP_CA_ID=
# CMP (RFC 4210/6712) -- RFC 4210 section 5.1.3.1 PasswordBasedMac shared
# secret + reference (senderKID). Required to enable /cmp; unset disables it.
# openssl cmp: -secret pass:<KRYPTKEEPER_CMP_SECRET> -ref <KRYPTKEEPER_CMP_REFERENCE>
# KRYPTKEEPER_CMP_SECRET=
# KRYPTKEEPER_CMP_REFERENCE=
# Template that decides whether CMP enrollment needs approval (W26-08). When it
# names a template with require_approval, ir/cr/kur answer status "waiting" and
# the client polls with pollReq until an approver decides the queued
# "cmp_enroll" pending action. Unset = issue immediately. Waiting transactions
# are in memory (24h): a restart makes a later pollReq fail "unknown transaction".
# KRYPTKEEPER_CMP_TEMPLATE=
# cert-manager external issuer (kryptkeeper-certmanager)
# KRYPTKEEPER_API_TOKEN=
# KRYPTKEEPER_CA_ID=
# KRYPTKEEPER_TEMPLATE_ID=
# KRYPTKEEPER_NAMESPACES=
# MCP server auth token (kryptkeeper-mcp)
# KRYPTKEEPER_MCP_TOKEN=
# MCP http transport (KRYPTKEEPER_MCP_TRANSPORT=http): bearer token (>=32 chars) is REQUIRED
# KRYPTKEEPER_MCP_HTTP_TOKEN=
# KRYPTKEEPER_MCP_ALLOWED_HOSTS=
# KRYPTKEEPER_MCP_ALLOWED_ORIGINS=
# ============================================================================
# Auth: JWT (HS256) and OIDC
# ============================================================================
# JWT_HS256 mode (secret must be at least 32 bytes: openssl rand -hex 32)
# APP_JWT_HS256_SECRET=
# APP_JWT_ISSUER=
# APP_JWT_AUDIENCE=
# APP_AUTH_ACCESS_TTL_SEC=900
# APP_AUTH_REFRESH_TTL_SEC=604800
# OIDC mode (APP_OIDC_ISSUER and APP_OIDC_AUDIENCE are both required)
# APP_OIDC_DISCOVERY_URL=
# APP_OIDC_ISSUER=
# APP_OIDC_AUDIENCE=
# APP_OIDC_JWKS_JSON=
# APP_OIDC_JWKS_TTL_SEC=3600
# APP_OIDC_HTTP_TIMEOUT_SEC=10
# OIDC browser login (SSO): the callback is bound to the browser that started
# it (a short-lived HttpOnly flow cookie plus an ID-token nonce). A first
# login that resolves the account by the ID token's email requires
# email_verified=true; an IdP that omits the claim needs its accounts linked
# beforehand by (issuer, sub). APP_USER_PROVIDER=file has no link store, so
# every OIDC login there needs email_verified=true. An unknown key id in a
# bearer token refetches the JWKS at most once per 30 seconds.
# Per-source ceiling (per minute) on POST /api/v1/spiffe/workload-svid, which
# takes no principal auth. Default 120.
# API_RATE_LIMIT_SPIFFE_SVID_PER_MIN=120
# Role for jwt/oidc bearer tokens. Default is read-only "viewer". The first
# pair in the ordered map whose claim_value appears in the claim wins.
# APP_AUTH_ROLE_CLAIM=groups
# APP_AUTH_ROLE_MAP_JSON=[{"claim_value":"kk-issuers","role":"service-account"}]
# Static login credential (dev/demo login mode)
# APP_AUTH_LOGIN_ENABLED=false
# APP_AUTH_LOGIN_ACTIVE=true
# APP_AUTH_LOGIN_EMAIL=
# APP_AUTH_LOGIN_PASSWORD_HASH is an Argon2id PHC string. Make one with
# printf '%s\n' "$PASSWORD" | APP_AUTH_LOGIN_PASSWORD_PEPPER=... kryptkeeper --hash-password
# A legacy hex HMAC-SHA256 value still verifies and is upgraded in memory on
# the first successful login (the hub logs a warning; the env value itself is
# yours to replace).
# APP_AUTH_LOGIN_PASSWORD_HASH=
# APP_AUTH_LOGIN_PASSWORD_PEPPER=
# APP_AUTH_LOGIN_ROLE=
# APP_AUTH_LOGIN_SUBJECT=
# APP_AUTH_LOGIN_SIGNING_SECRET= (at least 32 bytes)
# APP_BOOTSTRAP_LOGIN_EMAIL=
# APP_BOOTSTRAP_LOGIN_PASSWORD_HASH=
# SAML SSO: the ACS only accepts a response whose InResponseTo names an
# AuthnRequest this hub issued (SP-initiated login), and never accepts the
# same assertion ID twice. Both tables are in memory and per process: a
# restart forgets them and replicas do not share them, so keep the login round
# trip on one replica. IdP-initiated (unsolicited) responses are refused
# unless you opt in; only do so if your IdP cannot start from the hub's
# /api/v1/auth/saml/login, because they cannot be bound to a request.
# APP_SAML_ALLOW_IDP_INITIATED=false
# API keys
# APP_API_KEY_AUTH_ENABLED=false
# APP_API_KEYS_JSON=
# APP_API_KEY_PEPPER=
# Multi-tenancy (default OFF — see docs/design/TENANCY_POSTURE.md for current enforcement scope)
# MULTI_TENANCY=false
# Tenant isolation is enforced as of v0.10 (verified by the tenant-idor suite).
# Rollback switch: "enforce" restores the v0.9 start-up refusal, which then
# also needs KRYPTKEEPER_MULTI_TENANCY_EXPERIMENTAL=accept-risk to start.
# KRYPTKEEPER_MULTI_TENANCY_GATE=
# KRYPTKEEPER_MULTI_TENANCY_EXPERIMENTAL=
# W3-01: identity-bound tenant claim name for JWT/OIDC principals (no
# standard claim exists across IdPs — tenant/tid/org all appear in the wild).
# A token missing this claim (or a non-string value) resolves to the default
# tenant, not an error — deploying OIDC multi-tenancy requires the IdP to
# actually emit this claim. API keys bind their tenant at creation instead
# (POST /api/v1/api-keys "tenant" field), no claim involved.
# APP_AUTH_TENANT_CLAIM=tenant
# ============================================================================
# Key backends: PKCS#11 / HSM, HashiCorp Vault, cloud KMS
# ============================================================================
# PKCS#11 / HSM (KRYPTKEEPER_KEY_BACKEND=pkcs11)
# KRYPTKEEPER_PKCS11_LIB=/usr/lib/softhsm/libsofthsm2.so
# KRYPTKEEPER_PKCS11_SLOT=0
# KRYPTKEEPER_PKCS11_PIN=
# KRYPTKEEPER_PKCS11_TOKEN_LABEL=
# HashiCorp Vault Transit (KRYPTKEEPER_KEY_BACKEND=vault)
# VAULT_ADDR=https://vault.example.com:8200
# VAULT_TOKEN=
# VAULT_ROLE_ID=
# VAULT_SECRET_ID=
# VAULT_NAMESPACE=
# VAULT_TRANSIT_MOUNT=transit
# AWS KMS (KRYPTKEEPER_KEY_BACKEND=cloudkms-aws)
# AWS_REGION=us-east-1
# AWS_DEFAULT_REGION=us-east-1
# AWS_ENDPOINT_URL=
# Extra tags/labels stamped on every hub-created cloud key (JSON object; the
# kryptkeeper* prefix is reserved). See docs/ops/CLOUD_KMS.md.
# KRYPTKEEPER_KMS_TAGS={"team":"pki"}
# Azure Key Vault (KRYPTKEEPER_KEY_BACKEND=cloudkms-azure)
# AZURE_TENANT_ID=
# AZURE_CLIENT_ID=
# AZURE_CLIENT_SECRET=
# AZURE_KEYVAULT_URL=
# AZURE_KEYVAULT_API_VERSION=7.4
# CA keys are HSM-backed (EC-HSM/RSA-HSM, Premium vault or Managed HSM) by default.
# KRYPTKEEPER_AZURE_KEY_HSM=true
# GCP Cloud KMS (KRYPTKEEPER_KEY_BACKEND=cloudkms-gcp) and GCP Certificate Manager inventory
# GCP_PROJECT_ID=
# GCP_REGION=
# KRYPTKEEPER_GCP_PROJECT=
# KRYPTKEEPER_GCP_LOCATION=
# KRYPTKEEPER_GCP_KEYRING=
# CA keys are created with protection level HSM by default; hsm | software.
# KRYPTKEEPER_GCP_KMS_PROTECTION=hsm
# GOOGLE_ACCESS_TOKEN=
# ============================================================================
# Notification channels + SIEM
# ============================================================================
# SMTP_HOST=smtp.example.com
# SMTP_PORT=587
# SMTP_FROM=alerts@example.com
# SMTP_USERNAME=
# SMTP_PASSWORD=
# SLACK_WEBHOOK_URL=https://hooks.slack.com/services/...
# PAGERDUTY_ROUTING_KEY=your-routing-key
# KRYPTKEEPER_PAGERDUTY_EVENTS_URL overrides the PagerDuty Events API v2
# endpoint (default https://events.pagerduty.com/v2/enqueue) -- W19-27. Only
# needed to point delivery-mode PagerDuty at a local test receiver; leave
# unset in production.
# KRYPTKEEPER_PAGERDUTY_EVENTS_URL=
# SIEM_WEBHOOK_URL=
# SIEM_WEBHOOK_TOKEN=
# SIEM_SYSLOG_ADDR=
# SIEM_SYSLOG_PROTO=udp
# SIEM_FORMAT selects the wire format for both webhook and syslog SIEM
# output: "json" (default) or "cef" (ArcSight Common Event Format, W19-27).
# SIEM_FORMAT=json
# Every audit event is forwarded by default. To forward only some, list audit
# actions (exact, or a prefix like "key.*"), comma-separated:
# KRYPTKEEPER_SIEM_ACTIONS=certificate.issue,certificate.revoke,auth.login_failed,key.*
# ============================================================================
# Scheduling / thresholds
# ============================================================================
# RENEWAL_POLL_HOURS=6
# RENEWAL_POLL_MINUTES=15 # sub-hour scan cadence; wins over RENEWAL_POLL_HOURS
# RENEWAL_THRESHOLD_DAYS=30
# Most notification-rule alerts one renewal scan processes; the rest roll to the next scan.
# KRYPTKEEPER_RENEWAL_RULE_SEND_CAP=500
# EVIDENCE_POLL_HOURS=24
# POSTURE_SNAPSHOT_HOURS=24
# POSTURE_RETENTION_DAYS=400 # snapshot history kept; values below 400 abort startup
# ============================================================================
# Protocol enablement (ACME, EST, SCEP, OCSP, CRL)
# Each protocol reads ENABLED (bool), and readiness/conformance are set by the file
# provider for dashboards/tests: HEALTHY, LAST_CHECKED_AT, CONFORMANCE_STATE,
# CONFORMANCE_RATE, CONFORMANCE_LAST_RUN_AT (suffix each with the protocol name).
# ============================================================================
# KRYPTKEEPER_OCSP_MAX_AGE=4h # Cache-Control max-age on OCSP responses; 14400 seconds by default (US-047). Never longer than the response's remaining validity. 0 disables client caching.
# KRYPTKEEPER_CRL_DELTA_INTERVAL=15m # Enables delta CRLs (opt-in): validity of each delta, served at /crl/{ca}/delta.crl; full CRLs then carry a Freshest CRL pointer. Unset or 0 = off.
# KRYPTKEEPER_CRL_SHARDS=8 # N>1 partitions each CA's CRL into N shards by serial range (critical Issuing Distribution Point), served at /crl/{ca}/s{i}.crl; newly issued leaves point at their shard. /crl/{ca}.crl stays the full CRL. Changing N later orphans old leaves' shard URLs (they stay covered only by the full CRL). Mutually exclusive with KRYPTKEEPER_CRL_DELTA_INTERVAL (shards win). Unset = off.
# APP_PROTOCOL_ACME_ENABLED=true
# APP_PROTOCOL_ACME_HEALTHY=true
# APP_PROTOCOL_ACME_LAST_CHECKED_AT=
# APP_PROTOCOL_ACME_CONFORMANCE_STATE=
# APP_PROTOCOL_ACME_CONFORMANCE_RATE=100
# APP_PROTOCOL_ACME_CONFORMANCE_LAST_RUN_AT=
# APP_PROTOCOL_EST_ENABLED=true
# APP_PROTOCOL_EST_HEALTHY=true
# APP_PROTOCOL_EST_LAST_CHECKED_AT=
# APP_PROTOCOL_EST_CONFORMANCE_STATE=
# APP_PROTOCOL_EST_CONFORMANCE_RATE=100
# APP_PROTOCOL_EST_CONFORMANCE_LAST_RUN_AT=
# APP_PROTOCOL_SCEP_ENABLED=true
# APP_PROTOCOL_SCEP_HEALTHY=true
# APP_PROTOCOL_SCEP_LAST_CHECKED_AT=
# APP_PROTOCOL_SCEP_CONFORMANCE_STATE=
# APP_PROTOCOL_SCEP_CONFORMANCE_RATE=100
# APP_PROTOCOL_SCEP_CONFORMANCE_LAST_RUN_AT=
# APP_PROTOCOL_OCSP_ENABLED=true
# APP_PROTOCOL_OCSP_HEALTHY=true
# APP_PROTOCOL_OCSP_LAST_CHECKED_AT=
# APP_PROTOCOL_OCSP_CONFORMANCE_STATE=
# APP_PROTOCOL_OCSP_CONFORMANCE_RATE=100
# APP_PROTOCOL_OCSP_CONFORMANCE_LAST_RUN_AT=
# APP_PROTOCOL_CRL_ENABLED=true
# APP_PROTOCOL_CRL_HEALTHY=true
# APP_PROTOCOL_CRL_LAST_CHECKED_AT=
# APP_PROTOCOL_CRL_CONFORMANCE_STATE=
# APP_PROTOCOL_CRL_CONFORMANCE_RATE=100
# APP_PROTOCOL_CRL_CONFORMANCE_LAST_RUN_AT=
# Dashboard/discovery summary counters surfaced when no live data source is wired
# APP_DISCOVERY_ACTIVE_SCAN_JOBS=0
# APP_DISCOVERY_DISCOVERED_ENDPOINTS=0
# APP_DISCOVERY_MAPPED_CERTIFICATES=0
# APP_DISCOVERY_RISKY_ENDPOINTS=0
# APP_NOTIFICATIONS_PENDING=0
# APP_NOTIFICATIONS_FAILURES_24H=0
# APP_NOTIFICATIONS_ESCALATIONS=0
# ============================================================================
# SPIFFE / workload identity
# ============================================================================
# SPIFFE_TRUST_DOMAIN=example.org
# SPIFFE_SIGNING_CA_ID=
# SPIFFE_SVID_TTL=1h
# ============================================================================
# Kubernetes (cert-manager issuer, in-cluster discovery)
# KUBERNETES_SERVICE_HOST/PORT are injected automatically by Kubernetes — do not set
# manually; they're documented here only because the code reads them.
# ============================================================================
# KRYPTKEEPER_K8S_API_URL=
# KRYPTKEEPER_K8S_NAMESPACE=
# KRYPTKEEPER_K8S_TOKEN=
# KRYPTKEEPER_K8S_TOKEN_FILE=/var/run/secrets/kubernetes.io/serviceaccount/token
# KRYPTKEEPER_K8S_CA_CERT=
# KRYPTKEEPER_K8S_CA_CERT_FILE=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt
# KRYPTKEEPER_K8S_SKIP_VERIFY was removed; private-CA clusters set the CA bundle above
# KUBERNETES_SERVICE_HOST=
# KUBERNETES_SERVICE_PORT=
# PORT=8080
# ============================================================================
# Outbound egress guard and discovery limits (FG-8)
# ============================================================================
# Notification webhooks (generic/Slack/PagerDuty), inventory sources and the ACME
# upstream connector always refuse link-local/metadata (169.254.0.0/16, fe80::/10),
# unspecified, multicast and loopback destinations, and cross-host redirects.
# RFC1918/ULA/CGNAT space is reachable by default (internal chat servers, vendor
# appliances). Set true if the hub only talks to public SaaS; it then refuses it too.
# KRYPTKEEPER_EGRESS_DENY_PRIVATE=false
# Extra CIDRs/IPs discovery scans must never target (comma list), added to the always-on
# link-local deny (169.254.0.0/16, fe80::/10). Literal IPs/CIDRs only; names are not resolved.
# KRYPTKEEPER_DISCOVERY_DENY_CIDRS=
# Max expanded probes (addresses x ports) in one scan; larger requests get a 400.
# KRYPTKEEPER_DISCOVERY_MAX_TARGETS=65536