mTLS client identity for mutual TLS authentication.
Discovers client certificates from the filesystem or environment variables and provides them to the transport layer for HTTPS connections.
Discovery Order
try_discover/1 searches in this order:
override_diroption (if provided)CONDUIT_MTLS_CERT+CONDUIT_MTLS_KEYenvironment variablesCONDUIT_IDENTITY_DIRenvironment variable~/.conduit/identity.pem+identity_key.pem.conduit/relative to current working directory
Summary
Functions
Creates an identity from CONDUIT_MTLS_CERT and CONDUIT_MTLS_KEY
environment variables containing PEM data directly.
Creates an identity from explicit file paths.
Creates an identity from PEM-encoded binaries.
Returns true if the identity's certificate will expire within the given threshold.
Attempts to discover mTLS identity from the filesystem and environment.
Types
Functions
@spec from_env() :: {:ok, t()} | {:error, :not_found}
Creates an identity from CONDUIT_MTLS_CERT and CONDUIT_MTLS_KEY
environment variables containing PEM data directly.
Creates an identity from explicit file paths.
Creates an identity from PEM-encoded binaries.
Returns true if the identity's certificate will expire within the given threshold.
Options
:threshold_days- number of days before expiry to trigger (default: 30)
Attempts to discover mTLS identity from the filesystem and environment.
Returns %Identity{} if found, nil otherwise.
Options
:override_dir- directory to search first (highest priority)