Class DefaultSslEngineFactoryTest

java.lang.Object
org.apache.kafka.common.security.ssl.DefaultSslEngineFactoryTest
Direct Known Subclasses:
CommonNameLoggingSslEngineFactoryTest, DefaultSslEngineFactoryFipsTest, NettySslEngineFactoryTest

public class DefaultSslEngineFactoryTest extends Object
  • Constructor Details

    • DefaultSslEngineFactoryTest

      public DefaultSslEngineFactoryTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp() throws IOException
      Throws:
      IOException
    • teardown

      @AfterEach public void teardown() throws IOException
      Throws:
      IOException
    • testPemTrustStoreConfigWithOneCert

      @Test public void testPemTrustStoreConfigWithOneCert() throws Exception
      Throws:
      Exception
    • testPemTrustStoreConfigWithMultipleCerts

      @Test public void testPemTrustStoreConfigWithMultipleCerts() throws Exception
      Throws:
      Exception
    • testPemKeyStoreConfigNoPassword

      @Test public void testPemKeyStoreConfigNoPassword() throws Exception
      Throws:
      Exception
    • testPemKeyStoreConfigWithKeyPassword

      @Test public void testPemKeyStoreConfigWithKeyPassword() throws Exception
      Throws:
      Exception
    • testTrailingNewLines

      @Test public void testTrailingNewLines() throws Exception
      Throws:
      Exception
    • testLeadingNewLines

      @Test public void testLeadingNewLines() throws Exception
      Throws:
      Exception
    • testCarriageReturnLineFeed

      @Test public void testCarriageReturnLineFeed() throws Exception
      Throws:
      Exception
    • testPemTrustStoreFile

      @Test public void testPemTrustStoreFile() throws Exception
      Throws:
      Exception
    • testPemKeyStoreFileNoKeyPassword

      @Test public void testPemKeyStoreFileNoKeyPassword() throws Exception
      Throws:
      Exception
    • testPemKeyStoreFileWithKeyPassword

      @Test public void testPemKeyStoreFileWithKeyPassword() throws Exception
      Throws:
      Exception
    • pemFilePath

      public static String pemFilePath(String pem) throws Exception
      Throws:
      Exception
    • pemAsConfigValue

      public static org.apache.kafka.common.config.types.Password pemAsConfigValue(String... pemValues)
    • testReloadingOnClosed

      @Test public void testReloadingOnClosed() throws Exception
      Keystore, truststore listeners can be triggered after the factory is closed. This test ensures that no exception will be thrown in this case.
      Throws:
      Exception
    • testSSLContextFailsOnACCPFips

      @Test public void testSSLContextFailsOnACCPFips() throws Exception
      Throws:
      Exception
    • testKeyStoreFileTriggerReload

      @Test public void testKeyStoreFileTriggerReload() throws Exception
      Throws:
      Exception
    • testTrustStoreFileTriggerReload

      @Test public void testTrustStoreFileTriggerReload() throws Exception
      Throws:
      Exception
    • testTrustStoreFileFailedIfNotExistOrEmpty

      @Test public void testTrustStoreFileFailedIfNotExistOrEmpty() throws Exception
      Throws:
      Exception
    • testTrustStoreFileAutoCreateForMTls

      @Test public void testTrustStoreFileAutoCreateForMTls() throws Exception
      Throws:
      Exception
    • testTrustStoreRaceCondition

      @Test public void testTrustStoreRaceCondition() throws Exception
      In very rare cases, broker startup can fail and require manual restart due to a process creating the truststore file while another process tries to read it. If this bug exists on the branch, this test will fail about 10% of the time.
      Throws:
      Exception
    • testFileBasedStoreMaybeReload

      @Test public void testFileBasedStoreMaybeReload() throws Exception
      Throws:
      Exception
    • returnsCipherSuitesWhenConfigured

      @Test public void returnsCipherSuitesWhenConfigured()
    • returnsNullWhenCipherSuitesNotConfigured

      @Test public void returnsNullWhenCipherSuitesNotConfigured()