ka2a documentation

Configuration reference

Developer preview. Not yet production ready. This page is rendered from docs/configuration-reference.md of the ka2a repository at revision 96fb45e5e5f6693e779837998c3aa9581d6a37f2. It describes the behavior of that revision.

Contents

This reference lists every flag of the ka2a command and every field of ka2a.Config. The test TestConfigurationReferenceMatchesTheFlagsAndConfig (internal/cli, make verify) compares it with the code. It fails when a flag or a field is missing here, when a listed flag or field does not exist, or when the commands or the default of a flag differ. For the full text of a command, run ka2a help <command>.

Environment

VariableMeaning
KA2A_STATE_DIRDefault of --state-dir.

Command-line flags

The column "Default" shows the value when you do not give the flag. "none" is an empty value. "varies" means that the commands have different defaults.

FlagCommandsDefaultMeaning
--allow-plaintextrun, send, task get, tasks list, task cancelfalsePermit a broker connection without TLS. Only the development profile permits it; use it only for a local development broker.
--allow-plaintext-credentialsdoctor, topics verify, topics provisionfalsePermit SASL/PLAIN without TLS. Use it only for a local test broker.
--brokersdoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnoneComma-separated Kafka bootstrap brokers (host:port). The node commands need it. doctor checks the broker only with it.
--budget-bytesdoctor, observe, snapshot export, serve-ui0Retained-state budget of the owner, for the storage checks. The default is the store default (1 GiB).
--catalogdoctor, topics verify, topics acl-plan, init, topics provision, run, send, task get, tasks list, task cancelnoneTrusted catalog file (ka2a.catalog.v1). run, the request commands and topics acl-plan need it. doctor, init and the other topic commands use it to check the catalog or to find the mailbox topic.
--consumer-grouptopics acl-plannoneConsumer group of the node for the ACL plan. The default is ka2a.owner.<domain>.<endpoint>, the default of Config.Kafka.ConsumerGroup.
--context-idsend, tasks listnonesend: the A2A context ID to continue. tasks list: list only the tasks of this context.
--cursorobserve, snapshot export0Continue the list of --list after this cursor.
--dispatchheld release, held abandon0Inbound sequence number of the held dispatch row (the IN column of 'ka2a observe --list dispatch').
--domaindoctor, topics verify, topics acl-plan, init, topics provision, run, send, task get, tasks list, task cancelnoneTrust domain of the local endpoint.
--drain-timeoutrun, send, task get, tasks list, task cancel30sTime limit of the drain at the stop. Unfinished work stays durable.
--endpointdoctor, topics verify, topics acl-plan, init, topics provision, run, send, task get, tasks list, task cancel, keys generate, keys publicnoneEndpoint ID of the local endpoint. keys generate and keys public: the endpoint that the key signs for, as DOMAIN/ENDPOINT (required).
--expiry-dayscatalog validate30Warn about catalog keys that end within this many days without a replacement (0..3650).
--forcesnapshot exportfalseReplace an existing file.
--fromrestorenoneBackup file from 'ka2a backup'.
--history-lengthtask get-1Most recent history messages to return. -1 returns all.
--key-idkeys generatenoneKey ID of the new key in the catalog ([A-Za-z0-9][A-Za-z0-9._:-]{0,127}). Required.
--listobserve, snapshot exportnoneShow only this list, to page through it: operations, outbox, dispatch, rejections, incidents, partitions.
--listenserve-ui127.0.0.1:0Loopback address to listen on. Port 0 selects a free port.
--log-levelrun, send, task get, tasks list, task cancelwarnNode diagnostics on stderr: off, error, warn or info. They never hold bodies or raw identifiers.
--max-value-bytesdoctor, topics verify, topics provision1048576Largest record value; it sets the required max.message.bytes.
--message-idsendnoneA2A message ID. The default is the --operation-id key, so a repeated command sends the same request; without a key it is a new UUID.
--metrics-listenrunnoneServe the node metrics in the Prometheus text format at http://ADDRESS/metrics. ADDRESS must be a loopback address (127.0.0.1, ::1 or localhost). Port 0 selects a free port. The default serves no metrics.
--not-afterkeys generate, keys publicnoneEnd of the key window in the printed catalog entry (RFC 3339). The default is no end.
--not-beforekeys generate, keys publicnoneStart of the key window in the printed catalog entry (RFC 3339). The default is the current time, truncated to the second.
--notequarantine releasenoneHow the state was reconciled (required, 1..1024 bytes).
--operationheld abandonnoneOperation ID of a sent request that waits for its response or is held. Give --dispatch or --operation.
--operation-idsend, task get, tasks list, task cancelnoneOperation key (lowercase UUIDv4). The same key with the same request returns the original operation.
--operatorquarantine releasenoneName of the person or tool that decided (required, 1..128 bytes).
--outsnapshot export, backup, keys generatenonebackup: the backup file to write; it must not exist. snapshot export: the snapshot file to write. keys generate: the key file to write; it must not exist, and others must not be able to read its directory.
--outputversion, doctor, observe, snapshot export, operation show, topics verify, topics acl-plan, serve-ui, init, topics provision, backup, restore, quarantine release, held release, held abandon, run, send, task get, tasks list, task cancel, keys public, catalog validate, catalog digest, keys generatetextOutput format: text or json.
--page-sizeobserve, snapshot export, serve-ui, tasks listvariesLargest number of items in a page. tasks list: 1..100, default 50. The other commands give their own default in ka2a help <command>.
--page-tokentasks listnoneToken of the page to read, from the previous page.
--peersend, task get, tasks list, task cancelnonePeer endpoint as DOMAIN/ENDPOINT. The catalog must grant the operation. Required.
--principaltopics acl-plannoneKafka principal of the node, for example User:ka2a-a or User:CN=ka2a-a,O=example. Required.
--print-tokenserve-uiautoPrint the login token to stderr: auto, always or never.
--profiledoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelqualifiedDeclared durability profile: qualified or development. The node and the topic commands check the mailbox topic against it.
--raw-idsobserve, snapshot export, operation show, held release, held abandon, send, task get, tasks list, task cancelfalseShow raw identifiers and digests. The default shows pseudonyms. Bodies are never shown.
--reasonheld release, held abandonnoneReason token of the decision, recorded with the row ([a-z][a-z0-9_]{0,63}, required).
--retentiondoctor, topics verify, topics provision192h0m0sSmallest accepted retention of the mailbox topic.
--sasl-mechanismdoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnoneSASL mechanism: PLAIN, SCRAM-SHA-256 or SCRAM-SHA-512.
--sasl-password-filedoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnoneFile with the SASL password (mode 0600). The password is never a flag value.
--sasl-usernamedoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnoneSASL user name.
--show-resultsend, task get, tasks list, task cancelfalseAlso print the A2A result document. It can hold business data.
--signing-keydoctor, init, run, send, task get, tasks list, task cancelnoneSigning key file of the local endpoint (ka2a.signing-key.v1, mode 0600). run and the request commands need it. doctor and init check it.
--snapshotserve-uinoneShow this ka2a.snapshot/1 file instead of a state directory.
--start-timeoutrun, send, task get, tasks list, task cancel2m0sTime limit of the node start: restart recovery and the mailbox check. The start does not wait for a broker: without one, the mailbox check stays unverified and the node admits work locally.
--stateobserve, snapshot export, tasks listnoneList only the tasks in this state, for example working or TASK_STATE_WORKING.
--state-dirdoctor, observe, snapshot export, operation show, topics verify, topics acl-plan, serve-ui, init, topics provision, backup, restore, quarantine release, held release, held abandon, run, send, task get, tasks list, task cancelnoneState directory of the endpoint. The default is $KA2A_STATE_DIR.
--strictdoctor, topics verify, topics provision, catalog validatefalseCount unverified broker settings as problems. catalog validate: count warnings as problems.
--task-idsendnoneA2A task ID to continue.
--textsendnoneText of the message. Required.
--timeoutdoctor, topics verify, topics provision30sTime limit of the broker requests.
--tlsdoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelfalseConnect to the brokers with TLS.
--tls-cadoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnonePEM file of the CA certificates for TLS. The default is the system pool.
--tls-crldoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnonePEM (or one DER) file of the certificate revocation lists (CRL) of the broker chain. Needs --tls-ca: a CA certificate of that file must sign each list, and each list must be current (after its this update, before its next update). Each handshake refuses a broker chain that a list revokes (tls_failed), also through a revoked intermediate CA of the bundle. Delta lists, indirect lists and lists with an unknown critical extension are refused. At most 64 lists and 8 MiB.
--tls-certdoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnonePEM file of the client certificate for mutual TLS: the leaf first, then the intermediate CAs. Needs --tls-key. The certificate must allow client authentication.
--tls-keydoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnonePEM file of the unencrypted private key of --tls-cert (mode 0600). The key is never a flag value and never appears in an output.
--tls-server-namedoctor, topics verify, topics provision, run, send, task get, tasks list, task cancelnoneServer name for TLS verification.
--token-fileserve-uinoneToken file. The default is ui.token in the state directory. A snapshot file needs this flag.
--topicdoctor, topics verify, topics provisionnoneMailbox topic. The default comes from the catalog entry of the endpoint.
--ui-listenrunnoneServe the read-only operational UI of this node on this loopback address. The UI shows the live broker connectivity of the node. The default serves no UI.
--ui-print-tokenrunautoPrint the UI login token to stderr: auto, always or never.
--ui-token-filerunnoneUI token file. The default is ui.token in the state directory.
--waitsend, task get, tasks list, task cancel30sHow long to wait for the response. 0 waits only for the broker stage.

