環境依賴
zookeeper認證配置
kadmin.local -q "addprinc -randkey zookeeper/bigdata-05@HADOOP.COM"
kadmin.local -q "addprinc -randkey zookeeper/bigdata-01@HADOOP.COM"
kadmin.local -q "addprinc -randkey zookeeper/data01@HADOOP.COM"
kadmin.local -q "listprincs" 驗證添加用戶信息
kadmin.local -q "xst -k /root/keytabs/kerberos/zookeeper.keytab zookeeper/bigdata-05@HADOOP.COM"
kadmin.local -q "xst -k /root/keytabs/kerberos/zookeeper.keytab zookeeper/bigdata-01@HADOOP.COM"
kadmin.local -q "xst -k /root/keytabs/kerberos/zookeeper.keytab zookeeper/data01@HADOOP.COM"
klist -kt /root/keytabs/kerberos/zookeeper.keytab
Server{
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
keyTab="/etc/security/keytabs/zookeeper.keytab"
principal="zookeeper/bigdata-05@HADOOP.COM"
userTicketCache=false;
};
Client{
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
keyTab="/etc/security/keytabs/zookeeper.keytab"
principal="zookeeper/bigdata-05@HADOOP.COM"
userTicketCache=false;
};
authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider
requireClientAuthScheme=sasl
jaasLoginRenew=3600000
etc/java.env
export JVMFLAGS="-Djava.security.auth.login.config=/etc/security/keytabs/zooke
eper.jaas -Djava.security.krb5.conf=/etc/krb5.conf"
bin/zkServer.sh start
kafka認證配置
kadmin.local -q "addprinc -randkey kafka/bigdata-03@HADOOP.COM"
kadmin.local -q "addprinc -randkey kafka/bigdata-05@HADOOP.COM"
kadmin.local -q "listprincs" 驗證添加用戶信息
kadmin.local -q "xst -k /root/keytabs/kerberos/kafka.keytab kafka/bigdata-03@HADOOP.COM"
kadmin.local -q "xst -k /root/keytabs/kerberos/kafka.keytab kafka/bigdata-05@HADOOP.COM"
klist -kt /root/keytabs/kerberos/kafka.keytab
KafkaServer{
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
serviceName="kafka"
keyTab="/etc/security/keytabs/kafka.keytab"
principal="kafka/bigdata-03@HADOOP.COM";
};
KafkaServer{
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
storeKey=true
serviceName="kafka"
keyTab="/etc/security/keytabs/kafka.keytab"
principal="kafka/bigdata-03@HADOOP.COM";
};
listeners=SASL_PLAINTEXT://192.168.199.102:9098
advertised.listeners=SASL_PLAINTEXT://192.168.199.102:9098
security.inter.broker.protocol=SASL_PLAINTEXT
sasl.mechanism.inter.broker.protocol=GSSAPI
sasl.enabled.mechanisms=GSSAPI
sasl.kerberos.service.name=kafka //需要跟principal的名稱相同
export KAFKA_OPTS="-Dzookeeper.sasl.client=true -
Dzookeeper.sasl.client.username=zookeeper -
Djava.security.krb5.conf=/etc/krb5.conf -
Djava.security.auth.login.
config=/etc/security/keytabs/kafka.jaas"
kafka-client-jaas.conf:
KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useKeyTab=true
keyTab="/etc/security/keytabs/kafka.keytab"
storeKey=true
useTicketCache=false
principal="kafka/bigdata-03@HADOOP.COM";
};
kafka_client.properties:
security.protocol=SASL_PLAINTEXT
sasl.mechanism=GSSAPI
sasl.kerberos.service.name=kafka //需要跟principal的名稱相同
export KAFKA_OPTS="-Djava.security.krb5.conf=/etc/krb5.conf -
Djava.security.auth.login.config=/etc/security/keytabs/kafka-client-jaas.conf"
./kafka-topics.sh --list --bootstrap-server 192.168.199.102:9098 --command-config
/etc/security/keytabs/kafka_client.properties
文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。
轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/129095.html
摘要:相關文章從到學習介紹從到學習上搭建環境并構建運行簡單程序入門從到學習配置文件詳解從到學習介紹從到學習如何自定義從到學習介紹從到學習如何自定義 showImg(https://segmentfault.com/img/remote/1460000016930071?w=1920&h=1275); 前面文章我們已經知道 Flink 是什么東西了,安裝好 Flink 后,我們再來看下安裝路徑...
閱讀 3733·2023-01-11 11:02
閱讀 4243·2023-01-11 11:02
閱讀 3049·2023-01-11 11:02
閱讀 5180·2023-01-11 11:02
閱讀 4733·2023-01-11 11:02
閱讀 5533·2023-01-11 11:02
閱讀 5312·2023-01-11 11:02
閱讀 3986·2023-01-11 11:02