Skip to content

Commit 285093f

Browse files
committed
配置服务器kafka的认证
1 parent 34452ed commit 285093f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

_posts/2025-08-02-kafka-sasl.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ title: kafka认证配置
55
# 服务器
66
```conf
77
8+
listeners=SASL_SSL://host.name:port
9+
security.inter.broker.protocol=SASL_SSL
10+
sasl.mechanism.inter.broker.protocol=PLAIN
811
# 关键点
912
sasl.enabled.mechanisms=PLAIN,SCRAM-SHA-256
1013
@@ -19,6 +22,8 @@ sasl.enabled.mechanisms=PLAIN,SCRAM-SHA-256
1922
```
2023
# 服务器jaas.conf
2124
```conf
25+
26+
# username 是和其它 broker 通信的。
2227
client1.KafkaServer {
2328
org.apache.kafka.common.security.plain.PlainLoginModule required
2429
username="admin"

0 commit comments

Comments
 (0)