http.tls
Holds the server’s TLS configuration: certificate/key material, cipher suites, protocol versions, and supported curves. See TLSConfig for detailed field options. If no certificate/key pair is configured, the server runs without TLS, serving plain HTTP with HTTP/2 cleartext (h2c) enabled.
The certificate and key are given as paths to PEM files (tls.certificate_file/tls.private_key_file); both must be set. If the pair is incomplete, callers typically run without TLS instead.
tls.cipher_suites, TLSMinVersion, and tls.curves are resolved by this package’s tls.cipher_suites, MinVersion, and Curve functions: an unrecognized name fails, and a configuration that crypto/tls or net/http rejects (see tls.cipher_suites) should shut the server down rather than be logged and ignored.
| Key | Type | Default |
|---|---|---|
http.tls.certificate_file |
string | empty |
http.tls.private_key_file |
string | empty |
http.tls.cipher_suites |
list | empty |
http.tls.min_version |
string | TLS1.3 |
http.tls.curves |
list | empty |
http.tls.reload_interval |
duration | 0 |
certificate_file
Section titled “certificate_file”string, default empty
The path to the PEM certificate served to clients. Required together with tls.private_key_file; neither alone is a usable pair. The file’s contents are re-read on reload (see CertSource), so a renewal that rewrites it in place needs no restart; the path itself is fixed for the process’s lifetime.
http: tls: certificate_file: "/etc/ssoossh/tls/server.crt"private_key_file
Section titled “private_key_file”string, default empty
The path to the PEM private key matching tls.certificate_file. Required together with it, re-read on the same reload, and its path is likewise fixed for the process’s lifetime.
http: tls: private_key_file: "/etc/ssoossh/tls/server.key"cipher_suites
Section titled “cipher_suites”list, default empty
Restricts the TLS 1.0-1.2 cipher suites offered (Go does not allow configuring TLS 1.3 suites). Names must exactly match crypto/tls constant names, case-sensitively, e.g. “TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256”; the stdlib’s insecure suites resolve too. Empty means Go’s defaults. Any explicit list must include TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 or TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: net/http’s automatic HTTP/2 setup refuses to serve without one of them, failing the server at startup.
http: tls: cipher_suites: []min_version
Section titled “min_version”string, default TLS1.3
The minimum TLS protocol version: TLS1.0, TLS1.1, TLS1.2, or TLS1.3. Parsing tolerates case, “.”/“-”/“_”/” “ separators, and the “tls”/“version” prefixes (“tls12”, “TLS-1.2”, and “VersionTLS12” all work). TLS1.0 and TLS1.1 resolve but log a deprecation warning (RFC 8996).
http: tls: min_version: "TLS1.3"curves
Section titled “curves”list, default empty
Restricts the key-exchange curves/groups offered, in preference order: P256, P384, P521, X25519, or X25519MLKEM768, with the same tolerant parsing as TLSMinVersion (“CurveP256”, “p-256”, …). Empty means Go’s defaults; note that naming any curve replaces those defaults entirely rather than adding to them.
http: tls: curves: []reload_interval
Section titled “reload_interval”duration, default 0
How often the certificate files are re-read on a timer, in addition to SIGHUP which always reloads. Zero or negative disables the timer, leaving SIGHUP as the only trigger.
The timer exists for deployments where nothing signals the process: a Kubernetes secret remount is the motivating case, since it replaces a directory symlink rather than writing the files in place, so a filesystem watch on the paths never fires.
http: tls: reload_interval: 0