SlideShare a Scribd company logo
KAFKA-SECURITY
微光國際
1
KAFKA-SECURITY
投影⽚進程
▸ SSL 說明
▸ Kafka 實作 SSL (Two-way)
▸ 測試 SSL
2
KAFKA-SECURITY
SSL 說明
▸ One-Way
▸ Two-Way
▸ Tips
3
SSL 說明
ONE-WAY
4
⽂字
ONE-WAY DIAGRAM
5
SSL 說明
TWO-WAY
6
SSL 說明
TWO-WAY DIAGRAM
7
SSL 說明
TIPS
▸ 兩兩者在 Kafka 設定上只差在 Client 有沒有加上 KeyStore ⽽而已
▸ 要做到 Authentication 就在設定中加入
8
KAFKA-SECURITY
KAFKA 實作 SSL(TWO-WAY)
▸ 1. 建置 CA, TrustStore, KeyStore
▸ 2. Sign trustStore 使⽤用 Shell
▸ 3. Sign KeyStore 使⽤用 Shell
▸ 4. Kafka Broker 設定
▸ 5. Kafka Clients 設定
9
KAFKA 實作 SSL(TWO-WAY)
▸ 1. 建置 CA, TrustStore, KeyStore
10
1. 建置 CA, TRUSTSTORE, KEYSTORE
CREATE TRUST STORE
#!/bin/bash
### ENV SETTING ###
BASE_DIR=$(pwd)
CERT_OUTPUT_PATH="$BASE_DIR/certificates"
KEY_STORE="$CERT_OUTPUT_PATH/kafka.keystore.jks" # Kafka keystore⽂文件路路径
PASSWORD=kafka1234567 # 密码
CLUSTER_NAME=test-cluster   # 指定别名
DAYS_VALID=365 # key有效期
STORE_PASSWORD=$PASSWORD # keystore的store密码
KEY_PASSWORD=$PASSWORD # keystore的key密码
DNAME="CN=Xiuxiu, OU=Develop, O=Mycena, L=Kaohsiung, ST=Kaohsiung, C=TW" # distinguished name
###################
# Ref: https://docs.confluent.io/current/tutorials/security_tutorial.html#creating-ssl-keys-and-certificates
mkdir -p $CERT_OUTPUT_PATH
echo "1. Create the Cluster certificate into keyStore..."
keytool -keystore $KEY_STORE -alias $CLUSTER_NAME -validity $DAYS_VALID -genkey -keyalg RSA 
        -storepass $STORE_PASSWORD -keypass $KEY_PASSWORD -dname "$DNAME"
