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>
Modifier and Type | Field and Description |
---|---|
static String |
AUTH_TOPIC |
static String |
METRIC_GROUP |
Constructor and Description |
---|
KafkaAuthStore(boolean isConfluentCloud,
io.confluent.security.authorizer.Scope scope,
org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo,
boolean isMdsApiEnabledOnThisBroker) |
KafkaAuthStore(io.confluent.security.rbac.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) |
Modifier and Type | Method and Description |
---|---|
Collection<URL> |
activeNodeUrls(String protocol) |
AbstractAuthCache |
authCache() |
void |
close() |
void |
close(Duration closeTimeout) |
void |
configure(Map<String,?> configs) |
protected org.apache.kafka.clients.admin.AdminClient |
createAdminClient(Map<String,Object> configs) |
protected AbstractAuthCache |
createAuthCache(io.confluent.security.rbac.RbacRoles rbacRoles,
io.confluent.security.authorizer.Scope scope) |
protected org.apache.kafka.clients.consumer.Consumer<io.confluent.security.auth.store.data.AuthKey,io.confluent.security.auth.store.data.AuthValue> |
createConsumer(Map<String,Object> configs) |
protected MetadataNodeManager |
createNodeManager(Collection<URL> nodeUrls,
KafkaStoreConfig config,
KafkaAuthWriter writer,
org.apache.kafka.common.utils.Time time) |
protected org.apache.kafka.clients.producer.Producer<io.confluent.security.auth.store.data.AuthKey,io.confluent.security.auth.store.data.AuthValue> |
createProducer(Map<String,Object> configs) |
protected KafkaAuthWriter |
createWriter(int numPartitions,
KafkaStoreConfig clientConfig,
AbstractAuthCache authCache,
StatusListener statusListener,
org.apache.kafka.common.utils.Time time) |
boolean |
isMasterWriter() |
Integer |
masterWriterId() |
URL |
masterWriterUrl(String protocol) |
protected org.apache.kafka.common.metrics.Metrics |
metrics() |
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
|
CompletionStage<Void> |
startReader() |
CompletionStage<Void> |
startService(Collection<URL> nodeUrls) |
AbstractAuthCache |
trustCache() |
KafkaAuthWriter |
writer() |
public static final String AUTH_TOPIC
public static final String METRIC_GROUP
public KafkaAuthStore(boolean isConfluentCloud, io.confluent.security.authorizer.Scope scope, org.apache.kafka.server.authorizer.internals.ConfluentAuthorizerServerInfo serverInfo, boolean isMdsApiEnabledOnThisBroker)
public KafkaAuthStore(io.confluent.security.rbac.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)
protected AbstractAuthCache createAuthCache(io.confluent.security.rbac.RbacRoles rbacRoles, io.confluent.security.authorizer.Scope scope)
public void configure(Map<String,?> configs)
configure
in interface org.apache.kafka.common.Configurable
public AbstractAuthCache authCache()
authCache
in interface io.confluent.security.auth.metadata.AuthStore
public AbstractAuthCache trustCache()
trustCache
in interface io.confluent.security.auth.metadata.AuthStore
public CompletionStage<Void> startReader()
startReader
in interface io.confluent.security.auth.metadata.AuthStore
public CompletionStage<Void> startService(Collection<URL> nodeUrls)
startService
in interface io.confluent.security.auth.metadata.AuthStore
public KafkaAuthWriter writer()
writer
in interface io.confluent.security.auth.metadata.AuthStore
public boolean isMasterWriter()
isMasterWriter
in interface io.confluent.security.auth.metadata.AuthStore
public URL masterWriterUrl(String protocol)
masterWriterUrl
in interface io.confluent.security.auth.metadata.AuthStore
public Integer masterWriterId()
masterWriterId
in interface io.confluent.security.auth.metadata.AuthStore
public Collection<URL> activeNodeUrls(String protocol)
activeNodeUrls
in interface io.confluent.security.auth.metadata.AuthStore
public void close()
close
in interface Closeable
close
in interface AutoCloseable
public void close(Duration closeTimeout)
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)
ConsumerListener
onConsumerRecord
in interface ConsumerListener<io.confluent.security.auth.store.data.AuthKey,io.confluent.security.auth.store.data.AuthValue>
record
- the record from consumeroldValue
- old value corresponding to record key from local cacheprotected org.apache.kafka.clients.consumer.Consumer<io.confluent.security.auth.store.data.AuthKey,io.confluent.security.auth.store.data.AuthValue> createConsumer(Map<String,Object> configs)
protected org.apache.kafka.clients.producer.Producer<io.confluent.security.auth.store.data.AuthKey,io.confluent.security.auth.store.data.AuthValue> createProducer(Map<String,Object> configs)
protected org.apache.kafka.clients.admin.AdminClient createAdminClient(Map<String,Object> configs)
protected MetadataNodeManager createNodeManager(Collection<URL> nodeUrls, KafkaStoreConfig config, KafkaAuthWriter writer, org.apache.kafka.common.utils.Time time)
protected KafkaAuthWriter createWriter(int numPartitions, KafkaStoreConfig clientConfig, AbstractAuthCache authCache, StatusListener statusListener, org.apache.kafka.common.utils.Time time)
protected org.apache.kafka.common.metrics.Metrics metrics()