API Gateway Domain Template

(1 review)

home

WARN: When downloading this asset, in order to successfully work along with a proxy, change the file name suffix from mule-application-template to mule-domain before deploying it to the ../domains/ directory.


Typically, API Gateway users install the domain when auto-deploying multiple proxies that have to use the same host and port and only vary their path. API Gateway proxies, rely on a domain that includes common configuration parameters.

Usage

This asset may help users to start with some basic configuration.
It can be imported into Studio to ease customization and repackaging, but, in order to link this domain with the generated proxy there are some settings that must be preserved:

  • GAV and packaging target:
    <groupId>com.mulesoft.anypoint</groupId>
    <artifactId>gateway-proxy-domain</artifactId>
    <version>1.1.0</version>
    <packaging>mule-domain</packaging>
  • Listeners names:
    api-proxy-listener-http or
    api-proxy-listener-https

For Mule (versions 4.2.2 or later) to be able to link to generated proxies, ensure that the domain file is named proxy-shared-domain.jar when copying it to the domains folder.

Configuration

API proxy listeners must inherit your proxy domain HTTP listener configuration by using the listener configuration defined in the target domain.

The following code illustrates the HTTP listener configuration defined in a target domain:

<http:listener-config name="api-proxy-listener-http">
  <http:listener-connection host="0.0.0.0" port="8081" protocol="HTTP"/>
</http:listener-config>

For HTTP listener configuration defined in the domain, the listener setup on the API proxy must be defined as:

<http:listener config-ref="api-proxy-listener-http" path="${proxy.path}" responseStreamingMode="AUTO">
...

Also, this domain contains a file with default properties in a file config.properties. The goal of this resource is to let this settings to be provided dynamically without need to recompile domain.

Default properties

proxy.port=8081
implementation.protocol=HTTP
inbound.keystore.path=path
inbound.keystore.keyPassword=changeit
inbound.keystore.password=changeit
inbound.keystore.algorithm=
inbound.keystore.type=JKS
inbound.keystore.alias=alias

For more information, read the full documentation here.


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onMay 29, 2020
Asset overview

Asset versions for 1.1.x

Asset versions
VersionActions
1.1.1
1.1.0

Categories

Functions
Enterprise ITNo values left to add