Skip to content

Commit 9bba580

Browse files
committed
updating broker and client setup
1 parent a99a875 commit 9bba580

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

articles/hdinsight/kafka/apache-kafka-ssl-encryption-authentication.md

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Use the following detailed instructions to complete the broker setup:
7575
1. Change to the CA machine and sign all of the received cert signing requests:
7676

7777
```bash
78+
openssl req -new -newkey rsa:4096 -days 365 -x509 -subj "/CN=Kafka-Security-CA" -keyout ca-key -out ca-cert -nodes
7879
openssl x509 -req -CA ca-cert -CAkey ca-key -in wn0-cert-sign-request -out wn0-cert-signed -days 365 -CAcreateserial -passin pass:"MyServerPassword123"
7980
openssl x509 -req -CA ca-cert -CAkey ca-key -in wn1-cert-sign-request -out wn1-cert-signed -days 365 -CAcreateserial -passin pass:"MyServerPassword123"
8081
openssl x509 -req -CA ca-cert -CAkey ca-key -in wn2-cert-sign-request -out wn2-cert-signed -days 365 -CAcreateserial -passin pass:"MyServerPassword123"
@@ -122,31 +123,19 @@ To complete the configuration modification, do the following steps:
122123
123124
![Editing kafka ssl configuration properties in Ambari](./media/apache-kafka-ssl-encryption-authentication/editing-configuration-ambari2.png)
124125
125-
1. Run the commands below which will add configuration properties to the Kafka `server.properties` file to advertise IP addresses instead of the Fully Qualified Domain Name (FQDN)..
126+
1. Under **Advanced kafka-env** add the following lines to the end of the **kafka-env template** property.
126127
127-
```bash
128-
IP_ADDRESS=$(hostname -i)
129-
echo advertised.listeners=$IP_ADDRESS
130-
sed -i.bak -e '/advertised/{/advertised@/!d;}' /usr/hdp/current/kafka-broker/conf/server.properties
131-
echo "advertised.listeners=PLAINTEXT://$IP_ADDRESS:9092,SSL://$IP_ADDRESS:9093" >> /usr/hdp/current/kafka-broker/conf/server.properties
132-
echo "ssl.keystore.location=/home/sshuser/ssl/kafka.server.keystore.jks" >> /usr/hdp/current/kafka-broker/conf/server.properties
133-
echo "ssl.keystore.password=MyServerPassword123" >> /usr/hdp/current/kafka-broker/conf/server.properties
134-
echo "ssl.key.password=MyServerPassword123" >> /usr/hdp/current/kafka-broker/conf/server.properties
135-
echo "ssl.truststore.location=/home/sshuser/ssl/kafka.server.truststore.jks" >> /usr/hdp/current/kafka-broker/conf/server.properties
136-
echo "ssl.truststore.password=MyServerPassword123" >> /usr/hdp/current/kafka-broker/conf/server.properties
137-
```
138-
139-
1. To verify that the previous changes have been made correctly, you can optionally check that the following lines are present in the Kafka `server.properties` file.
140-
141-
```bash
142-
advertised.listeners=PLAINTEXT://10.0.0.11:9092,SSL://10.0.0.11:9093
128+
```config
129+
# Needed to configure IP address advertising
143130
ssl.keystore.location=/home/sshuser/ssl/kafka.server.keystore.jks
144131
ssl.keystore.password=MyServerPassword123
145132
ssl.key.password=MyServerPassword123
146133
ssl.truststore.location=/home/sshuser/ssl/kafka.server.truststore.jks
147134
ssl.truststore.password=MyServerPassword123
148135
```
149136
137+
![Editing kafka-env template property in Ambari](./media/apache-kafka-ssl-encryption-authentication/editing-configuration-kafka-env.png)
138+
150139
1. Restart all Kafka brokers.
151140
1. Start the admin client with producer and consumer options to verify that both producers and consumers are working on port 9093.
152141
37.2 KB
Loading

0 commit comments

Comments
 (0)