Class CpcSslEngineFactoryWithSni

java.lang.Object
org.apache.kafka.common.security.ssl.DefaultSslEngineFactory
io.confluent.kafka.cpc.multitenant.CpcSslEngineFactoryWithSni
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.security.auth.SslEngineFactory

public class CpcSslEngineFactoryWithSni extends org.apache.kafka.common.security.ssl.DefaultSslEngineFactory
SSLEngineFactory that injects an SNI hostname carrying a CPC LKC ID, so a client tool (kafka-topics, producers/consumers, etc.) can drive CpcPrincipalBuilder's tenant path over SASL_SSL. Ships in the broker-plugins jar so it is on the client classpath in any install.

Configure via client SSL properties:

ssl.engine.factory.class=io.confluent.kafka.cpc.multitenant.CpcSslEngineFactoryWithSni
ssl.engine.factory.cpc.lkc.id=lkc-xxxx
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.kafka.common.security.ssl.DefaultSslEngineFactory

    org.apache.kafka.common.security.ssl.DefaultSslEngineFactory.FileBasedPemStore, org.apache.kafka.common.security.ssl.DefaultSslEngineFactory.PemStore
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class org.apache.kafka.common.security.ssl.DefaultSslEngineFactory

    PEM_TYPE, SSL_CERT_RENEW_FAILURE, SSL_GROUP_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(Map<String,?> configs)
     
    createClientSslEngine(String peerHost, int peerPort, String endpointIdentification)
     

    Methods inherited from class org.apache.kafka.common.security.ssl.DefaultSslEngineFactory

    castOrThrow, cipherSuites, close, createServerSslEngine, isEmptyWatch, keyManagers, keystore, reconfigurableConfigs, setMetrics, shouldBeRebuilt, sslContext, trustManagers, truststore

    Methods inherited from class Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • CpcSslEngineFactoryWithSni

      public CpcSslEngineFactoryWithSni()
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
      Overrides:
      configure in class org.apache.kafka.common.security.ssl.DefaultSslEngineFactory
    • createClientSslEngine

      public SSLEngine createClientSslEngine(String peerHost, int peerPort, String endpointIdentification)
      Specified by:
      createClientSslEngine in interface org.apache.kafka.common.security.auth.SslEngineFactory
      Overrides:
      createClientSslEngine in class org.apache.kafka.common.security.ssl.DefaultSslEngineFactory