Flag rules

  • A password is never a flag value. Give it in a file with mode 0600 (--sasl-password-file).
  • --tls-ca, --tls-crl, --tls-server-name, --tls-cert and --tls-key turn on TLS, also without --tls.
  • --tls-cert and --tls-key go together (mutual TLS). The key file must be a regular file of the effective user with mode 0600, and the pair must match. A command that contacts the broker refuses a client certificate that is expired or not yet valid. doctor reports broker.client_certificate: a problem outside the validity period and a warning in the last 30 days.
  • With --tls-crl, doctor reports broker.revocation_lists with the earliest next update of the lists: ok, or a warning when it is less than 24 hours away. A stale list is refused before broker contact. ka2a run shows the earliest next update of the lists in use in the line of an accepted reload, the run UI and ka2a_revocation_lists_next_update_timestamp_seconds.
  • With mutual TLS, SASL is optional. Without SASL, the client certificate identifies the principal (the broker maps its subject with ssl.principal.mapping.rules).
  • --allow-plaintext (node commands) permits a connection without TLS. Only the development profile accepts it.
  • --allow-plaintext-credentials (administrative commands) permits SASL/PLAIN without TLS. Use it only for a local test broker.
  • --metrics-listen, --ui-listen and --listen accept only loopback addresses.
  • ka2a run reads --tls-ca, --tls-crl, --tls-server-name, --tls-cert, --tls-key and --sasl-password-file again on SIGHUP and reloads the broker credentials of the running node. The node checks the new material, also with one broker request to each bootstrap broker of --brokers, before it uses it; a refusal of any broker keeps the previous material. Each refusal line on stderr names its class. The other flags, the catalog and the signing key stay until a restart (production guide).

