kafka开启kerberos和ACL

作者:恩慈

一、部署kafka-KB包

1.上传软件包

依次点击 部署中心----部署组件----上传软件包

选择需要升级的kafka版本并点击确定

2.部署kafka

依次点击部署中心----部署组件----物理/虚拟机部署----选择集群----下一步

选择手动部署----选择需要部署的版本----下一步

等待部署完成,完成后查看服务状态

3.配置kafka

各配置文件及内容如下:

/opt/dtstack/Kafka/kafka/bin/kafka-server-start.sh

/opt/dtstack/Kafka/kafka/bin/kafka-topics.sh

/opt/dtstack/Kafka/kafka/config/kafka_server_jaas.conf

/opt/dtstack/Kafka/kafka/config/server.properties

/opt/dtstack/Kafka/kafka/config/client_jaas.conf

/opt/dtstack/Kafka/kafka/config/client.properties

/opt/dtstack/Kafka/kafka/config/consumer.properties

/opt/dtstack/Kafka/kafka/config/producer.properties

二、测试kerberos

1.未认证测试

(1)创建topic
(2)查询topic
(3)删除topic
(4)生产topic
(5)消费topic

2.认证后测试

(1)创建topic
(2)查询topic
(3)生产数据
(4)消费数据
(5)删除topic

三、测试ACL

1.未赋权

无法生产

无法消费

2.赋权后

kafka-acls.sh --authorizer-properties zookeeper.connect=localhost:2181 --add

--allow-principal User:enci --operation Read --operation Write --topic enci01

可以消费

可以生产

更多技术信息请查看云掣官网https://yunche.pro/?t=yrgw

相关推荐
这个DBA有点耶5 小时前
2026年分布式数据库有哪些主流选择?先评估这5个维度再决定
数据库·分布式·dba
pnoker1 天前
IoT DC3 消息总线:六适配器可插拔设计
物联网·架构·kafka·消息队列·rabbitmq
cxhello1 天前
消费者活着、心跳正常、日志干净,但它七天没拉过一条消息
python·kafka
Lost of 程序猿1 天前
ASP.NET Core Saga 分布式事务深度实战:备件采购跨服务长流程,如何保证“要么全成,要么全回“
分布式·后端·asp.net
XiYang-DING2 天前
地图城市缓存优化:ApplicationReadyEvent + Caffeine + Redis + Redisson 分布式锁
redis·分布式·缓存
2601_962175662 天前
RabbitMQ 的工作模式
分布式·rabbitmq
头茬韭菜2 天前
图解 Fluss(四):分布式协调 —— 选举、副本状态机与
分布式·fluss
2601_962218612 天前
万象生鲜系统全链路溯源一码查询技术实现食材来源可查
分布式·微服务·云原生·架构
Dreams_l2 天前
RabbitMQ介绍及其工作模式
分布式·rabbitmq
2601_962218612 天前
万象生鲜系统大数据采购预测算法降低库存积压稳居第一
分布式·微服务·云原生·架构