11
1. 建置 CA, TRUSTSTORE, KEYSTORE
CREATE OWN CA
#!/bin/bash
### ENV SETTING ###
BASE_DIR=$(pwd)
CERT_OUTPUT_PATH="$BASE_DIR/certificates"
KEY_STORE="$CERT_OUTPUT_PATH/kafka.keystore.jks" # Kafka keystore⽂文件路路径
PASSWORD=kafka1234567 # 密码
CLUSTER_NAME=test-cluster   # 指定别名
DAYS_VALID=365 # key有效期
STORE_PASSWORD=$PASSWORD # keystore的store密码
KEY_PASSWORD=$PASSWORD # keystore的key密码
CERT_AUTH_FILE="$CERT_OUTPUT_PATH/ca-cert" # CA证书⽂文件路路径
DNAME="CN=Xiuxiu, OU=Develop, O=Mycena, L=Kaohsiung, ST=Kaohsiung, C=TW" # distinguished name
CA_SUBJ="/C=TW/ST=Kaohsiung/L=Kaohsiung/O=Mycenaa/CN=Xiuxiu"
###################
# Ref: https://docs.confluent.io/current/tutorials/security_tutorial.html#creating-ssl-keys-and-certificates
echo "2. 建立 Certificate Authority"
openssl req -new -x509 -keyout $CERT_OUTPUT_PATH/ca-key -out "$CERT_AUTH_FILE" -days "$DAYS_VALID" 
-passin pass:"$PASSWORD" -passout pass:"$PASSWORD" 
-subj "$CA_SUBJ"
12
KAFKA 實作 SSL(TWO-WAY)
▸ 2. Sign trustStore 使⽤用 Shell
13
KAFKA 實作 SSL(TWO-WAY)
▸ 3. Sign KeyStore 使⽤用 Shell
14
1. 建置 CA, TRUSTSTORE, KEYSTORE
CREATE KEYSTORE && SIGN TRUSTSTORE AND KEYSTONE
#!/bin/bash
### ENV SETTING ###
BASE_DIR=$(pwd)
CERT_OUTPUT_PATH="$BASE_DIR/certificates"
PASSWORD=kafka1234567 # 密码
KEY_STORE="$CERT_OUTPUT_PATH/kafka.keystore.jks" # Kafka keystore⽂文件路路径
STORE_PASSWORD=$PASSWORD # keystore的store密码
KEY_PASSWORD=$PASSWORD # keystore的key密码
TRUST_STORE="$CERT_OUTPUT_PATH/kafka.truststore.jks" # Kafka truststore⽂文件路路径
TRUST_KEY_PASSWORD=$PASSWORD # truststore的key密码
TRUST_STORE_PASSWORD=$PASSWORD # truststore的store密码
DAYS_VALID=365 # key有效期
CLUSTER_NAME=test-cluster   # 指定别名
CLUSTER_CERT_FILE="$CERT_OUTPUT_PATH/${CLUSTER_NAME}-cert" # 集群证书⽂文件路路径
CERT_AUTH_FILE="$CERT_OUTPUT_PATH/ca-cert" # CA证书⽂文件路路径
DNAME="CN=Xiuxiu, OU=Develop, O=Mycena, L=Kaohsiung, ST=Kaohsiung, C=TW" # distinguished name
CA_SUBJ="/C=TW/ST=Kaohsiung/L=Kaohsiung/O=Mycenaa/CN=Xiuxiu"
###################
# Ref: https://docs.confluent.io/current/tutorials/security_tutorial.html#creating-ssl-keys-and-certificates
echo "3. Import CA file into truststore(Add the generated CA to the someone's truststore so that someone can trust this CA.)"
keytool -keystore "$TRUST_STORE" -alias CARoot 
-import -file "$CERT_AUTH_FILE" -storepass "$TRUST_STORE_PASSWORD" -keypass "$TRUST_KEY_PASS" -noprompt
echo "4. Export Cluster cert form the key store(Export the certificate from the keystore)"
keytool -keystore "$KEY_STORE" -alias "$CLUSTER_NAME" -certreq -file "$CLUSTER_CERT_FILE" -storepass "$STORE_PASSWORD" -keypass "$KEY_PASSWORD" -noprompt
echo "5. Sign the cluster certificate with the CA"
openssl x509 -req -CA "$CERT_AUTH_FILE" -CAkey $CERT_OUTPUT_PATH/ca-key -in "$CLUSTER_CERT_FILE" 
-out "${CLUSTER_CERT_FILE}-signed" 
-days "$DAYS_VALID" -CAcreateserial -passin pass:"$PASSWORD"
echo "6. Import the CA file ino the keystore(Sign it with the CA)"
keytool -keystore "$KEY_STORE" -alias CARoot -import -file "$CERT_AUTH_FILE" -storepass "$STORE_PASSWORD" 
-keypass "$KEY_PASSWORD" -noprompt
echo "7. Impoer the Signed Cluster Cert into key store(Import both the certificate of the CA and the signed certificate into the broker keystore)"
keytool -keystore "$KEY_STORE" -alias "${CLUSTER_NAME}" -import -file "${CLUSTER_CERT_FILE}-signed" 
-storepass "$STORE_PASSWORD" -keypass "$KEY_PASSWORD" -noprompt
15
KAFKA 實作 SSL(TWO-WAY)
▸ 4. Kafka Broker 設定
▸ listeners=PLAINTEXT://0.0.0.0:29092,SSL://0.0.0.0:29093
▸ advertised.listeners=PLAINTEXT://localhost:29092,SSL://localhost:29093
▸ ssl.keystore.location=/etc/kafka/secrets/kafka.broker2.keystore.jks
▸ ssl.keystore.filename=kafka.broker2.keystore.jks
▸ ssl.keystore.password=kafka1234567
▸ ssl.key.password=kafka1234567
▸ ssl.truststore.location=/etc/kafka/secrets/kafka.broker2.truststore.jks
▸ ssl.truststore.filename=kafka.broker2.truststore.jks
▸ ssl.truststore.password=kafka1234567
▸ security.inter.broker.protocol=SSL
16
⽂字
▸ 5. Kafka Clients 設定(Producer)
▸ ssl.truststore.location=/etc/kafka/secrets/
kafka.producer.truststore.jks
▸ ssl.truststore.password=kafka1234567
▸ ssl.keystore.location=/etc/kafka/secrets/
kafka.producer.keystore.jks
▸ ssl.keystore.password=kafka1234567
▸ ssl.key.password=kafka1234567
▸ security.protocol=SSL
17
KAFKA 實作 SSL(TWO-WAY)
▸ 5. Kafka Clients 設定(Consumer)
▸ group.id=ssl-host
▸ ssl.truststore.location=/etc/kafka/secrets/
kafka.consumer.truststore.jks
▸ ssl.truststore.password=kafka1234567
▸ ssl.keystore.location=/etc/kafka/secrets/kafka.consumer.keystore.jks
▸ ssl.keystore.password=kafka1234567
▸ ssl.key.password=kafka1234567
▸ security.protocol=SSL
18
⽂字
使⽤ DOCKER-COMPOSE 進⾏設定
▸ Advertise:SSL://hostname:9093,
▸ KeyStore Location
▸ KeyStore fileName
▸ KeyStore password(Credential)
▸ Inter_Broker_protocal: SSL
▸ Src_Link: https://docs.confluent.io/current/kafka/
authentication_ssl.html
19
⽂字
測試 SSL 是否成功
▸ Command Line
▸ Program
20
測試 SSL 是否成功
COMMAND LINE
▸ Poducer
▸ Consumer
21
⽂字
PRODUCER
▸ ``` kafka-console-producer --broker-list localhost:29093 --
topic bar -producer.config /etc/kafka/secrets/
producer.ssl.config ```
22
⽂字
CONSUMER
▸ ```kafka-console-consumer --bootstrap-server localhost:
29093 --topic bar --new-consumer --from-beginning --
consumer.config /etc/kafka/secrets/consumer.ssl.config ```
23
測試 SSL 是否成功
PROGRAM
▸ 尚未經過檢驗 Producer
24
測試 SSL 是否成功
PROGRAM
▸ 尚未經過檢驗 Consumer
25

