環(huán)境依賴
zookeeper認(rèn)證配置
kadmin.local -q "addprinc -randkey zookeeper/[email protected]"
kadmin.local -q "addprinc -randkey zookeeper/[email protected]"
kadmin.local -q "addprinc -randkey zookeeper/[email protected]"
kadmin.local -q "listprincs" 驗(yàn)證添加用戶信息
kadmin.local -q "xst -k /root/keytabs/kerberos/zookeeper.keytab zookeeper/[email protected]"
kadmin.local -q "xst -k /root/keytabs/kerberos/zookeeper.keytab zookeeper/[email protected]"
kadmin.local -q "xst -k /root/keytabs/kerberos/zookeeper.keytab zookeeper/[email protected]"
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認(rèn)證配置
kadmin.local -q "addprinc -randkey kafka/[email protected]"
kadmin.local -q "addprinc -randkey kafka/[email protected]"
kadmin.local -q "listprincs" 驗(yàn)證添加用戶信息
kadmin.local -q "xst -k /root/keytabs/kerberos/kafka.keytab kafka/[email protected]"
kadmin.local -q "xst -k /root/keytabs/kerberos/kafka.keytab kafka/[email protected]"
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
文章版權(quán)歸作者所有,未經(jīng)允許請(qǐng)勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請(qǐng)注明本文地址:http://systransis.cn/yun/129095.html
摘要:相關(guān)文章從到學(xué)習(xí)介紹從到學(xué)習(xí)上搭建環(huán)境并構(gòu)建運(yùn)行簡(jiǎn)單程序入門從到學(xué)習(xí)配置文件詳解從到學(xué)習(xí)介紹從到學(xué)習(xí)如何自定義從到學(xué)習(xí)介紹從到學(xué)習(xí)如何自定義 showImg(https://segmentfault.com/img/remote/1460000016930071?w=1920&h=1275); 前面文章我們已經(jīng)知道 Flink 是什么東西了,安裝好 Flink 后,我們?cè)賮砜聪掳惭b路徑...
閱讀 3668·2023-01-11 11:02
閱讀 4210·2023-01-11 11:02
閱讀 3008·2023-01-11 11:02
閱讀 5148·2023-01-11 11:02
閱讀 4702·2023-01-11 11:02
閱讀 5486·2023-01-11 11:02
閱讀 5235·2023-01-11 11:02
閱讀 3864·2023-01-11 11:02