Configuration
Configuration for the Evolve App Server is specified in a JSON file. The server requires a configuration file to start. The config file can contain the following JSON object:
Key | Description | Required |
---|---|---|
server | Object that holds http related config. Refer server config options below | Yes |
ewb | Object that holds the ewb server related config. Refer ewb config options below | Yes |
evolveGateway | Object that holds the evolve gateway related config. Refer evolve gateway config options below | No |
database | Object that holds the database config. Refer database config options below | Yes |
auth | Object that holds the config for the client authentication method Refer auth_config options below | Yes |
netModel | Object that holds the net-model related configuration Refer net-model options below | No |
Server Config
Option | Description | Required | Default |
---|---|---|---|
host | The host for the server. | No | "localhost" |
port | The port for the server to listen on. | No | 433 if useTLS is true, otherwise 80 |
useTls | Enable HTTPS on the server | No | false |
keyStorePath | Path to a Java Key Store that contains credentials for TLS | No | Will disable TLS if missing |
keyStorePassword | Password to access the Java Key Store above | No | |
privateKeyAlias | The alias to the private key to use for TLS, contained within the Java Key Store above | No | |
privateKeyPassword | The password to the private key to use for TLS, contained within the Java Key Store above | No | |
webClientHost | The host for the Web Client | No | host |
webRoot | Path to a directory that contains the static assets for the web client | Yes | "static" |
logFile | Path to a file to write log output to | No |
EWB Config
Option | Description | Required | Default |
---|---|---|---|
host | The host for EWB server | No | "localhost" |
port | The port on which to find the EWB server | No | 9000 |
protocol | The protocol to use when making requests to the EWB server - HTTP or HTTPS | No | "HTTP" |
auth | The property that specifies m2m authentication parameters for an authenticated EWB server. Refer to ClientCredentialsAuth options below | No | |
verifyCertificate | The verification for the SSL cert when connecting to the services over TLS | No | "true" |
connectionPointIdentifier | Specify the NameType name used by EWB to store the connection point identifier | No | "NMI" |
Evolve Gateway Config
Option | Description | Required | Default |
---|---|---|---|
host | The host for the server | No | "localhost" |
port | The port on which to find the server | No | 8001 |
protocol | The protocol to use when making requests to the server - HTTP or HTTPS | No | "HTTPS" |
requestMethod | The default request method to use for requests | No | "GET" |
auth | The property that specifies m2m authentication parameters for an authenticated EWB server. Refer to ClientCredentialsAuth options below | No | |
verifyCertificate | The verification for the SSL cert when connecting to these services over TLS | No | "true" |
derMapExpirySeconds | Number of seconds before the cached DER data displayed on the map expires, and a new fetch of DER is required | No | 86400 (one day) |
Database Config
Option | Description | Required | Default |
---|---|---|---|
url | The url to use to connect to the database | No | "jdbc:h2:mem:mem;DB_CLOSE_DELAY=-1" |
driver | The database driver to use | No | "org.h2.Driver" |
createSchemaOnStart | If set to true, the app server will attempt to initialise the database schema on startup. | No | true |
sqlDirs | A list of paths to directories containing ".sql" files. On startup, every ".sql" file will be executed against the database | No |
Auth Config
Option | Description | Required |
---|---|---|
auth0 | Configures authentication through Auth0. Refer auth0 options below | No, mutually exclusive with none |
none | It allows for unauthenticated access to the server Refer auth none options below | No, mutually exclusive with auth0 |
Auth0 Config
Option | Description | Required | Default |
---|---|---|---|
issuer | The issuer to use to authenticate with Auth0 | Yes | |
audience | The audience for authentication | Yes |
Auth None Config
Option | Description | Required | Default |
---|---|---|---|
defaultUserId | The id for the default user | Yes | |
defaultUserEmail | Ths emails for the default user | Yes | |
defaultUserPermissions | Permissions for the default user | Yes |
Client Credentials Auth Config
Option | Description | Required | Default |
---|---|---|---|
domain | The issuer domain for authentication using a client_credentials Oauth2 flow | Yes | |
audience | The audience for authentication with auth0 | only if 'method' is set to 'auth0' | |
clientId | The clientId which is used by the client in order to authenticate | Yes | |
clientSecret | The clientSecret which is used by the client in order to authenticate | Yes |
NetModel Config
Option | Description | Required |
---|---|---|
http | Configures the net-model functionality to use an external http server for the creation of net-models. Refer net-model http options below | No, mutually exclusive with mock |
mock | Configures the net-model functionality use a provided mock file as the result of any net-model creation request. This is meant for testing purposes only Refer net-model mock options below | No, mutually exclusive with http |
Http NetModel Config
Option | Description | Required | Default |
---|---|---|---|
host | The host for the network model creation service | Yes | |
port | The port for the network model creation service | Yes | |
modelsDir | Path to directory where all generated net-models will be stored | Yes |
Mock NetModel Config
Option | Description | Required | Default |
---|---|---|---|
mockModelPath | Path to the file to be used as a mock for all net-model creation requests | Yes | |
modelsDir | Path to directory where all generated net-models will be stored | Yes |
The following is a sample configuration file:
Sample Configuration File
{
"server": {
"useTls": true,
"keyStorePath": "path/to/keystore.jks",
"privateKeyAlias": "alias",
"keyStorePassword": "password",
"privateKeyPassword": "password",
"port": 7654,
"webRoot": "static"
},
"ewb": {
"host": "localhost",
"port": 9000,
"protocol": "HTTP",
"auth" : {
"domain": "zepben.au.auth0.com",
"audience": "https://test-audience/",
"clientId": "abcdefg",
"clientSecret": "hijklmnop"
}
},
"database": {
"url": "jdbc:h2:mem:mem;DB_CLOSE_DELAY=-1",
"driver": "org.h2.Driver"
},
"auth": {
"method": "auth0",
"permissions": {},
"clientId": "clientId",
"clientSecret": "clientSecret",
"additionalRedirectURIs": [
"https://localhost:1234"
],
"issuer": "zepben.au.auth0.com",
"audience": "https://evolve-gateway/"
},
"netModel": {
"type": "http",
"host": "localhost",
"port": 8089,
"modelsDir": "modelsDir"
}
}