Documentation
¶
Overview ¶
Package exttls gives extensions one consistent way to configure the TLS settings of the clients they use to reach third-party services, which are often self-hosted behind self-signed certificates.
Two mechanisms are supported, the same in every extension:
- STEADYBIT_EXTENSION_INSECURE_SKIP_VERIFY=true disables certificate verification.
- Custom CA certificates are trusted by mounting them into the container and pointing SSL_CERT_DIR (or SSL_CERT_FILE) at them. Go reads these variables when it loads the system certificate pool, so no extension code is involved beyond not replacing that pool. The tls.Config returned here leaves RootCAs nil, which means the system pool.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientConfig ¶
ClientConfig returns the tls.Config to use for outgoing connections to third-party services. Callers may modify the returned value, e.g. to add client certificates for mutual TLS.
func IsInsecureSkipVerify ¶
func IsInsecureSkipVerify() bool
IsInsecureSkipVerify reports whether STEADYBIT_EXTENSION_INSECURE_SKIP_VERIFY is enabled. An empty or invalid value keeps verification on rather than failing startup, as charts may render the variable empty.
func Transport ¶
Transport returns a clone of http.DefaultTransport with STEADYBIT_EXTENSION_INSECURE_SKIP_VERIFY applied on top of its TLS settings. Use it as the transport of an http.Client, or pass it to resty via SetTransport. Each call returns a transport with its own connection pool, so build it once per client.
If http.DefaultTransport was replaced by a wrapper (e.g. otelhttp), the standard transport captured at startup is used instead; the wrapper is not applied, wrap the result yourself if you need it.
Types ¶
This section is empty.