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 suites
protocols - specifies a custom object which contains details of allowed and denied tls protocols
credentialSupplier - 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 Details

  • 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 suites
      protocols - specifies allowed and denied tls protocols
  • Method Details

    • getStoreTypeOrPlatformDefault

      public static String getStoreTypeOrPlatformDefault(@Nullable String storeType)
      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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • key

      @Nullable public KeyProvider key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • trust

      @Nullable public TrustProvider trust()
      Returns the value of the trust record component.
      Returns:
      the value of the trust record component
    • cipherSuites

      @Nullable public AllowDeny<String> cipherSuites()
      Returns the value of the cipherSuites record component.
      Returns:
      the value of the cipherSuites record component
    • protocols

      @Nullable public AllowDeny<String> protocols()
      Returns the value of the protocols record component.
      Returns:
      the value of the protocols record component
    • credentialSupplier

      @Nullable public TlsCredentialSupplierConfig credentialSupplier()
      Returns the value of the credentialSupplier record component.
      Returns:
      the value of the credentialSupplier record component