Skip to content

Configuration Reference

Every Kessel service is configured through a combination of YAML config files, environment variables, and CLI flags. This page lists all available parameters for each service.

Configuration is loaded from .inventory-api.yaml, searched first in the current working directory, then in the home directory. You can set an explicit path with the --config CLI flag or the INVENTORY_API_CONFIG environment variable. All parameters are also available as CLI flags. Environment variables use an INVENTORY_API_ prefix, with dots and hyphens replaced by underscores.

ParameterTypeDefaultDescription
server.idstringhostnameServer identifier
server.namestringkessel-inventory-apiServer name
server.public_urlstringhttp://localhost:8000Public URL where the server is reachable
server.read-onlybooleanfalseStart in read-only mode, blocking write operations
ParameterTypeDefaultDescription
server.http.addressstring0.0.0.0:8000Listen address
server.http.timeout-secondsint300Request timeout in seconds
server.http.certfilestringTLS certificate file
server.http.keyfilestringTLS private key file
server.http.client-ca-filestringCA file for client certificate validation
server.http.sni-servernamestringSNI server name for client certs
server.http.certoptint3Client auth type (0-4, maps to Go’s crypto/tls.ClientAuthType)
ParameterTypeDefaultDescription
server.grpc.addressstring0.0.0.0:9000Listen address
server.grpc.timeout-secondsint300Request timeout in seconds
server.grpc.certfilestringTLS certificate file
server.grpc.keyfilestringTLS private key file
server.grpc.client-ca-filestringCA file for client certificate validation
server.grpc.sni-servernamestringSNI server name for client certs
server.grpc.certoptint3Client auth type (0-4)
ParameterTypeDefaultDescription
server.pprof.enabledbooleanfalseEnable pprof profiling
server.pprof.portstring5000pprof server port
server.pprof.addrstring0.0.0.0pprof bind address
ParameterTypeDefaultDescription
storage.databaseenumsqlite3Database backend: sqlite3 or postgres
storage.max-serialization-retriesint10Max retries for serialized transactions
storage.outbox-modeenumtableOutbox publishing mode: table (outbox_events table) or wal (pg_logical_emit_message, requires postgres)
ParameterTypeDefaultDescription
storage.postgres.hoststringlocalhostDatabase host
storage.postgres.portstring5432Database port
storage.postgres.dbnamestringDatabase name (defaults to username if unset)
storage.postgres.userstringUsername
storage.postgres.passwordstringPassword
storage.postgres.sslmodeenumSSL mode: disable, allow, prefer, require, verify-ca, verify-full
storage.postgres.sslrootcertstringSSL root certificate path (PostgreSQL defaults to ~/.postgresql/root.crt if unset)
ParameterTypeDefaultDescription
storage.sqlite3.dsnstringinventory.dbDatabase file path or connection string

The Inventory API uses a chain-based authenticator. Each entry in the chain is tried in order until one matches.

ParameterTypeDefaultDescription
authn.authenticator.typestringAuthenticator type (e.g., first_match)
authn.authenticator.chain[].typeenumEntry type: oidc, guest, allow-unauthenticated, x-rh-identity
authn.authenticator.chain[].enablebooleantrueEnable this authenticator
authn.authenticator.chain[].transport.httpbooleantrueApply to HTTP
authn.authenticator.chain[].transport.grpcbooleantrueApply to gRPC
authn.authenticator.chain[].configmapAuthenticator-specific configuration

For oidc chain entries, the config map accepts:

KeyTypeDefaultDescription
authn-server-urlstringAuthorization server URL
client-idstringClient ID
principal-user-domainstringDomain qualifier for Kessel principal IDs
insecure-clientbooleanfalseSkip TLS cert validation
skip-client-id-checkbooleanfalseSkip clientId claim validation
enforce-aud-checkbooleanfalseEnforce audience claim check
skip-issuer-checkbooleanfalseSkip issuer validation (testing only)
grpc-endpointsstring[]Specific gRPC endpoints this authenticator applies to (omit for all)
ParameterTypeDefaultDescription
authz.implenumallow-allAuthorization backend: allow-all or kessel
authz.kessel.urlstringRelations API gRPC endpoint
authz.kessel.insecure-clientbooleanfalseSkip TLS cert verification
authz.kessel.enable-oidc-authbooleantrueEnable OIDC auth to Relations API
authz.kessel.sa-client-idstringService account client ID
authz.kessel.sa-client-secretstringService account secret
authz.kessel.sso-token-endpointstringSSO token endpoint
ParameterTypeDefaultDescription
consumer.enabledbooleantrueEnable the embedded Kafka consumer
consumer.bootstrap-serversstring[]Kafka broker addresses
consumer.consumer-group-idstringinventory-consumerConsumer group name
consumer.topicstringoutbox.event.kessel.tuplesKafka topic
consumer.commit-moduloint10Commit offsets every N messages
consumer.session-timeoutstring45000Session timeout (ms)
consumer.heartbeat-intervalstring3000Heartbeat interval (ms)
consumer.max-poll-intervalstring300000Max poll interval (ms)
consumer.enable-auto-commitstringfalseAuto-commit offsets
consumer.auto-offset-resetstringearliestOffset reset policy: earliest or latest
consumer.statistics-interval-msstring60000librdkafka stats interval (ms)
consumer.debugstringComma-separated librdkafka debug contexts
consumer.read-after-write-enabledbooleantrueEnable read-after-write consistency
consumer.read-after-write-allowliststring[][]Services requiring read-after-write (empty = all)
ParameterTypeDefaultDescription
consumer.auth.enabledbooleantrueEnable Kafka auth
consumer.auth.security-protocolstringProtocol: PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL
consumer.auth.sasl-mechanismstringMechanism: PLAIN, SCRAM-SHA-256, SCRAM-SHA-512
consumer.auth.sasl-usernamestringSASL username
consumer.auth.sasl-passwordstringSASL password
consumer.auth.ca-cert-locationstringKafka CA certificate path
ParameterTypeDefaultDescription
consumer.retry-options.consumer-max-retriesint2Max retries before killing consumer (-1 for unlimited)
consumer.retry-options.operation-max-retriesint3Max retries per operation
consumer.retry-options.backoff-factorint5Exponential backoff multiplier
consumer.retry-options.max-backoff-secondsint30Max backoff cap in seconds
ParameterTypeDefaultDescription
consistency.read-after-write-enabledbooleantrueEnable read-after-write consistency
consistency.read-after-write-allowliststring[][]Services requiring read-after-write
consistency.default-to-at-least-as-acknowledgedbooleantrueDefault consistency for Check operations
consistency.idempotency-check-enabledbooleantrueEnable transaction ID idempotency checks
ParameterTypeDefaultDescription
schema.repositoryenumin-memorySchema repository type (CLI flag: --schema.schemas)
schema.in-memory.TypeenumemptyIn-memory type: empty, json, or dir
schema.in-memory.PathstringPath to schema data (required for json or dir)

In YAML config, use the redhatRbacSelfSubjectStrategy key. CLI flags use --selfsubjectstrategy.redhat-rbac.* instead.

Parameter (YAML)TypeDefaultDescription
selfsubjectstrategy.redhatRbacSelfSubjectStrategy.enabledbooleanfalseEnable Red Hat RBAC self-subject strategy
selfsubjectstrategy.redhatRbacSelfSubjectStrategy.issuerDomainstringDomain for x-rh-identity subjects
selfsubjectstrategy.redhatRbacSelfSubjectStrategy.oidcIssuerDomains[].issstringOIDC issuer URL (YAML only, not available as CLI flag)
selfsubjectstrategy.redhatRbacSelfSubjectStrategy.oidcIssuerDomains[].domainstringDomain for this issuer (YAML only, not available as CLI flag)
ParameterTypeDefaultDescription
metaauthorizer.tuple-crud-allowliststring[][]Client IDs allowed to access tuple CRUD endpoints (empty = deny all, * for testing)
ParameterTypeDefaultDescription
business-metrics.enabledbooleanfalseEnable metrics collection from summary table

These parameters are available via YAML config and environment variables only, not CLI flags.

ParameterTypeDefaultDescription
log.levelenuminfoLog level: debug, info, warn, error, fatal
log.livezbooleantrueEnable /api/kessel/v1/livez endpoint
log.readyzbooleantrueEnable /api/kessel/v1/readyz endpoint

When deployed with Clowder, database and Kafka settings are injected automatically. The config file only needs to specify what Clowder does not provide. Deployments without Clowder will need to supply the full storage, consumer, and auth configuration explicitly.

authn:
authenticator:
type: first_match
chain:
- type: oidc
enable: true
transport:
http: true
grpc: true
config:
authn-server-url: https://sso.example.com/auth/realms/redhat-external
client-id: "my-client-id"
principal-user-domain: redhat
- type: x-rh-identity
enable: true
transport:
http: true
grpc: false
authz:
impl: kessel
kessel:
url: relations-api:9000
enable-oidc-auth: true
sa-client-id: "my-sa-client-id"
sa-client-secret: "my-sa-client-secret"
sso-token-endpoint: https://sso.example.com/protocol/openid-connect/token
schema:
repository: in-memory
in-memory:
type: json
path: schema_cache.json
consumer:
enabled: true
topic: outbox.event.kessel.tuples
log:
level: "info"