Security fixes are released for the latest minor version of the current major release.
| Version | Supported |
|---|---|
| 1.0.x | Yes |
Do not open a public issue for a security problem.
Report it privately through GitHub's private vulnerability reporting, or by email to development@davils.com.
Please include:
- the affected Kortex version, module and JDK, and whether the service ran alone, in a mesh or over IPC,
- a description of the impact — what an attacker gains,
- the steps to reproduce it, ideally as a minimal Kotlin snippet or test,
- any mitigation you are already aware of.
We acknowledge a report within three working days and agree on a disclosure date with you.
Kortex is a library: it runs with the privileges of the application that uses it and serves the listeners the application declares. It treats as untrusted everything that does not come from the code of the application: every request and connection on a listener, every peer of the mesh and of IPC, every certificate a peer presents, every join token and certificate request, every Raft message, every key, value and watch of the store and every answer of another service.
Kortex guarantees:
- No network listener and no client without TLS 1.3, unless the application switches TLS off explicitly for a public listener behind its own termination. The mesh and the bootstrap listener can never run without TLS. Trust comes from the krypt material the application or the authority hands in; a configuration that includes the trust store of the JDK is refused. A listener with TLS never upgrades a connection to h2c, so that a request to upgrade cannot carry other requests past a proxy in front of it.
- Every peer of the mesh is authenticated and authorized. A connection without a certificate of the trust domain is refused during the handshake, and every operation is checked against the role bindings of the control plane.
- A client of the mesh authorizes the server it reaches. The clients of
kortex-clientspeak TLS 1.3 with a client context of krypt that must authorize the server, such as by its SPIFFE id; a context without an authorizer or with the trust store of the JDK is refused. A call leaves the process only for an instance of the service it names: the destinations of its kapi client allow that service alone, and its host is replaced by an endpoint of the configuration or the discovery. - A public caller cannot stretch or shorten the work of a service. A trace a caller sends is kept; a
kortex-deadlineis honoured only on the mesh, IPC and bootstrap listeners: a call still running when its deadline passes is cancelled and answered with 504, and one whose deadline passed before it arrived does no work. - The store permits nothing by default. A peer of the store may do only what a grant for its principal names; a lease is visible only to the principal that granted it. Every key, value, range, transaction, lease and watch is checked against the limits of the store before any work, and its memory is bounded by its quota and its retention.
- Raft never trusts its peers blindly. A member acts on a message only when it is addressed to it, comes from one
of its members and keeps the limits of Raft, the shape of its entries and its snapshot included. It keeps its term
and its vote before it answers, so it never votes twice in a term, and a member that restarts without its state
must join under a new identity. The plugin
Rafthands a message on only when the principal of the connection it came over, the SPIFFE id of a mesh peer or the user of an IPC peer, is the one its sender is configured with, and assembles a snapshot only from contiguous chunks within the limits of Raft. A leader appends a command a member forwards only within the limits of an entry, and a replicated store skips every command of the log it cannot read instead of failing, so a member cannot stop the group with a malformed write. - Enrollment trusts only the authority it is handed. A service enrolls over TLS verified against the certificates that come with its join token, to the SPIFFE id of the authority only. The authority keeps a join token only as a digest under a lease of the store, compares it in constant time, consumes it in the same transaction that checks it and never tells which part of a token failed. It issues only for a certification request whose signature verifies, for a SPIFFE id of its trust domain that the token or the caller names, never one the request names; renewals are served only on the mesh and enrollment only on the bootstrap listener. One instance publishes the revocation lists, fenced by the key of its leadership in the store.
- The control plane denies by default. Every call is authorized for the SPIFFE id of its caller: an instance is written, renewed and removed only by the service it names, every service of the trust domain may read the endpoints and the access policies, and every other operation needs an admin of the configuration or a role binding. A write replaces a resource only at the resource version it names, and the endpoint controller writes only while it holds the key of its leadership.
- A service is called only by the services its access policies name. With the agent, the mesh listener lets a call through only when its caller is an instance of the same service or an access policy for this service names the service of the caller; until the policies are listed, every other caller is denied, and an authorizer that fails denies. A policy that names operations grants nothing yet. Certificates are renewed at half of their remaining life, so that a service keeps working through an outage of the authority for about half of its validity.
- Internal APIs are never public. The APIs of Raft, the store, the control plane and the authority can only be served on the mesh, IPC and bootstrap listeners they declare.
- Nothing is read from the file system and nothing is written to it. Kortex reads no file, no key store, no system property and no environment variable. The only path it touches is the socket of a named IPC address in the directory Konnect manages.
- Nothing blocks a thread. Every operation suspends; the delegated work of TLS and the reads and accepts of IPC
sockets run on the dispatcher the application hands in, never on an event loop. That dispatcher must grow with
blocking work, as
Dispatchers.IOdoes: on one with a fixed number of threads, open IPC connections can take every thread and stop the service. - Bounded input. Every request, store value, watch buffer, Raft entry and snapshot is checked against limits before work that grows with it.
- No secret in telemetry. Tokens, passwords and keys are
SecretTexts orSecretBytesof krypt; events, spans, meters and failures carry neither secrets nor payloads nor the text a peer sent, unless the application switches the diagnostics on, and then only escaped throughSafeText. - No repetition of work that left the process. An unsafe operation whose result is unknown is never retried.
The following are in scope:
- a way to reach an internal API on a public listener, to join the mesh without a valid join token or to act in the mesh beyond the role bindings of a service,
- a way to make Kortex accept a peer it should not trust, or run a mesh or bootstrap listener without TLS,
- a way to make Kortex read or write a file, a system property or an environment variable,
- a Raft message, store operation or request that makes Kortex lose committed data while a majority of the cluster is alive, vote twice in one term, use unbounded memory or CPU or crash with an unexpected exception,
- a secret, a payload or an unescaped peer message in an event, span, meter, failure or
toString.
The following are not vulnerabilities in Kortex:
- a vulnerability in the JDK, Ktor, Netty or a Davils library — report those to the respective project,
- the code of the plugins and services an application writes itself, and the role bindings it grants,
kortex-fixtureandkortex-benchmark, which are never published.
- The store lives in memory. Until a durable storage is added, the store of the control plane keeps its state only in the memory of its nodes. It survives the loss of a minority of the nodes; when a majority is lost at once, the state of the cluster is lost and the mesh has to be bootstrapped again. The signer of the authority always stays with the application.
- Access policies grant whole services. The agent cannot tell the operations of a call apart yet, so a policy that names operations grants nothing; a policy without operations grants every operation of the target.
- The agent trusts the anchors of its enrollment. It rotates the certificate of the service, but not the anchors of the mesh; a new root needs new credentials.
- The mesh does not check revocation. X.509-SVIDs are short-lived, an hour by default, and the mesh relies on their expiry; the authority publishes revocation lists, but the TLS of the mesh does not consult them yet.
- Netty reads one setting of the operating system. When it loads, Netty reads the limit of the backlog of
listening sockets from the operating system, on Linux from
/proc/sys/net/core/somaxconn. Kortex itself reads nothing, excludes the native transports of Netty so that no native library is loaded, and never uses its blocking transport or its generator of self-signed certificates. - Ktor and Netty own a few threads and a hook. A public listener runs on the event loops of Netty, which it starts when it binds and stops when it stops, and Ktor registers a hook of the process while a listener runs that stops the listener when the process ends. Kortex starts no thread of its own.
- The client of the JDK owns a few threads. The clients reach the mesh through the HTTP client of the JDK, one per service called, which runs a selector thread of its own while the clients are open; they are closed in the release phase of the shutdown.
- IPC authenticates the operating system user. A local peer is identified by the user of its process, which Konnect reads from the socket. Services that must be told apart on one host run as different users or present a JWT-SVID.
Releases are published to https://repo.davils.com/releases and signed with the release key of Davils, fingerprint
36F578E8AD2D4391E0FA6C18154C625FAD370063, so a consumer can pin it as a trusted-key in its own
gradle/verification-metadata.xml. A release also carries a signed build provenance attestation made by the GitHub
Actions run that built it:
gh attestation verify kortex-core-1.0.0.jar --repo davils-com/kortex --signer-repo davils-com/kotlin-workflowSnapshots in https://repo.davils.com/snapshots are neither signed nor attested and are not meant for production.