-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This page describes how to define an HTTPS client and server flow in Mule 3.7. This example shows how to configure one-way SSL only.
The following is an HTTPS listener for the server flow:
<http:listener-config name="httpsServerConnector" host="localhost" port="8083" doc:name="HTTP Listener Configuration" protocol="HTTPS"> <tls:context> <tls:key-store type="jks" path="server-keystore" keyPassword="mulepass" password="mulepass" /> </tls:context> </http:listener-config>
Note that the server connector requires one key-store which will contain the public self-signed certificate and private key of the service.
Next we define a client HTTPS request config:
<http:request-config protocol="HTTPS" name="httpsClientConnector" host="localhost" port="8083" doc:name="HTTP Request Configuration"> <tls:context> <tls:trust-store path="client-truststore" password="mulepass" type="jks" /> </tls:context> </http:request-config>
This time we require to add a trust-store in the configuration which will include a key store containing the server certificate.
The Mule flows will now reference the above connectors:
` <http:listener path="httpServer" config-ref="httpServerConnector" doc:name="HTTP" /> <http:request config-ref="httpsClientConnector" path="httpsServer" method="GET" doc:name="HTTP" />
`