WSO2

Step-by-step installation of WSO2 API Microgateway

The open source processor WSO2 API Microgateway allows the management of microservices offered by different specialized departments of a company. It has become key to ensuring proper transportation and routing of data and messages along their entire journey. After knowing what are the prerequisites for installing this proxy key to ensuring efficiency in the current moment of digitization, it comes time to know how its installation should be done.

WSO2 API Manager 3.0.0 Configuration

Within the WSO2 API Manager 3.0.0 configuration we can differentiate between the Microgateway 3.0.x Toolkit and the Microgateway 3.0.x Runtime.

Microgateway 3.0.x Toolkit

1. Export the WSO2 API Manager public certificate. Here is an example of a command: keytool -export -alias wso2carbon -file wso2carbon.crt -keystore <API-M_HOME>/repository/resources/security/wso2carbon.jks

2. Import the certificate to the trusted Microgateway Toolkit data store. keytool -import -trustcacerts -alias wso2carbon2 – file wso2carbon.crt -keystore <MGW_TOOLKIT_HOME>/lib/platform/bre/security/ballerinaTruststore.p12

3. Change the REST API version to v0.15 to make it compatible with WSO2 API Manager 3.0.0. Open the file <MGW_TOOLKIT_HOME>/conf/toolkit-config.toml and change the version of restVersion to “v0.15”.

-Maybe you are interested: Step-by-step installation of WSO2 API Microgateway: Prerequisites

Microgateway 3.0.x Runtime

1. Export the WSO2 API Manager public certificate. An example of this type of command is shown below:

keytool -export -alias wso2carbon -file wso2carbon.crt -keystore <API-M_HOME>/repository/resources/security/wso2carbon.jks

2.Import the certificate to the trusted data store using the command below in the Microgateway runtime.

keytool -import -trustcacerts -alias wso2carbon2 -file wso2carbon.crt -keystore <MGW_RUNTIME_HOME>/runtime/bre/security/ballerinaTruststore.p12

3. Open the file <MGW_RUNTIME_HOME>/conf/micro-gw.conf. Add the alias used to import the certificate to the trusted store. Below is an example of the alias wso2carbon2:

[jwtTokenConfig]

issuer=”https://localhost:9443/oauth2/token”

audience=”http://org.wso2.apimgt/gateway”

certificateAlias=”wso2carbon2″

From this point it is now possible to run APIs successfully through Microgateway using the tokens issued by WSO2 API Manager 3.0.0.