Package io.kroxylicious.proxy.config.tls
Record Class Tls
java.lang.Object
java.lang.Record
io.kroxylicious.proxy.config.tls.Tls
- Record Components:
key- specifies a key provider that provides the certificate/key used to identify this peer.trust- specifies a trust provider used by this peer to determine whether to trust the peer. If omitted platform trust is used instead.cipherSuites- specifies a custom object which contains details of allowed and denied cipher suitesprotocols- specifies a custom object which contains details of allowed and denied tls protocolscredentialSupplier- specifies a dynamic TLS credential supplier for per-client certificate selection (optional)
public record Tls(KeyProvider key, TrustProvider trust, AllowDeny<String> cipherSuites, AllowDeny<String> protocols, TlsCredentialSupplierConfig credentialSupplier)
extends Record
Provides TLS configuration for this peer. This class is designed to be used for both TLS server and client roles.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTls(KeyProvider key, TrustProvider trust, AllowDeny<String> cipherSuites, AllowDeny<String> protocols) Creates a Tls configuration without a TLS credential supplier.Tls(KeyProvider key, TrustProvider trust, AllowDeny<String> cipherSuites, AllowDeny<String> protocols, TlsCredentialSupplierConfig credentialSupplier) Compact constructor with validation. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecipherSuitesrecord component.Returns the value of thecredentialSupplierrecord component.booleanReturns whether a key provider is configured.final booleanIndicates whether some other object is "equal to" this one.static StringgetStoreTypeOrPlatformDefault(String storeType) Returns the store type, defaulting to the platform default if null.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.Returns the value of theprotocolsrecord component.final StringtoString()Returns a string representation of this record class.trust()Returns the value of thetrustrecord component.
-
Field Details
-
PEM
- See Also:
-
-
Constructor Details
-
Tls
public Tls(@Nullable KeyProvider key, @Nullable TrustProvider trust, @Nullable AllowDeny<String> cipherSuites, @Nullable AllowDeny<String> protocols, @Nullable TlsCredentialSupplierConfig credentialSupplier) Compact constructor with validation. -
Tls
public Tls(@Nullable KeyProvider key, @Nullable TrustProvider trust, @Nullable AllowDeny<String> cipherSuites, @Nullable AllowDeny<String> protocols) Creates a Tls configuration without a TLS credential supplier. This constructor is provided for backward compatibility with v0.18.0.For configurations that require dynamic TLS credential selection, use the 5-parameter constructor that includes
credentialSupplier.- Parameters:
key- specifies a key provider that provides the certificate/key used to identify this peer.trust- specifies a trust provider used by this peer to determine whether to trust the peer.cipherSuites- specifies allowed and denied cipher suitesprotocols- specifies allowed and denied tls protocols
-
-
Method Details
-
getStoreTypeOrPlatformDefault
Returns the store type, defaulting to the platform default if null.- Parameters:
storeType- the store type, or null for platform default- Returns:
- the resolved store type in upper case
-
definesKey
public boolean definesKey()Returns whether a key provider is configured.- Returns:
- true if a key provider is set
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
trust
Returns the value of thetrustrecord component.- Returns:
- the value of the
trustrecord component
-
cipherSuites
Returns the value of thecipherSuitesrecord component.- Returns:
- the value of the
cipherSuitesrecord component
-
protocols
Returns the value of theprotocolsrecord component.- Returns:
- the value of the
protocolsrecord component
-
credentialSupplier
Returns the value of thecredentialSupplierrecord component.- Returns:
- the value of the
credentialSupplierrecord component
-