ka2a.Config

pkg/ka2a reads this configuration at Open. Zero values take the defaults.

FieldDefaultMeaning
Config.EndpointrequiredThe local endpoint (Domain and Name). The catalog must list it.
Config.StateDirrequiredThe state directory. One process owns it. Open creates it with mode 0700.
Config.CatalogFilerequiredThe trusted catalog (ka2a.catalog.v1): peers, routes, keys and grants.
Config.SigningKeyFilerequiredThe Ed25519 signing key (ka2a.signing-key.v1, mode 0600).
Config.KafkaThe broker connection.
Config.Kafka.BrokersrequiredBootstrap brokers (host:port).
Config.Kafka.TLSnilTLS configuration. The node uses a clone. The qualified profile requires it. For mutual TLS, set Certificates (or GetClientCertificate); the library does not check the validity period of the client certificate at Open. Node.ReloadCredentials replaces the TLS configuration and the SASL user name and password of a running node, and refuses an expired client certificate, a configuration that turns off the verification of the broker certificate (InsecureSkipVerify) and a lower MinVersion. For the revocation lists of --tls-crl, set VerifyConnection to the method of ka2a.ParseBrokerRevocationLists(caPEM, crl, now) (production guide); a reload cannot remove it.
Config.Kafka.RevocationListsNextUpdatezeroEarliest next update of the revocation lists that Config.Kafka.TLS.VerifyConnection checks (BrokerRevocationLists.NextUpdate()). Information only: the node shows it in Status.Credentials.RevocationListsNextUpdate and ka2a_revocation_lists_next_update_timestamp_seconds; the check is the function. BrokerCredentials.RevocationListsNextUpdate replaces it at an accepted reload.
Config.Kafka.SASLnilSASL credentials.
Config.Kafka.SASL.MechanismSCRAM-SHA-512, SCRAM-SHA-256 or PLAIN. PLAIN needs TLS.
Config.Kafka.SASL.UsernameSASL user name. It must not hold control characters.
Config.Kafka.SASL.PasswordSASL password. The node never writes it to an error or a log.
Config.Kafka.AllowPlaintextfalsePermit a connection without TLS. The qualified profile refuses it.
Config.Kafka.ConsumerGroupka2a.owner.<domain>.<endpoint>The group of the one durable owner. Observers must use other groups.
Config.Kafka.ClientIDka2aPrefix of the Kafka client IDs.
Config.Kafka.FetchMaxWaitKafka layer defaultLongest wait of a fetch.
Config.Kafka.SessionTimeoutKafka layer defaultConsumer group session timeout.
Config.Kafka.HeartbeatIntervalKafka layer defaultConsumer group heartbeat interval.
Config.Kafka.RebalanceTimeoutKafka layer defaultConsumer group rebalance timeout.
Config.Kafka.CommitTimeoutKafka layer defaultTime limit of an offset commit.
Config.Kafka.RevokeSettleTimeoutKafka layer defaultTime that a revoked partition gets to settle its accounted progress.
Config.Kafka.DeliveryTimeoutKafka layer defaultTime limit of one record delivery.
Config.Kafka.RequestTimeoutKafka layer defaultTime limit of one broker request.
Config.DurabilityqualifiedDeclared broker profile: qualified or development.
Config.LimitsBounds of records, dispatch and retained state.
Config.Limits.MaxValueBytes1 MiBLargest record value.
Config.Limits.MaxHeaderBytes16 KiBLargest total of the record headers.
Config.Limits.RetainedBytes1 GiBRetained-state budget. A new admission that would exceed it fails with storage_pressure.
Config.Limits.MaxDispatch32Handler calls that run at the same time.
Config.HorizonsSigned admission horizons, the clock skew and the retention periods.
Config.Horizons.ClockSkew5 minutesAccepted wall-clock skew.
Config.Horizons.RequestHorizon24 hoursLongest signed request lifetime.
Config.Horizons.ResponseHorizon8 daysLongest signed response lifetime.
Config.Horizons.RequestDedupRetention8 daysRetention of request deduplication. At least the request horizon plus the skew.
Config.Horizons.ResponseDedupRetention9 daysRetention of response deduplication. At least the response horizon plus the skew.
Config.Horizons.ResultRetention8 daysHow long a completed result stays available.
Config.Horizons.TombstoneRetention8 daysHow long a purged identity stays blocked.
Config.Horizons.RejectionRetention8 daysHow long a rejection disposition stays.
Config.MirrorSessionfalseWrite the A2A contextId to the header ce_ka2asession.
Config.PropagateRunfalseWrite a submitted run ID to the header ce_ka2arun. The default drops it.
Config.DrainTimeout30 secondsTime limit of the drain of Run after its context ends.
Config.WaitForBrokerfalseThe start of Run waits until a broker answers the mailbox check.
Config.ObservernilReceives events through a bounded, lossy queue. Messaging never waits for it.
Config.ObserverQueue1024Size of the observer queue.
Config.Loggernil (discard)Receives classified diagnostics. It never receives bodies, context IDs, run IDs or key material.

All ka2a documents