Skip to main content

Crate schedr_tls

Crate schedr_tls 

Source
Expand description

mTLS on schedr’s internal links (see archive/PROJECT.md, Master–worker protocol: tls.mode).

In app mode every role has a certificate and a key, and trusts one CA: the master serves gRPC with its certificate and asks workers for theirs, a worker serves its log endpoint the same way and presents its certificate to the master, and the webserver presents its own to the workers. In mesh mode a service mesh does all of this and schedr sends plain traffic.

  • material: the PEM files read and turned into rustls configurations.
  • reload: Tls, the configurations in use, read again when the files change.
  • incoming: a listener that does the TLS handshake (or none), for tonic and axum.
  • connect: a gRPC channel to the master over TLS (or plain).

With the testing feature, testing makes certificates for tests.

Re-exports§

pub use connect::channel;
pub use connect::error_text;
pub use incoming::Conn;
pub use incoming::Incoming;
pub use incoming::Protocol;
pub use incoming::incoming;
pub use material::TlsError;
pub use material::TlsFiles;
pub use reload::Reload;
pub use reload::Tls;

Modules§

connect
A worker’s gRPC channel to the master: plain for an http:// URL, TLS with the worker’s certificate for an https:// one (the master’s certificate must name the URL’s host).
incoming
Accepted connections, after the TLS handshake when there is TLS: one listener type for the master’s gRPC server (a [Stream] for tonic) and a worker’s log endpoint (an axum [Listener]).
material
The certificate files and the rustls configurations built from them.
reload
The configurations in use, read again when the files change (rotation without a restart).