API Gateway Domain Template

(1 review)

home

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.anypoint.mulesoft</groupId>
    <artifactId>gateway-proxy-domain</artifactId>
    <version>1.0.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, the following modifications need to be made:

  • Ensure that the domain file is named proxy-shared-domain.jar when copying it to the domains folder

  • In META-INF/maven/com.anypoint.mulesoft/gateway-proxy-domain/pom.xml: change the value under <groupId> for com.mulesoft.anypoint.

  • In META-INF/mule-artifact/classloader-model.json: change the value under "groupId": for com.mulesoft.anypoint.

Configuration

There are two listener configurations named api-proxy-listener-http and api-proxy-listener-https.

  • api-proxy-listener-http binds to all interfaces and uses port 8081
<http:listener-config name="api-proxy-listener-http">
        <http:listener-connection host="0.0.0.0" port="${proxy.port}" protocol="${implementation.protocol}"/>
    </http:listener-config>
  • api-proxy-listener-https is the listener configuration for HTTPS comunications. In order to use it you must uncomment code and configure certificates and passwords.

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


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Organization
Published onNov 16, 2018
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.0

Categories

Functions
Enterprise ITNo values left to add