Class NettySslEngineFactoryAcceptedIssuersTest

java.lang.Object
org.apache.kafka.common.security.ssl.NettySslEngineFactoryAcceptedIssuersTest

public class NettySslEngineFactoryAcceptedIssuersTest extends Object
Tests that
invalid reference
NettySslEngineFactory.IssuerAgnosticKeyManager
presents the client certificate regardless of the server's acceptable CA list in the TLS CertificateRequest.

Simulates the SPIRE CA rotation scenario: two CAs share the same DN but have different serialNumbers. This simulates the issue of exact DN matching (including serialNumber), so when the server advertises the rotated CA, the client doesn't present the client cert signed by the old CA — even though both CAs share the same trust anchor and the broker would accept either.

  • testStrictMode_mismatchedSerialNumber_noCertPresented — demonstrates the failure: with strict mode (ssl.accepted.issuers.strict.client=true), BoringSSL's native cert selection sees the serialNumber mismatch and sends an empty Certificate message.
  • testNonStrictMode_mismatchedSerialNumber_certPresented — demonstrates the fix: with the default non-strict mode,
    invalid reference
    NettySslEngineFactory.IssuerAgnosticKeyManager
    ignores the acceptable CA list and always presents the client cert.
  • Constructor Details

    • NettySslEngineFactoryAcceptedIssuersTest

      public NettySslEngineFactoryAcceptedIssuersTest()