Choreo Connect Adapter Configuration Catalog¶
This document describes all the configuration parameters that are used in Choreo Connect Adapter.
Instructions for use¶
-
Open the Choreo Connect configuration file according to the deployment type you are using.
Click here to see the configuration file location for your Choreo Connect deployment.
Navigate to the correct folder path and open the
config.toml
orconfig-toml-configmap.yaml
file based on your Choreo Connect deployment.Deployment Mode File name Directory Docker Compose Choreo Connect as a Standalone Gateway config.toml
<CHOREO-CONNECT_HOME>/docker-compose/choreo-connect/conf/
Docker Compose Choreo Connect with WSO2 API Manager as a Control Plane config.toml
<CHOREO-CONNECT_HOME>/docker-compose/choreo-connect-with-apim/conf/
Kubernetes Choreo Connect as a Standalone Gateway config-toml-configmap.yaml
<CHOREO-CONNECT_HOME>/k8s-artifacts/choreo-connect/
Kubernetes Choreo Connect with WSO2 API Manager as a Control Plane config-toml-configmap.yaml
<CHOREO-CONNECT_HOME>/k8s-artifacts/choreo-connect-with-apim/
-
Select the configuration sections, parameters, and values that are required for your use and add them as required. You can click view sample in each of the sections in this page to get the toml format.
See the example .toml file given below.
# This is an example .toml file.
[adapter.server]
enabled = true
host = "0.0.0.0"
port = "9843"
tokenTTL = "1h"
tokenPrivateKeyPath = "/home/wso2/security/keystore/mg.key"
[[adapter.server.users]]
username = "admin"
password = "$env{adapter_admin_pwd}"
# default vhosts mapping for standalone mode
[[adapter.vhostMapping]]
environment = "Default"
vhost = "localhost"
Server¶
[adapter.server]
enabled = true
host = "0.0.0.0"
port = "9843"
tokenTTL = "1h"
tokenPrivateKeyPath = "/home/wso2/security/keystore/mg.key"
[[adapter.server.users]]
username = "admin"
password = "$env{adapter_admin_pwd}"
[adapter.server]
Required
This includes configurations required for configuring the deployment parameters that are used for identifying the Choreo Connect Adapter REST APIs.
enabled
boolean Required
true
true, false
Enable/Disable Choreo Connect Adapter REST API.
host
string Required
Hostname of the Choreo Connect Adapter
port
string Required
9843
Port of the Choreo Connect Adapter
tokenTTL
string
1h
Time to live for the Adapter access token
tokenPrivateKeyPath
string
/home/wso2/security/keystore/mg.key
Private key path to use for the token generation
Keystore¶
[adapter.keystore]
certPath = "/home/wso2/security/keystore/mg.pem"
keyPath = "/home/wso2/security/keystore/mg.key"
[adapter.keystore]
Required
The configurations of key store used in Choreo Connect Adapter
certPath
string Required
/home/wso2/security/keystore/mg.pem
Path of the certificate of the Adapter
keyPath
string Required
/home/wso2/security/keystore/mg.key
Path of the private key of the Adapter
Truststore¶
[adapter.truststore]
location = "/home/wso2/security/truststore"
[adapter.truststore]
Required
The configurations of trust store used in in the Choreo Connect Adapter.
location
string Required
/home/wso2/security/truststore
The directory path for the trusted certificates of the Choreo Connect Adapter.
Virtual Host Mapping¶
[[adapter.vhostMapping]]
environment = "Default"
vhost = "localhost"
[adapter.vhostMapping]
Virtual host mappings.
environment
string Required
The Adapter environment
vhost
string Required
Virtual host to map to the environment
Consul¶
[adapter.consul]
enabled = false
url = "https://169.254.1.1:8501" # scheme + host ip + port
pollInterval = 5 # seconds
ACLToken = "d3a2a719-4221-8c65-5212-58d4727427ac"
mgwServiceName = "wso2"
serviceMeshEnabled = false
# certs for tls
caCertFile = "/home/wso2/security/truststore/consul/consul-agent-ca.pem"
certFile = "/home/wso2/security/truststore/consul/local-dc-client-consul-0.pem"
keyFile = "/home/wso2/security/truststore/consul/local-dc-client-consul-0-key.pem"
[adapter.consul]
Configurations related to Consul
enabled
boolean Required
false
true, false
Enable/Disable consul service.
url
string Required
connection url of the Consul HTTP API.
pollInterval
integer
5
The time interval (in seconds) in which the Choreo Connect should fetch updates from the Consul service catalog.
ACLToken
string Required
Access Control Token generated using Consul. You should grant read access to services when creating the token
mgwServiceName
string Required
wso2
Choreo Connect natively integrates with Consul service mesh. Therefore a service name is required to be defined inorder to grant access to other services in mesh. This only need to be defined if service mesh enabled in Consul.
serviceMeshEnabled
boolean
false
true, false
Set this to true if service mesh is enabled in Consul
caCertFile
string
/home/wso2/security/truststore/consul/consul-agent-ca.pem
This is the optional path to the CA certificate used for Consul communication, defaults to the system bundle if not specified.
certFile
string
/home/wso2/security/truststore/consul/local-dc-client-consul-0.pem
This is the optional path to the certificate for Consul communication. If this is set, then you also need to set keyFile.
keyFile
string
/home/wso2/security/truststore/consul/local-dc-client-consul-0-key.pem
This is the optional path to the private key for Consul communication. If this is set, then you need to also set certFile.