Enum Class KafkaSessionState

java.lang.Object
java.lang.Enum<KafkaSessionState>
io.kroxylicious.proxy.internal.KafkaSessionState
All Implemented Interfaces:
Serializable, Comparable<KafkaSessionState>, Constable

public enum KafkaSessionState extends Enum<KafkaSessionState>
Describes the possible states of a Kafka session as viewed from the proxy Generally we expect a Kafka Session to transition through one of the following sequences. The simplest model where there are is no detectable authentication: ESTABLISHING -> NOT_AUTHENTICATED -> TERMINATING The second workflow where we can detect a set of client credentials from M_TLS ESTABLISHING -> NOT_AUTHENTICATED -> TRANSPORT_AUTHENTICATED -> TERMINATING The third workflow where we can detect a set of client credentials via FilterContext.clientSaslAuthenticationFailure(String, String, Exception)): ESTABLISHING -> NOT_AUTHENTICATED -> SASL_AUTHENTICATED -> TERMINATING Certain deployments will configure both M_TLS and SASL Inspection. Sessions in those deployments will go through the expected states. ESTABLISHING -> NOT_AUTHENTICATED -> TRANSPORT_AUTHENTICATED -> SASL_AUTHENTICATED -> TERMINATING Note the session can transition to TERMINATING from any other state at any time.
  • Enum Constant Details

    • ESTABLISHING

      public static final KafkaSessionState ESTABLISHING
      The proxy has seen a connection, but it is not yet connected to an upstream node and ready for RPCs.
    • NOT_AUTHENTICATED

      public static final KafkaSessionState NOT_AUTHENTICATED
      The proxy has established TCP connections to both client and broker. It is still prior to any M_TLS or SASL authentication happening. If the proxy can not build an identified subject, are no client TLS certificates or SASL credentials supplied (or no SASL inspector is installed) then the session will remain in this state until it terminating.
    • TRANSPORT_AUTHENTICATED

      public static final KafkaSessionState TRANSPORT_AUTHENTICATED
      The client has been successfully authenticated based on details of network connection.

      Typically, this would be from a client TLS certificate.

    • SASL_AUTHENTICATED

      public static final KafkaSessionState SASL_AUTHENTICATED
      The client has been successfully authenticated using SASLS credentials (at least once).
    • TERMINATING

      public static final KafkaSessionState TERMINATING
      The session is being torn down by the proxy.
  • Method Details

    • values

      public static KafkaSessionState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static KafkaSessionState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null