Skip to main content

Crate feldera_mtls

Crate feldera_mtls 

Source
Expand description

Client certificate identities of Feldera components, and the server side of checking them: the compiler, runner, pipeline and coordinator servers with --require-client-certificates.

The control plane presents a certificate with the URI SAN CONTROL_PLANE_CERTIFICATE_URI, a pipeline one with pipeline_certificate_uri. The private CA signs both. Pipelines may also admit external clients, such as sidecars, by a URI SAN outside urn:feldera:.

Structs§

PipelineClientAuth
The client verifier and admitted callers of a pipeline or coordinator server. Its certificate chain names the pipeline in the leaf and ends with the private CA chain, which the runner appends, so the server needs no separate CA file.

Enums§

Caller
Who called a server, according to the client certificate of the connection.
ClientAuthError
A request that a server refused because of the client certificate of its connection.

Constants§

CONTROL_PLANE_CERTIFICATE_URI
URI SAN of the control-plane client certificate (API server, runner, compiler replicas).
EXTRA_CLIENT_CERTIFICATE_URIS_ENV
Environment variable with the URI SANs of the extra clients that pipelines admit.
REQUIRE_CLIENT_CERTIFICATES_ENV
Environment variable that makes the compiler, runner, pipeline and coordinator servers require client certificates.

Functions§

authorize
Runs next if is_allowed admits the request for the caller of its connection, and refuses it with 401 (no identity) or 403 (another identity) otherwise.
client_certificate_verifier
Builds a client certificate verifier that trusts only the first certificate of ca_chain, the private CA that issues client certificates, so a client may send its leaf certificate without the chain. The rest of the chain is not trusted, because other CAs under the same root could issue Feldera identities. Clients without a certificate may connect, so that they get an actionable 401 or reach routes open to everyone.
crypto_provider
The rustls provider that the process installed, or the aws-lc-rs one that Feldera binaries install. With several rustls crypto features compiled in, rustls has no default unless the process installed one.
pipeline_certificate_uri
URI SAN of the certificate of pipeline pipeline_id.