This documentation is for WSO2 Microgateway 3.0.0. View documentation for the latest release.

All docs This doc
||
Skip to end of metadata
Go to start of metadata

Follow the instructions below to configure the WSO2 Microgateway Toolkit and the WSO2 Microgateway Runtime in order to use it with WSO2 API Manager 3.0.0.

Configuring the Microgateway 3.0.x Toolkit

  1. Export the public certificate of WSO2 API Manager.
    A sample command is given below.

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

    Default key store password

    Default key store password of wso2carbon.jks is "wso2carbon" 

  2. Import the certificate to the trust store in the Microgateway Toolkit.

    keytool -import -trustcacerts -alias wso2carbon2 -file wso2carbon.crt -keystore <MGW_TOOLKIT_HOME>/lib/platform/bre/security/ballerinaTruststore.p12

    Trust store location

    <MGW_TOOLKIT_HOME>/lib/platform/ will be compressed file when the toolkit it downloaded and extracted. Executing the first init command{1} with toolkit will extract this folder. Once it is executed <MGW_TOOLKIT_HOME>/lib/platform/bre/security/ballerinaTruststore.p12 file will be accessible

    {1} - micro-gw init <PROJECT_NAME>

    Default trust store password

    Default trust store password of ballerinaTruststore.p12 is "ballerina" 

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


Configuring the Microgateway 3.0.x Runtime

  1. Export public certificate of WSO2 API Manager.
    A sample command is given below.

    keytool -export -alias wso2carbon -file wso2carbon.crt -keystore <API-M_HOME>/repository/resources/security/wso2carbon.jks
  2. Import the certificate using the command given below, to the trust store in the Microgateway runtime.

    keytool -import -trustcacerts -alias wso2carbon2 -file wso2carbon.crt -keystore <MGW_RUNTIME_HOME>/runtime/bre/security/ballerinaTruststore.p12
  3. Open the <MGW_RUNTIME_HOME>/conf/micro-gw.conf file. Add the alias used to import the certificate to the trust store.
    An example is shown below for the wso2carbon2 alias.

    [jwtTokenConfig]
    issuer="https://localhost:9443/oauth2/token"
    audience="http://org.wso2.apimgt/gateway"
    certificateAlias="wso2carbon2"

You can now successfully invoke APIs through the Microgateway using the tokens issued by WSO2 API Manager 3.0.0.

  • No labels