strimzi-kafka-oauth icon indicating copy to clipboard operation
strimzi-kafka-oauth copied to clipboard

Not setting a Truststore password results in a NullPointerException

Open adam-long opened this issue 2 years ago • 1 comments

If a password is not specified for a truststore (or a keystore for that matter), a NullPointerException will occur at io.strimzi.kafka.oauth.common.SSLUtil.createSSLFactory(SSLUtil.java:56).

It's common to not password-protect a truststore (as it just contains certificates that are trusted). In the case of a keystore, if its not desirable to support blank passwords, at the very least an informative error message should be thrown.

adam-long avatar Mar 01 '22 22:03 adam-long

NPE is always a bug, so that should be fixed. It also makes sense to allow for passwordless truststore.

Thanks for reporting it. Feel free to submit a PR with a proposed fix. In any case, I'll put this on a TODO for the next release.

mstruk avatar Mar 02 '22 08:03 mstruk