Closed Tushar1983 closed 7 years ago
Those are Java client configuration properties which make use of Java's JAAS framework and Java-specific trust/keystores. librdkafka (and its sibling clients) makes use of OpenSSL, see this guide how to set it up: https://github.com/edenhill/librdkafka/wiki/Using-SSL-with-librdkafka
@Tushar1983 Could you please share the steps you have taken to solve the issue. I have followed https://github.com/edenhill/librdkafka/wiki/Using-SSL-with-librdkafka and still facing issue in adding sasl.jaas.config
sasl.jaas.config is a java config not available in librdkafka. You will need to use sasl.mechanisms, ssl.ca.location, sasl.username, sasl.password etc in combination as per the configuration you have in your environment. For me I had mechanism = sals_ssl, so I used sasl.mechanisms, ssl.ca.location, sasl.username, sasl.password and it worked..
@Tushar1983 Can you please help me with configuration for 'security.protocol': 'SASL_SSL' and 'sasl.mechanisms': 'PLAIN'
Still having confusion with ssl.ca.location setting, Please let me know the steps to create ca-cert file
sasl.jaas.config is a java config not available in librdkafka. You will need to use sasl.mechanisms, ssl.ca.location, sasl.username, sasl.password etc in combination as per the configuration you have in your environment. For me I had mechanism = sals_ssl, so I used sasl.mechanisms, ssl.ca.location, sasl.username, sasl.password and it worked..
which config for ssl.truststore.password in librdkafka
Description
I am trying to publish a message to Kafka with following properties setting. security.protocol=SASL_SSL sasl.mechanism=SCRAM-SHA-256 ssl.truststore.location=/path_to/kafka.client.truststore.jks ssl.truststore.password=Welcome1 sasl.jaas.config=org.apache.kafka.common.security.scram.ScramLoginModule required username="admin" password="Welcome1"
How to reproduce
Code snippet: void KafkaProducer::request() { std::string response = "success"; std::string topic_str = "batchindexer_topic"; std::string errstr; ExampleDeliveryReportCb ex_dr_cb; Json::FastWriter writer; try { RdKafka::Conf *conf = RdKafka::Conf::create(RdKafka::Conf::CONF_GLOBAL); if (conf->set("metadata.broker.list", "bzn00acf.****.com:9092", errstr)!= RdKafka::Conf::CONF_OK) { printf("metadata.broker.list : %s\n", errstr.c_str()); exit(1); }
}
Result: ssl.truststore.location : No such configuration property: "ssl.truststore.location" ssl.truststore.password : No such configuration property: "ssl.truststore.password" sasl.jaas.config : No such configuration property: "sasl.jaas.config"