Class UserDeletionEventHandler

java.lang.Object
io.confluent.kafka.server.plugins.auth.UserDeletionEventHandler
All Implemented Interfaces:
AutoCloseable, kafka.common.DeletionEventHandler, org.apache.kafka.common.Configurable, org.apache.kafka.image.publisher.MetadataPublisher

public class UserDeletionEventHandler extends Object implements kafka.common.DeletionEventHandler
This class is responsible for processing user deletion events and performing soft deletion of ACLs associated with the deleted user. Soft deletion of ACLs means it would create identical ACLs with AclState::DELETED and delete the existing active ACLs associated with the user.
  • Field Details

    • USER_DELETION_HANDLER_EVENT_FAILURE_RATE

      public static final String USER_DELETION_HANDLER_EVENT_FAILURE_RATE
      See Also:
    • USER_DELETION_HANDLER_EVENT_COUNT

      public static final String USER_DELETION_HANDLER_EVENT_COUNT
      See Also:
    • authorizerPlugin

      public final Optional<org.apache.kafka.common.internals.Plugin<org.apache.kafka.server.authorizer.Authorizer>> authorizerPlugin
    • userMetaDataKeyUserMetaDataValueMap

      public final Map<UserMetaDataKey, UserMetaDataValue> userMetaDataKeyUserMetaDataValueMap
  • Constructor Details

    • UserDeletionEventHandler

      public UserDeletionEventHandler(Map<String,?> interBrokerClientConfigs, Optional<org.apache.kafka.common.internals.Plugin<org.apache.kafka.server.authorizer.Authorizer>> authorizerPlugin, org.apache.kafka.common.metrics.Metrics metrics, int controllerNodeID)
    • UserDeletionEventHandler

      public UserDeletionEventHandler(Map<String,?> interBrokerClientConfigs, Optional<org.apache.kafka.common.internals.Plugin<org.apache.kafka.server.authorizer.Authorizer>> authorizerPlugin, org.apache.kafka.common.metrics.Metrics metrics, int controllerNodeID, org.apache.kafka.common.utils.Time time)
  • Method Details

    • name

      public String name()
      Specified by:
      name in interface kafka.common.DeletionEventHandler
      Specified by:
      name in interface org.apache.kafka.image.publisher.MetadataPublisher
    • onMetadataUpdate

      public void onMetadataUpdate(org.apache.kafka.image.MetadataDelta delta, org.apache.kafka.image.MetadataImage newImage, org.apache.kafka.image.loader.LoaderManifest manifest)
      Specified by:
      onMetadataUpdate in interface org.apache.kafka.image.publisher.MetadataPublisher
    • onControllerChange

      public void onControllerChange(org.apache.kafka.raft.LeaderAndEpoch newLeaderAndEpoch)
      Specified by:
      onControllerChange in interface kafka.common.DeletionEventHandler
      Specified by:
      onControllerChange in interface org.apache.kafka.image.publisher.MetadataPublisher
    • start

      public CompletableFuture<Void> start(Boolean isActiveController)
      Specified by:
      start in interface kafka.common.DeletionEventHandler
    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface org.apache.kafka.image.publisher.MetadataPublisher
    • getContext

      public org.apache.kafka.server.authorizer.AuthorizableRequestContext getContext()
      Returns a dummy AuthorizableRequestContext which is passed in authorizer::deleteACLs
    • getInstance

      public static UserDeletionEventHandler getInstance(String brokerSessionUuid)
    • metrics

      public org.apache.kafka.common.metrics.Metrics metrics()
      Specified by:
      metrics in interface kafka.common.DeletionEventHandler