More Related Content

What's hot

[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
Oracle Korea
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
AWS Germany
 
Introduction to apache kafka
Introduction to apache kafkaIntroduction to apache kafka
Introduction to apache kafka
Samuel Kerrien
 
VMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - OverviewVMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - Overview
rajdeep
 
Apache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXApache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOX
Abhishek Mallick
 
RBAC in Azure Kubernetes Service AKS
RBAC in Azure Kubernetes Service AKSRBAC in Azure Kubernetes Service AKS
RBAC in Azure Kubernetes Service AKS
Emad Alashi
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
Derek Downey
 
Keybase Vault Auto-Unseal HashiTalks2020
Keybase Vault Auto-Unseal HashiTalks2020Keybase Vault Auto-Unseal HashiTalks2020
Keybase Vault Auto-Unseal HashiTalks2020
Bas Meijer
 
DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?
smalltown
 
Hadoop Security Now and Future
Hadoop Security Now and FutureHadoop Security Now and Future
Hadoop Security Now and Future
tcloudcomputing-tw
 
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysConsul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Mitchell Pronschinske
 
Devoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with KafkaDevoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with Kafka
László-Róbert Albert
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
Jeff Potts
 
Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...
Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...
Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...
Amazon Web Services
 
Dynamic Database Credentials: Security Contingency Planning
Dynamic Database Credentials: Security Contingency PlanningDynamic Database Credentials: Security Contingency Planning
Dynamic Database Credentials: Security Contingency Planning
Sean Chittenden
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
confluent
 
Cassandra Day London 2015: Securing Cassandra and DataStax Enterprise
Cassandra Day London 2015: Securing Cassandra and DataStax EnterpriseCassandra Day London 2015: Securing Cassandra and DataStax Enterprise
Cassandra Day London 2015: Securing Cassandra and DataStax Enterprise
DataStax Academy
 
OpenStack Storage Overview
OpenStack Storage OverviewOpenStack Storage Overview
OpenStack Storage Overview
Bharat Kumar Kobagana
 
TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?
smalltown
 

What's hot (19)

[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
[Demo session] 관리형 Kafka 서비스 - Oracle Event Hub Service
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
 
Introduction to apache kafka
Introduction to apache kafkaIntroduction to apache kafka
Introduction to apache kafka
 
VMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - OverviewVMware Hybrid Cloud Service - Overview
VMware Hybrid Cloud Service - Overview
 
Apache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOXApache Knox setup and hive and hdfs Access using KNOX
Apache Knox setup and hive and hdfs Access using KNOX
 
RBAC in Azure Kubernetes Service AKS
RBAC in Azure Kubernetes Service AKSRBAC in Azure Kubernetes Service AKS
RBAC in Azure Kubernetes Service AKS
 
Using Vault to decouple MySQL Secrets
Using Vault to decouple MySQL SecretsUsing Vault to decouple MySQL Secrets
Using Vault to decouple MySQL Secrets
 
Keybase Vault Auto-Unseal HashiTalks2020
Keybase Vault Auto-Unseal HashiTalks2020Keybase Vault Auto-Unseal HashiTalks2020
Keybase Vault Auto-Unseal HashiTalks2020
 
DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?DevOpsDays - DevOps: Security 干我何事?
DevOpsDays - DevOps: Security 干我何事?
 
Hadoop Security Now and Future
Hadoop Security Now and FutureHadoop Security Now and Future
Hadoop Security Now and Future
 
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh GatewaysConsul 1.6: Layer 7 Traffic Management and Mesh Gateways
Consul 1.6: Layer 7 Traffic Management and Mesh Gateways
 
Devoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with KafkaDevoxx Morocco 2016 - Microservices with Kafka
Devoxx Morocco 2016 - Microservices with Kafka
 
No Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with AnsibleNo Docker? No Problem: Automating installation and config with Ansible
No Docker? No Problem: Automating installation and config with Ansible
 
Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...
Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...
Advanced Approaches to Amazon VPC and Amazon Route 53 | AWS Public Sector Sum...
 
Dynamic Database Credentials: Security Contingency Planning
Dynamic Database Credentials: Security Contingency PlanningDynamic Database Credentials: Security Contingency Planning
Dynamic Database Credentials: Security Contingency Planning
 
Apache Kafka® Security Overview
Apache Kafka® Security OverviewApache Kafka® Security Overview
Apache Kafka® Security Overview
 
Cassandra Day London 2015: Securing Cassandra and DataStax Enterprise
Cassandra Day London 2015: Securing Cassandra and DataStax EnterpriseCassandra Day London 2015: Securing Cassandra and DataStax Enterprise
Cassandra Day London 2015: Securing Cassandra and DataStax Enterprise
 
OpenStack Storage Overview
OpenStack Storage OverviewOpenStack Storage Overview
OpenStack Storage Overview
 
TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?TW SEAT - DevOps: Security 干我何事?
TW SEAT - DevOps: Security 干我何事?
 

Similar to Kafka security ssl

HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
Michał Czeraszkiewicz
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21
Max Kleiner
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
zznate
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
DataStax Academy
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
Nick Maludy
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
Puppet
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
zznate
 
Java Keytool Keystore Commands
Java Keytool Keystore CommandsJava Keytool Keystore Commands
Java Keytool Keystore Commands
SSLWiki
 
WebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL ConfigurationWebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL Configuration
Simon Haslam
 
Configuring SSL on NGNINX and less tricky servers
Configuring SSL on NGNINX and less tricky serversConfiguring SSL on NGNINX and less tricky servers
Configuring SSL on NGNINX and less tricky servers
Axilis
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Nick Maludy
 
Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006
Martin Kobetic
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
Bram Vogelaar
 
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Jeff Horwitz
 
Cassandra Security Configuration
Cassandra Security ConfigurationCassandra Security Configuration
Cassandra Security Configuration
Braja Krishna Das
 
Paris FOD meetup - kafka security 101
Paris FOD meetup - kafka security 101Paris FOD meetup - kafka security 101
Paris FOD meetup - kafka security 101
Abdelkrim Hadjidj
 
Types of ssl commands and keytool
Types of ssl commands and keytoolTypes of ssl commands and keytool
Types of ssl commands and keytool
CheapSSLsecurity
 
Travis and fastlane
Travis and fastlaneTravis and fastlane
Travis and fastlane
Steven Shen
 
Kafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right WayKafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right Way
Saylor Twift
 
How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7
VCP Muthukrishna
 

Similar to Kafka security ssl (20)

HashiCorp's Vault - The Examples
HashiCorp's Vault - The ExamplesHashiCorp's Vault - The Examples
HashiCorp's Vault - The Examples
 
Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21Open SSL and MS Crypto API EKON21
Open SSL and MS Crypto API EKON21
 
Hardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoiaHardening cassandra for compliance or paranoia
Hardening cassandra for compliance or paranoia
 
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
The Last Pickle: Hardening Apache Cassandra for Compliance (or Paranoia).
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
The Dynamic Duo of Puppet and Vault tame SSL Certificates - Puppet Camps Cent...
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoiaSeattle C* Meetup: Hardening cassandra for compliance or paranoia
Seattle C* Meetup: Hardening cassandra for compliance or paranoia
 
Java Keytool Keystore Commands
Java Keytool Keystore CommandsJava Keytool Keystore Commands
Java Keytool Keystore Commands
 
WebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL ConfigurationWebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL Configuration
 
Configuring SSL on NGNINX and less tricky servers
Configuring SSL on NGNINX and less tricky serversConfiguring SSL on NGNINX and less tricky servers
Configuring SSL on NGNINX and less tricky servers
 
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL CertificatesHashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
Hashitalks 2021 - How the Dynamic Duo of Vault and Puppet Tame SSL Certificates
 
Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006Secure Communications with VisualWorks - CSTUC 2006
Secure Communications with VisualWorks - CSTUC 2006
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp VaultChickens & Eggs: Managing secrets in AWS with Hashicorp Vault
Chickens & Eggs: Managing secrets in AWS with Hashicorp Vault
 
Cassandra Security Configuration
Cassandra Security ConfigurationCassandra Security Configuration
Cassandra Security Configuration
 
Paris FOD meetup - kafka security 101
Paris FOD meetup - kafka security 101Paris FOD meetup - kafka security 101
Paris FOD meetup - kafka security 101
 
Types of ssl commands and keytool
Types of ssl commands and keytoolTypes of ssl commands and keytool
Types of ssl commands and keytool
 
Travis and fastlane
Travis and fastlaneTravis and fastlane
Travis and fastlane
 
Kafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right WayKafka 2018 - Securing Kafka the Right Way
Kafka 2018 - Securing Kafka the Right Way
 
How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7How To Install and Configure Apache SSL on CentOS 7
How To Install and Configure Apache SSL on CentOS 7
 

More from Heng-Xiu Xu

從 NN 到 嗯嗯
從 NN 到 嗯嗯從 NN 到 嗯嗯
從 NN 到 嗯嗯
Heng-Xiu Xu
 
[MS] Thesis Defense
[MS] Thesis Defense[MS] Thesis Defense
[MS] Thesis Defense
Heng-Xiu Xu
 
Deep learning nlp
Deep learning nlpDeep learning nlp
Deep learning nlp
Heng-Xiu Xu
 
General guide in nlp
General guide in nlpGeneral guide in nlp
General guide in nlp
Heng-Xiu Xu
 
NLP 簡單簡報
NLP 簡單簡報NLP 簡單簡報
NLP 簡單簡報
Heng-Xiu Xu
 
Alexa overview
Alexa overviewAlexa overview
Alexa overview
Heng-Xiu Xu
 

More from Heng-Xiu Xu (6)

從 NN 到 嗯嗯
從 NN 到 嗯嗯從 NN 到 嗯嗯
從 NN 到 嗯嗯
 
[MS] Thesis Defense
[MS] Thesis Defense[MS] Thesis Defense
[MS] Thesis Defense
 
Deep learning nlp
Deep learning nlpDeep learning nlp
Deep learning nlp
 
General guide in nlp
General guide in nlpGeneral guide in nlp
General guide in nlp
 
NLP 簡單簡報
NLP 簡單簡報NLP 簡單簡報
NLP 簡單簡報
 
Alexa overview
Alexa overviewAlexa overview
Alexa overview
 

Recently uploaded

Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
Wask
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
Wouter Lemaire
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
Tatiana Kojar
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
David Brossard
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
DanBrown980551
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 

Recently uploaded (20)

Digital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying AheadDigital Marketing Trends in 2024 | Guide for Staying Ahead
Digital Marketing Trends in 2024 | Guide for Staying Ahead
 
UI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentationUI5 Controls simplified - UI5con2024 presentation
UI5 Controls simplified - UI5con2024 presentation
 
Skybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoptionSkybuffer SAM4U tool for SAP license adoption
Skybuffer SAM4U tool for SAP license adoption
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
OpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - AuthorizationOpenID AuthZEN Interop Read Out - Authorization
OpenID AuthZEN Interop Read Out - Authorization
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides5th LF Energy Power Grid Model Meet-up Slides
5th LF Energy Power Grid Model Meet-up Slides
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 

Kafka security ssl

  • 2. KAFKA-SECURITY 投影⽚進程 ▸ SSL 說明 ▸ Kafka 實作 SSL (Two-way) ▸ 測試 SSL 2
  • 8. SSL 說明 TIPS ▸ 兩兩者在 Kafka 設定上只差在 Client 有沒有加上 KeyStore ⽽而已 ▸ 要做到 Authentication 就在設定中加入 8
  • 9. KAFKA-SECURITY KAFKA 實作 SSL(TWO-WAY) ▸ 1. 建置 CA, TrustStore, KeyStore ▸ 2. Sign trustStore 使⽤用 Shell ▸ 3. Sign KeyStore 使⽤用 Shell ▸ 4. Kafka Broker 設定 ▸ 5. Kafka Clients 設定 9
  • 10. KAFKA 實作 SSL(TWO-WAY) ▸ 1. 建置 CA, TrustStore, KeyStore 10
  • 11. 1. 建置 CA, TRUSTSTORE, KEYSTORE CREATE TRUST STORE #!/bin/bash ### ENV SETTING ### BASE_DIR=$(pwd) CERT_OUTPUT_PATH="$BASE_DIR/certificates" KEY_STORE="$CERT_OUTPUT_PATH/kafka.keystore.jks" # Kafka keystore⽂文件路路径 PASSWORD=kafka1234567 # 密码 CLUSTER_NAME=test-cluster   # 指定别名 DAYS_VALID=365 # key有效期 STORE_PASSWORD=$PASSWORD # keystore的store密码 KEY_PASSWORD=$PASSWORD # keystore的key密码 DNAME="CN=Xiuxiu, OU=Develop, O=Mycena, L=Kaohsiung, ST=Kaohsiung, C=TW" # distinguished name ################### # Ref: https://docs.confluent.io/current/tutorials/security_tutorial.html#creating-ssl-keys-and-certificates mkdir -p $CERT_OUTPUT_PATH echo "1. Create the Cluster certificate into keyStore..." keytool -keystore $KEY_STORE -alias $CLUSTER_NAME -validity $DAYS_VALID -genkey -keyalg RSA         -storepass $STORE_PASSWORD -keypass $KEY_PASSWORD -dname "$DNAME" 11
  • 12. 1. 建置 CA, TRUSTSTORE, KEYSTORE CREATE OWN CA #!/bin/bash ### ENV SETTING ### BASE_DIR=$(pwd) CERT_OUTPUT_PATH="$BASE_DIR/certificates" KEY_STORE="$CERT_OUTPUT_PATH/kafka.keystore.jks" # Kafka keystore⽂文件路路径 PASSWORD=kafka1234567 # 密码 CLUSTER_NAME=test-cluster   # 指定别名 DAYS_VALID=365 # key有效期 STORE_PASSWORD=$PASSWORD # keystore的store密码 KEY_PASSWORD=$PASSWORD # keystore的key密码 CERT_AUTH_FILE="$CERT_OUTPUT_PATH/ca-cert" # CA证书⽂文件路路径 DNAME="CN=Xiuxiu, OU=Develop, O=Mycena, L=Kaohsiung, ST=Kaohsiung, C=TW" # distinguished name CA_SUBJ="/C=TW/ST=Kaohsiung/L=Kaohsiung/O=Mycenaa/CN=Xiuxiu" ################### # Ref: https://docs.confluent.io/current/tutorials/security_tutorial.html#creating-ssl-keys-and-certificates echo "2. 建立 Certificate Authority" openssl req -new -x509 -keyout $CERT_OUTPUT_PATH/ca-key -out "$CERT_AUTH_FILE" -days "$DAYS_VALID" -passin pass:"$PASSWORD" -passout pass:"$PASSWORD" -subj "$CA_SUBJ" 12
  • 13. KAFKA 實作 SSL(TWO-WAY) ▸ 2. Sign trustStore 使⽤用 Shell 13
  • 14. KAFKA 實作 SSL(TWO-WAY) ▸ 3. Sign KeyStore 使⽤用 Shell 14
  • 15. 1. 建置 CA, TRUSTSTORE, KEYSTORE CREATE KEYSTORE && SIGN TRUSTSTORE AND KEYSTONE #!/bin/bash ### ENV SETTING ### BASE_DIR=$(pwd) CERT_OUTPUT_PATH="$BASE_DIR/certificates" PASSWORD=kafka1234567 # 密码 KEY_STORE="$CERT_OUTPUT_PATH/kafka.keystore.jks" # Kafka keystore⽂文件路路径 STORE_PASSWORD=$PASSWORD # keystore的store密码 KEY_PASSWORD=$PASSWORD # keystore的key密码 TRUST_STORE="$CERT_OUTPUT_PATH/kafka.truststore.jks" # Kafka truststore⽂文件路路径 TRUST_KEY_PASSWORD=$PASSWORD # truststore的key密码 TRUST_STORE_PASSWORD=$PASSWORD # truststore的store密码 DAYS_VALID=365 # key有效期 CLUSTER_NAME=test-cluster   # 指定别名 CLUSTER_CERT_FILE="$CERT_OUTPUT_PATH/${CLUSTER_NAME}-cert" # 集群证书⽂文件路路径 CERT_AUTH_FILE="$CERT_OUTPUT_PATH/ca-cert" # CA证书⽂文件路路径 DNAME="CN=Xiuxiu, OU=Develop, O=Mycena, L=Kaohsiung, ST=Kaohsiung, C=TW" # distinguished name CA_SUBJ="/C=TW/ST=Kaohsiung/L=Kaohsiung/O=Mycenaa/CN=Xiuxiu" ################### # Ref: https://docs.confluent.io/current/tutorials/security_tutorial.html#creating-ssl-keys-and-certificates echo "3. Import CA file into truststore(Add the generated CA to the someone's truststore so that someone can trust this CA.)" keytool -keystore "$TRUST_STORE" -alias CARoot -import -file "$CERT_AUTH_FILE" -storepass "$TRUST_STORE_PASSWORD" -keypass "$TRUST_KEY_PASS" -noprompt echo "4. Export Cluster cert form the key store(Export the certificate from the keystore)" keytool -keystore "$KEY_STORE" -alias "$CLUSTER_NAME" -certreq -file "$CLUSTER_CERT_FILE" -storepass "$STORE_PASSWORD" -keypass "$KEY_PASSWORD" -noprompt echo "5. Sign the cluster certificate with the CA" openssl x509 -req -CA "$CERT_AUTH_FILE" -CAkey $CERT_OUTPUT_PATH/ca-key -in "$CLUSTER_CERT_FILE" -out "${CLUSTER_CERT_FILE}-signed" -days "$DAYS_VALID" -CAcreateserial -passin pass:"$PASSWORD" echo "6. Import the CA file ino the keystore(Sign it with the CA)" keytool -keystore "$KEY_STORE" -alias CARoot -import -file "$CERT_AUTH_FILE" -storepass "$STORE_PASSWORD" -keypass "$KEY_PASSWORD" -noprompt echo "7. Impoer the Signed Cluster Cert into key store(Import both the certificate of the CA and the signed certificate into the broker keystore)" keytool -keystore "$KEY_STORE" -alias "${CLUSTER_NAME}" -import -file "${CLUSTER_CERT_FILE}-signed" -storepass "$STORE_PASSWORD" -keypass "$KEY_PASSWORD" -noprompt 15
  • 16. KAFKA 實作 SSL(TWO-WAY) ▸ 4. Kafka Broker 設定 ▸ listeners=PLAINTEXT://0.0.0.0:29092,SSL://0.0.0.0:29093 ▸ advertised.listeners=PLAINTEXT://localhost:29092,SSL://localhost:29093 ▸ ssl.keystore.location=/etc/kafka/secrets/kafka.broker2.keystore.jks ▸ ssl.keystore.filename=kafka.broker2.keystore.jks ▸ ssl.keystore.password=kafka1234567 ▸ ssl.key.password=kafka1234567 ▸ ssl.truststore.location=/etc/kafka/secrets/kafka.broker2.truststore.jks ▸ ssl.truststore.filename=kafka.broker2.truststore.jks ▸ ssl.truststore.password=kafka1234567 ▸ security.inter.broker.protocol=SSL 16
  • 17. ⽂字 ▸ 5. Kafka Clients 設定(Producer) ▸ ssl.truststore.location=/etc/kafka/secrets/ kafka.producer.truststore.jks ▸ ssl.truststore.password=kafka1234567 ▸ ssl.keystore.location=/etc/kafka/secrets/ kafka.producer.keystore.jks ▸ ssl.keystore.password=kafka1234567 ▸ ssl.key.password=kafka1234567 ▸ security.protocol=SSL 17
  • 18. KAFKA 實作 SSL(TWO-WAY) ▸ 5. Kafka Clients 設定(Consumer) ▸ group.id=ssl-host ▸ ssl.truststore.location=/etc/kafka/secrets/ kafka.consumer.truststore.jks ▸ ssl.truststore.password=kafka1234567 ▸ ssl.keystore.location=/etc/kafka/secrets/kafka.consumer.keystore.jks ▸ ssl.keystore.password=kafka1234567 ▸ ssl.key.password=kafka1234567 ▸ security.protocol=SSL 18
  • 19. ⽂字 使⽤ DOCKER-COMPOSE 進⾏設定 ▸ Advertise:SSL://hostname:9093, ▸ KeyStore Location ▸ KeyStore fileName ▸ KeyStore password(Credential) ▸ Inter_Broker_protocal: SSL ▸ Src_Link: https://docs.confluent.io/current/kafka/ authentication_ssl.html 19
  • 20. ⽂字 測試 SSL 是否成功 ▸ Command Line ▸ Program 20
  • 21. 測試 SSL 是否成功 COMMAND LINE ▸ Poducer ▸ Consumer 21
  • 22. ⽂字 PRODUCER ▸ ``` kafka-console-producer --broker-list localhost:29093 -- topic bar -producer.config /etc/kafka/secrets/ producer.ssl.config ``` 22
  • 23. ⽂字 CONSUMER ▸ ```kafka-console-consumer --bootstrap-server localhost: 29093 --topic bar --new-consumer --from-beginning -- consumer.config /etc/kafka/secrets/consumer.ssl.config ``` 23
  • 24. 測試 SSL 是否成功 PROGRAM ▸ 尚未經過檢驗 Producer 24
  • 25. 測試 SSL 是否成功 PROGRAM ▸ 尚未經過檢驗 Consumer 25