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

The following are the configurations with regard to WSO2 API Microgateway Toolkit. The configuration file (toolkit-config.toml) for the Microgateway toolkit is located in the <MGW-TK_HOME>/conf directory.

HeadingDescriptionSub HeadingDescriptionDefault value
clientThe configurations of the Microgateway toolkit client when connecting with the WSO2 API Manager (WSO2 API-M) server to fetch API data.httpRequestTimeoutThe client request timeout in seconds1000000
tokenThe configuration required to get a valid token from WSO2 API-M in order to communicate with its secured REST APIs.
baseURL
The base REST API URL of the WSO2 API-M server. When you update this parameter, this will be applied as the baseURL in the subsequent REST API URLs.
https://localhost:9443
restVersion
The API Manager version and its respective REST version. When you update this parameter, this will be applied as the REST version in the subsequent REST API URLs.v0.14
publisherEndpointThe Publisher REST API URL of the WSO2 API-M server.
{baseURL}/api/am/publisher/{restVersion}

In special scenarios the user can directly enter the complete URL for endpoints.

https://gateway.api.cloud.wso2.com/api/am/publisher



adminEndpointThe admin REST API URL of the WSO2 API-M server.
{baseURL}/api/am/admin/{restVersion}

In special scenarios the user can directly enter the complete URL for endpoints.

https://gateway.api.cloud.wso2.com/api/am/admin
registrationEndpointThe dynamic client registration endpoint URL of the the WSO2 API-M server. This is used to create an OAuth app in the WSO2 API-M server in order to request tokens.
{baseURL}/client-registration/{restVersion}/register

In special scenarios the user can directly enter the complete URL for endpoints.

https://gateway.api.cloud.wso2.com/client-registration/register
tokenEndpointThe token endpoint of the WSO2 API-M server that is used to request tokens in order to communicate with REST APIs.
{baseURL}/oauth2/token

In special scenarios the user can directly enter the complete URL for endpoints.

https://gateway.api.cloud.wso2.com/oauth2/token
usernameThe username of the user that is authenticated in the WSO2 API-M server in order request details from REST APIs.This value gets automatically filled when the user enters data via the CLI. You can specify a username as well, so that then the CLI only asks the user for a password.
clientIdThe client ID of the application that is created on the WSO2 API-M server. This value will also be automatically created when the user adds values via the CLI. You can override the value here in order to be able to use an already existing application rather than creating a new OAuth Application.
clientSecretThe client secret of the application. his value will also be automatically created when the user adds values via the CLI. You can override the value of the client secret here.
trustStoreLocationThe trust store location of the Microgateway toolkit.
trustStorePasswordEncoded value of the trust store password.
corsConfigurationThe Cross Origin Resource Sharing (CORS) related configuration used by the Microgateway runtimeaccessControlAllowOriginsSpecifies the allowed origins*
accessControlAllowCredentialsIncludes cookies on cross-origin requests.false
corsConfigurationEnabledDefined whether CORS support is enabled or not for the Microgateway.true
accessControlAllowHeadersAllowed headers.
["authorization", "Access-Control-Allow-Origin", "Content-Type", "SOAPAction"]
accessControlAllowMethodsAllowed HTTP methods.
["GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"]

Sample

The following is a sample Microgateway toolkit configuration file.

[client]
httpRequestTimeout = 1000000

[token]
baseURL = ""
restVersion = "v0.14"
publisherEndpoint = "{baseURL}/api/am/publisher/{restVersion}"
adminEndpoint = "{baseURL}/api/am/admin/{restVersion}"
registrationEndpoint = "{baseURL}/client-registration/{restVersion}/register"
tokenEndpoint = "{baseURL}/oauth2/token"
username = ""
clientId = ""
clientSecret = ""
trustStoreLocation = ""
trustStorePassword = ""

[corsConfiguration]
corsConfigurationEnabled = true
accessControlAllowCredentials = false
accessControlAllowOrigins = ["*"]
accessControlAllowHeaders = ["authorization", "Access-Control-Allow-Origin", "Content-Type", "SOAPAction"]
accessControlAllowMethods = ["GET", "PUT", "POST", "DELETE", "PATCH", "OPTIONS"]
  • No labels