Skip to content

Commit 1050755

Browse files
authored
Merge pull request #92055 from hrasheed-msft/hdi_ssl_updates
updating broker and client setup
2 parents 86654e1 + 19f10e3 commit 1050755

File tree

2 files changed

+11
-17
lines changed

2 files changed

+11
-17
lines changed

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

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ Use the following detailed instructions to complete the broker setup:
7272
scp cert-file sshuser@HeadNode0_Name:~/ssl/wnX-cert-sign-request
7373
```
7474

75+
1. On the CA machine run the following command to create ca-cert and ca-key files:
76+
77+
```bash
78+
openssl req -new -newkey rsa:4096 -days 365 -x509 -subj "/CN=Kafka-Security-CA" -keyout ca-key -out ca-cert -nodes
79+
```
80+
7581
1. Change to the CA machine and sign all of the received cert signing requests:
7682

7783
```bash
@@ -122,31 +128,19 @@ To complete the configuration modification, do the following steps:
122128
123129
![Editing kafka ssl configuration properties in Ambari](./media/apache-kafka-ssl-encryption-authentication/editing-configuration-ambari2.png)
124130
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-
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.
131+
1. Under **Advanced kafka-env** add the following lines to the end of the **kafka-env template** property.
140132
141-
```bash
142-
advertised.listeners=PLAINTEXT://10.0.0.11:9092,SSL://10.0.0.11:9093
133+
```config
134+
# Needed to configure IP address advertising
143135
ssl.keystore.location=/home/sshuser/ssl/kafka.server.keystore.jks
144136
ssl.keystore.password=MyServerPassword123
145137
ssl.key.password=MyServerPassword123
146138
ssl.truststore.location=/home/sshuser/ssl/kafka.server.truststore.jks
147139
ssl.truststore.password=MyServerPassword123
148140
```
149141
142+
![Editing kafka-env template property in Ambari](./media/apache-kafka-ssl-encryption-authentication/editing-configuration-kafka-env.png)
143+
150144
1. Restart all Kafka brokers.
151145
1. Start the admin client with producer and consumer options to verify that both producers and consumers are working on port 9093.
152146
37.2 KB
Loading

0 commit comments

Comments
 (0)