jks TrustStore File Cannot be found on Anypoint RTF

646 views Asked by At

I have a jks file that is deployed to src/main/resources. In my global.xml, I set the path to server_truststore.jks and password. When I deploy to Anypoint, I get the following error:

1 or more replicas in unexpected state: [Kubernetes] CrashLoopBackOff
 - Resource server_truststore.jks could not be found

Runtime: 4.3 Platform: Runtime Fabric

I have no idea what to do at this point. I don't think I can configure my TLS...

global.xml snippet:

<kafka:producer-config name="Apache_Kafka_Producer_configuration" doc:name="Apache Kafka Producer configuration" doc:id="a1830b08-51cd-4c63-9993-db5eff4d8a17" topic="${kafka.producer.publishTopicSubscriptionPattern}">
        <kafka:producer-sasl-plain-connection username="${kafka.saslUsername}" password="${kafka.saslPassword}">
            <reconnection >
                <reconnect frequency="${kafka.producer.retry.interval}" count="${kafka.producer.retry.count}" />
            </reconnection>
            <tls:context >
                <tls:trust-store path="server_truststore.jks" password="${kafka.tls.trustStore.password}" type="jks"/>
            </tls:context>
            <kafka:bootstrap-servers >
                <kafka:bootstrap-server value="${kafka.serverUrl}" />
            </kafka:bootstrap-servers>
        </kafka:producer-sasl-plain-connection>
    </kafka:producer-config>
1

There are 1 answers

2
aled On

It is possible that the connector's TLS configuration requires an absolute path. You can build it by using predefined property placeholders:

<tls:trust-store path="${mule.home}/apps/${app.name}/server_truststore.jks" ... />

See https://help.mulesoft.com/s/article/How-to-set-the-working-directory-path-relative-to-the-deployment-folder-in-Mule-4 for reference