We have a kafkaProducer cpp application, which will send data to kafkaBrokers which are configured to authenticate using JAAS-OAUTHBEARER.
- Can I use JAAS with cpp kafkaProducer which uses librdkafka ?
- Without JAAS (with oauth mechanism of librdkafka) Can I produce data to brokers which is JAAS configured ?
Kafka producer configs:
SaslConfigs.SASL_JAAS_CONFIG = "org.apache.kafka.common.security.oauthbearer.OAuthBearerLoginModule required"
SECURITY_PROTOCOL_CONFIG = "SASL_PLAINTEXT"
sasl.mechanism = "OAUTHBEARER"
sasl.login.callback.handler.class = OAuthClientCallbackHandler.class.getName()
Kafka client
rd_kafka_conf_set (conf, "bootstrap.servers", brokers)
rd_kafka_conf_set (conf, "security.protocol", "SASL_PLAINTEXT")
rd_kafka_conf_set (conf, "sasl.mechanism", "OAUTHBEARER")
rd_kafka_conf_set_oauthbearer_token_refresh_cb(conf, token_refresh_cb_fun)
Can these two connect and send data using oauth mechanism ?