kafka-ui
kafka-ui copied to clipboard
BE: Support PEM trust/key stores and mTLS configuration. (#1437)
- [ ] Breaking change? -- Shouldn't be, configuration changes are append-only, unspecified store type is considered as JKS/PKCS12 (both can be handled under either and technically only a preference hint).
What changes did you make? Resolves #1437
Adds support for PEM keystore/truststore and mTLS configuration, replacing manual KeyManagerFactory/TrustManagerFactory calls with spring boot SslBundle to parametrize the kafka client and http/netty clients.
TruststoreConfig/KeystoreConfigextended withtruststoreType/keystoreTypewith possible values of JKS, PKCS12 and PEMKeystoreConfigis extended withkeystoreCertificatefor [pem] client certificate file.Clusteris extended withsecurityProtocolandkafkaSslfor mTLS client certificate.
Out-of-the scope FE change: ApplicationConfigPropertiesKafkaSchemaRegistrySsl -> KeystoreConfig as reusable DTO is introduced, auto-generated one no longer exists.
Is there anything you'd like reviewers to focus on?
How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)
- [ ] No need to
- [x] Manually Tested on mTLS cluster with PEM, JKS and PKCS12 keystores
- [x] Unit checks
- [x] Integration checks
- [ ] Covered by existing automation
Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES) -- no environment variable changes is necessary in documentation compose files
- [x] My changes generate no new warnings (e.g. Sonar is happy)
- [x] I have added tests that prove my fix is effective or that my feature works -- a rather heavy setup would be required
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged -- no dependencies
Check out Contributing and Code of Conduct
A picture of a cute animal (not mandatory but encouraged)