Interface AuthorizableRequestContext


public interface AuthorizableRequestContext
Request context interface that provides data from request header as well as connection and authentication information to plugins.
  • Method Details

    • listenerName

      String listenerName()
      Returns name of listener on which request was received.
    • securityProtocol

      SecurityProtocol securityProtocol()
      Returns the security protocol for the listener on which request was received.
    • principal

      KafkaPrincipal principal()
      Returns authenticated principal for the connection on which request was received.
    • clientAddress

      InetAddress clientAddress()
      Returns client IP address from which request was sent.
    • clientAddressAsString

      default String clientAddressAsString()
    • isProxyModeLocal

      boolean isProxyModeLocal()
      Returns:
      A boolean indicating whether the PROXY Protocol header for the message was LOCAL command. This means that we don't want to log the client address since it's coming from and internal server.
    • fqdnPropertiesFromPpv2

      org.apache.kafka.common.network.BrokerFqdnBuilder.FQDNPropertiesFromPPV2 fqdnPropertiesFromPpv2()
      Returns:
      The struct of PPV2 template variables and values for use in constructing FQDNs. This may return null
    • requestType

      int requestType()
      16-bit API key of the request from the request header. See https://kafka.apache.org/protocol#protocol_api_keys for request types.
    • requestVersion

      int requestVersion()
      Returns the request version from the request header.
    • clientId

      String clientId()
      Returns the client id from the request header.
    • correlationId

      int correlationId()
      Returns the correlation id from the request header.
    • kafkaRequestId

      default long kafkaRequestId()
      Unique ID assigned to each request
    • sessionId

      default long sessionId()
      Returns session Id
    • tenantPrefix

      default Optional<String> tenantPrefix()