With Mule apps, you have a client and a server app and you want to directly hit via the other app. But, you need specific instructions on how to set up the self-signed SSL certificate and mutual TLS.
We can provide a sample of how to generate a working pair of trust store and key stores for both client and server side. Please note that you must change the passwords accordingly as this example uses the default password.
keytool -genkey -alias serveralias -dname "CN=mule-worker-r-test.usg-w1.gov.cloudhub.io, OU=Mulesoft, O=Mulesoft, L=SF, S=CA, C=US" -keyalg RSA -keypass changeit -storepass changeit -keystore srv.kst
keytool -export -alias serveralias -storepass changeit -file srv.crt -keystore srv.kst
keytool -genkey -alias clientalias -dname "CN=clientcname, OU=Mulesoft, O=Mulesoft, L=Oakland, S=CA, C=US" -keyalg RSA -keypass changeit -storepass changeit -keystore ct.kst
keytool -genkey -alias clientalias -dname "CN=clientcname, OU=Mulesoft, O=Mulesoft, L=Oakland, S=CA, C=US" -keyalg RSA -storetype PKCS12 -keypass changeit -storepass changeit -keystore ct.p12
keytool -export -alias clientalias -storepass changeit -file ct.crt -keystore ct.p12 -storetype PKCS12
keytool -import -alias serveralias -keystore ct.kst -file srv.crt --storepass changeit
keytool -import -alias clientalias -keystore srv.kst -file ct.crt --storepass changeit
The main difference of sample app is that it uses "localhost" as the path and in the certificates to allow both apps to exist on same Mule runtime as a POC to get started.
listener.jar
1. Download both above apps.
2. Deploy both of them to your local Mule 4.3.0 runtime.
3. To trigger the requests, run:
curl http://localhost:8081
4. You should see the response:
hello%
001123570

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.