0

I have Mule application and using Apache Kafka connector to connect the topic. The mule-kakfa connector jar is "mule-module-kafka-2.1.0.jar" The connector uses the producer.properties and consumer.properties file and these files contains "ssl.truststore.password" in plain text. Can you please suggest how to encrypt these password and use in mule flow.

We are using spring EnvironmentStringPBEConfig but it wont decrypt the password provided in consumer.properties and producer.properties file.

Mule Kafka connector code in mule flow.

<apachekafka:config name="Apache_Kafka__Configuration" consumerPropertiesFile="consumer.properties" 
    producerPropertiesFile="producer.properties" doc:name="Apache Kafka: Configuration"/>

Can any one suggest how to use encrypted passwords in Kafka connector properties file.

Manoj
  • 1
  • as far as truststores -- you don't need a password at all to **read** from a truststore. – mazaneicha Jun 11 '19 at 16:58
  • @mazaneicha, thanks for reply. I tried it but it is giving exception org.apache.kafka.common.security.ssl.SslFactory$SecurityStore.load – Manoj Jun 12 '19 at 14:41
  • Okay thanks! Maybe its a Kafka-specific additional restriction since in general password is only required to add/modify/delete entries in truststore, see for example https://stackoverflow.com/questions/2343691/do-you-not-need-a-password-to-access-a-truststore-made-with-the-java-keytool – mazaneicha Jun 12 '19 at 15:02

1 Answers1

0

It most likely can't be done. That file is either processed inside the connector or passed directly to Kafka as properties, so any other encryption layer in the application will not see it. This is the connector for Mule 3.

The connector for Mule 4 seems to allow setting properties as key/value pairs instead. That would allow the opportunity to add any expressions or logic to decrypt the values.

aled
  • 21,330
  • 3
  • 27
  • 34