This folder contains all the resources needed to launch the Quick Start app configured to establish a secure connection with the Kafka broker.
The docker-compose.yml file has been revised to enable support for SSL, as follows:
-
broker
- Enabling of SSL enabled on port
29094
. - Definition of new environment variables to configure keystore, truststore, client authentication, and secrets:
KAFKA_SSL_TRUSTSTORE_FILENAME
KAFKA_SSL_TRUSTSTORE_CREDENTIALS
KAFKA_SSL_KEYSTORE_FILENAME
KAFKA_SSL_KEYSTORE_CREDENTIALS
KAFKA_SSL_KEY_CREDENTIALS
KAFKA_SSL_CLIENT_AUTH
- Enabling of SSL enabled on port
-
kafka-connector
Adaption of
adapters.xml
to include:-
New SSL endpoint (
broker:29094
):<param name="bootstrap.servers">broker:29094</param>
-
Encryption settings:
<param name="encryption.enable">true</param> <param name="encryption.protocol">TLSv1.2</param> <param name="encryption.hostname.verification.enable">false</param>
-
Configuration of the truststore to authenticate the broker:
<param name="encryption.truststore.path">secrets/kafka.connector.truststore.jks</param> <param name="encryption.truststore.password">kafka-connector-truststore-password</param>
-
Configuration of the keystore for client authentication with the broker:
<param name="encryption.keystore.enable">true</param> <param name="encryption.keystore.path">secrets/kafka-connector.keystore.jks</param> <param name="encryption.keystore.password">kafka-connector-password</param> <param name="encryption.keystore.key.password">kafka-connector-password</param>
-
-
producer
- New SSL endpoint (
broker:29094
). - Provisioning of the
producer.properties
configuration file to enable SSL support:# Enable SSL security.protocol=SSL # Truststore configuration to authenticate the broker ssl.truststore.location=/usr/app/secrets/producer.truststore.jks ssl.truststore.password=producer-truststore-password # Keystore configuration for client authentication with the broker ssl.keystore.location=/usr/app/secrets/producer.keystore.jks ssl.keystore.password=producer-password ssl.key.password=producer-password # Disable host name verification ssl.endpoint.identification.algorithm=
- New SSL endpoint (
In addition, all services reference the local secrets
folder to retrieve their secrets:
In particular,
-
broker mounts
secrets/broker
to/etc/kafka/secrets
for:- the truststore file
broker.truststore.jks
; - the keystore file
broker.keystore.jks
; - the credentials files
broker_keystore_credentials
andbroker_key_credentials
.
- the truststore file
-
kafka-connector mounts
secrets/kafka-connector
toLS_KAFKA_CONNECTOR_HOME/secrets
for:- the truststore file
kafka-connector.truststore.jks
; - the keystore file
kafka-connector.keystore.jks
;
- the truststore file
-
producer mounts
secrets/producer
to/usr/app/secrets
for:- the truststore file
producer.truststore.jks
; - the keystore file
producer.keystore.jks
;
- the truststore file
You can regenerate all of them with:
./generate-secrets.sh
From this directory, follow the same instructions you can find in the Quick Start section of the main README file.