Package io.kroxylicious.proxy.internal
Enum Class KafkaSessionState
- All Implemented Interfaces:
Serializable,Comparable<KafkaSessionState>,Constable
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.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe proxy has seen a connection, but it is not yet connected to an upstream node and ready for RPCs.The proxy has established TCP connections to both client and broker.The client has been successfully authenticated using SASLS credentials (at least once).The session is being torn down by the proxy.The client has been successfully authenticated based on details of network connection. -
Method Summary
Modifier and TypeMethodDescriptionstatic KafkaSessionStateReturns the enum constant of this class with the specified name.static KafkaSessionState[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ESTABLISHING
The proxy has seen a connection, but it is not yet connected to an upstream node and ready for RPCs. -
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
The client has been successfully authenticated based on details of network connection.Typically, this would be from a client TLS certificate.
-
SASL_AUTHENTICATED
The client has been successfully authenticated using SASLS credentials (at least once). -
TERMINATING
The session is being torn down by the proxy.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-