pub enum TlsMode {
SelfSigned,
Acme,
AcmeDns01,
Files,
}Expand description
TLS configuration for HTTP services (OAI, OAuth, MCP).
When cert_path/key_path are unset, a self-signed ECDSA P-256 certificate
is auto-generated at startup with 365-day validity. Per-service overrides
(tls_cert/tls_key on OAI/OAuth/MCP configs) take precedence.
§Example TOML
[tls]
mode = "self-signed" # or "acme", "acme-dns01", or "files"
server_name = "localhost"
# ACME (HTTP-01/TLS-ALPN-01) mode:
# acme_domain = "node.example.com"
# acme_contact = "mailto:ops@example.com"
# acme_cache_dir = "/var/lib/hyprstream/acme"
# ACME DNS-01 wildcard mode (epic #1158 / A3 — the account zone):
# mode = "acme-dns01"
# [account]
# zone = "acct.example.com"
# dns01_credential = "ref:secretstore/account-zone-token"Variants§
SelfSigned
Auto-generate a self-signed certificate at startup (dev/air-gapped only).
Acme
Obtain a certificate automatically via ACME (RFC 8555) — Let’s Encrypt
or step-ca. Uses HTTP-01/TLS-ALPN-01 for a single named domain
(acme_domain). Does not support wildcard issuance.
AcmeDns01
DNS-01 wildcard issuance for the deployment’s account zone (epic #1158,
A3 / #1162). Obtains a *.<apex> certificate using the zone-scoped
credential configured under [account]. Wildcards cannot use HTTP-01;
DNS-01 is the only validation method public CAs accept for *.<apex>.
When the account zone is unconfigured this mode degrades sanely to the existing self-signed/files materials — it never panics and never synthesizes a zone name (one-way door #1).
Files
Load certificate and key from cert_path/key_path (operator-managed).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TlsMode
impl<'de> Deserialize<'de> for TlsMode
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TlsMode
impl StructuralPartialEq for TlsMode
Auto Trait Implementations§
impl Freeze for TlsMode
impl RefUnwindSafe for TlsMode
impl Send for TlsMode
impl Sync for TlsMode
impl Unpin for TlsMode
impl UnsafeUnpin for TlsMode
impl UnwindSafe for TlsMode
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request