如何确保Kafka连接的安全性,以便connection.url不被记录以显示凭据? [英] How to secure kafka connect so connection.url is not logged revealing credentials?

查看:521
本文介绍了如何确保Kafka连接的安全性,以便connection.url不被记录以显示凭据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的问题是运行连接器时正在记录凭据,我不想记录那些凭据.

The problem I am having is that credentials are being logged when running a connector, I don't want to log those.

任何线索都将不胜感激.

Any leads will be appreciated.

推荐答案

尝试使用connection.password属性,该值在登录时应被屏蔽.像这样的东西:

Try to use the connection.password property, the value should be masked while logging. Something like this :

curl -X POST http://localhost:8083/connectors -H "Content-Type: application/json" -d \
'{ 
   "name":"jdbc_source_mysql_01",
   "config":{    
      "connector.class":"io.confluent.connect.jdbc.JdbcSourceConnector"         
      "connection.url":"jdbc:mysql://mysql:3306/demo",
      "connection.user":"connect_user",
      "connection.password":"password",
      "topic.prefix":"mysql-01-",
      "mode":"bulk"
   }
}'

发布此日志应该类似于:

Post this the logs should look like :

INFO JdbcSourceTaskConfig values:
batch.max.rows = 100
connection.attempts = 3
connection.backoff.ms = 10000
connection.password = null
connection.url = jdbc:mysql://*REDACTED*

这篇关于如何确保Kafka连接的安全性,以便connection.url不被记录以显示凭据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