SslChannelBuilder

SslChannelBuilder is a ChannelBuilder for Kafka clients and brokers when security.protocol configuration property is SSL.

SslChannelBuilder is a ListenerReconfigurable.

SslChannelBuilder is created when ChannelBuilders utility is used to create a ChannelBuilder for SSL security protocol.

Creating SslChannelBuilder Instance

SslChannelBuilder takes the following to be created:

  • Mode (i.e. CLIENT or SERVER)

  • Listener name (only for SERVER channel builder)

  • isInterBrokerListener flag

SslChannelBuilder initializes the internal properties.

SslChannelBuilder and SslPrincipalMapper

SslPrincipalMapper sslPrincipalMapper

sslPrincipalMapper is a SslPrincipalMapper that is used to create a SslAuthenticator when SslChannelBuilder is requested to build a channel.

sslPrincipalMapper is created based on SSL principal mapping rules when SslChannelBuilder is requested to configure with ssl.principal.mapping.rules configuration property defined.

Creating KafkaChannel — buildChannel Method

KafkaChannel buildChannel(
  String id,
  SelectionKey key,
  int maxReceiveSize,
  MemoryPool memoryPool)
Note
buildChannel is part of the ChannelBuilder contract to build a KafkaChannel.

buildChannel…​FIXME

configure Method

void configure(
  Map<String, ?> configs)
Note
configure is part of the Configurable contract to pass configurations.

configure initializes the sslPrincipalMapper internal registry (using SslPrincipalMapper utility) if ssl.principal.mapping.rules configuration property is defined.

configure creates a SslFactory (for the mode and the isInterBrokerListener flag) and requests it to configure (with the given configs).

buildTransportLayer Method

SslTransportLayer buildTransportLayer(
  SslFactory sslFactory,
  String id,
  SelectionKey key,
  String host)

buildTransportLayer…​FIXME

Note
buildTransportLayer is used when SslChannelBuilder is requested to buildChannel.

Internal Properties

Name Description

configs

Configuration properties

sslFactory

results matching ""

    No results matching ""