Class KafkaAuthStore

java.lang.Object
io.confluent.security.auth.store.kafka.KafkaAuthStore
All Implemented Interfaces:
io.confluent.security.auth.metadata.AuthStore, ConsumerListener<io.confluent.security.auth.store.data.AuthKey, io.confluent.security.auth.store.data.AuthValue>, Closeable, AutoCloseable, org.apache.kafka.common.Configurable

public class KafkaAuthStore extends Object implements io.confluent.security.auth.metadata.AuthStore, ConsumerListener<io.confluent.security.auth.store.data.AuthKey, io.confluent.security.auth.store.data.AuthValue>
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from interface io.confluent.security.auth.metadata.AuthStore

    INSTANCES
  • Constructor Summary

    Constructors
    Constructor
    Description
    KafkaAuthStore(boolean isConfluentCloud, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, boolean isMdsApiEnabledOnThisBroker)
     
    KafkaAuthStore(boolean isConfluentCloud, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, boolean isMdsApiEnabledOnThisBroker, boolean skipReconciliationScanForAddOnlyUpdates)
     
    KafkaAuthStore(io.confluent.security.roledefinitions.RbacRoles rbacRoles, org.apache.kafka.common.utils.Time time, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, int numAuthTopicPartitions, boolean isMdsApiEnabledOnThisBroker)
     
    KafkaAuthStore(io.confluent.security.roledefinitions.RbacRoles rbacRoles, org.apache.kafka.common.utils.Time time, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, int numAuthTopicPartitions, boolean isMdsApiEnabledOnThisBroker, boolean skipReconciliationScanForAddOnlyUpdates)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
    void
     
    void
    close(Duration closeTimeout)
     
    void
    configure(Map<String,?> configs)
     
    final boolean
     
     
     
    void
    onConsumerRecord(org.apache.kafka.clients.consumer.ConsumerRecord<io.confluent.security.auth.store.data.AuthKey, io.confluent.security.auth.store.data.AuthValue> record, io.confluent.security.auth.store.data.AuthValue oldValue)
    Notification of new record consumed by local reader
    static boolean
     
     
     
     
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.confluent.security.auth.metadata.AuthStore

    updateStoreAuthCacheExternally
  • Field Details

  • Constructor Details

    • KafkaAuthStore

      public KafkaAuthStore(boolean isConfluentCloud, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, boolean isMdsApiEnabledOnThisBroker)
    • KafkaAuthStore

      public KafkaAuthStore(boolean isConfluentCloud, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, boolean isMdsApiEnabledOnThisBroker, boolean skipReconciliationScanForAddOnlyUpdates)
    • KafkaAuthStore

      public KafkaAuthStore(io.confluent.security.roledefinitions.RbacRoles rbacRoles, org.apache.kafka.common.utils.Time time, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, int numAuthTopicPartitions, boolean isMdsApiEnabledOnThisBroker)
    • KafkaAuthStore

      public KafkaAuthStore(io.confluent.security.roledefinitions.RbacRoles rbacRoles, org.apache.kafka.common.utils.Time time, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, int numAuthTopicPartitions, boolean isMdsApiEnabledOnThisBroker, boolean skipReconciliationScanForAddOnlyUpdates)
  • Method Details

    • retryPredicate

      public static boolean retryPredicate(Exception e)
    • configure

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

      public AbstractAuthCache authCache()
      Specified by:
      authCache in interface io.confluent.security.auth.metadata.AuthStore
    • trustCache

      public AbstractAuthCache trustCache()
      Specified by:
      trustCache in interface io.confluent.security.auth.metadata.AuthStore
    • startReader

      public CompletionStage<Void> startReader()
      Specified by:
      startReader in interface io.confluent.security.auth.metadata.AuthStore
    • startService

      public CompletionStage<Void> startService(Collection<URL> nodeUrls)
      Specified by:
      startService in interface io.confluent.security.auth.metadata.AuthStore
    • writer

      public KafkaAuthWriter writer()
      Specified by:
      writer in interface io.confluent.security.auth.metadata.AuthStore
    • isMasterWriter

      public final boolean isMasterWriter()
      Specified by:
      isMasterWriter in interface io.confluent.security.auth.metadata.AuthStore
    • masterWriterUrl

      public URL masterWriterUrl(String protocol)
      Specified by:
      masterWriterUrl in interface io.confluent.security.auth.metadata.AuthStore
    • masterWriterId

      public Integer masterWriterId()
      Specified by:
      masterWriterId in interface io.confluent.security.auth.metadata.AuthStore
    • activeNodeUrls

      public Collection<URL> activeNodeUrls(String protocol)
      Specified by:
      activeNodeUrls in interface io.confluent.security.auth.metadata.AuthStore
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • close

      public void close(Duration closeTimeout)
    • onConsumerRecord

      public void onConsumerRecord(org.apache.kafka.clients.consumer.ConsumerRecord<io.confluent.security.auth.store.data.AuthKey, io.confluent.security.auth.store.data.AuthValue> record, io.confluent.security.auth.store.data.AuthValue oldValue)
      Description copied from interface: ConsumerListener
      Notification of new record consumed by local reader
      Specified by:
      onConsumerRecord in interface ConsumerListener<io.confluent.security.auth.store.data.AuthKey, io.confluent.security.auth.store.data.AuthValue>
      Parameters:
      record - the record from consumer
      oldValue - old value corresponding to record key from local cache