HttpTls

org.llm4s.http.HttpTls
See theHttpTls companion object
@Stable
final case class HttpTls

The TLS trust and client-certificate material every llm4s HTTP client uses: the llm4s.http.tls block.

llm4s.http.tls {
 trustStore         = "/etc/pki/corp-ca.p12"
 trustStorePassword = ${?LLM4S_TRUSTSTORE_PASSWORD}
 keyStore           = "/etc/pki/client.p12"     # optional: a client certificate, for mTLS gateways
 keyStorePassword   = ${?LLM4S_KEYSTORE_PASSWORD}
}

The trust store's certificates are trusted '''in addition to''' the JDK's default ones, so a corporate CA that re-signs traffic is accepted without losing the public CAs. A store may be PKCS12 or JKS; the type is detected from the file. The passwords are redacted in toString.

Build one with HttpTls.default and the with* setters; the constructor is private, so a new field never breaks a caller.

Value parameters

keyStore

a store holding the client certificate and its key, for mutual TLS, if any

keyStorePassword

the key store's password, also used for the key; never printed

trustStore

a store of extra CA certificates to trust, if any

trustStorePassword

the trust store's password, if it has one; never printed

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def isDefault: Boolean

true when neither store is set, so every client keeps the JDK's TLS defaults.

true when neither store is set, so every client keeps the JDK's TLS defaults.

Attributes

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
def withKeyStore(keyStore: Path): HttpTls
def withKeyStore(keyStore: Option[Path]): HttpTls
def withKeyStorePassword(password: String): HttpTls
def withKeyStorePassword(password: Option[String]): HttpTls
def withTrustStore(trustStore: Path): HttpTls
def withTrustStore(trustStore: Option[Path]): HttpTls
def withTrustStorePassword(password: String): HttpTls
def withTrustStorePassword(password: Option[String]): HttpTls

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product