Skip to main content
Version: 2.0.0

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:

KeyDescriptionRequired
serverObject that holds http related config.
Refer server config options below
Yes
ewbObject that holds the ewb server related config.
Refer ewb config options below
Yes
evolveGatewayObject that holds the evolve gateway related config.
Refer evolve gateway config options below
No
databaseObject that holds the database config.
Refer database config options below
Yes
authObject that holds the config for the client authentication method
Refer auth_config options below
Yes
netModelObject that holds the net-model related configuration
Refer net-model options below
No
Server Config
OptionDescriptionRequiredDefault
hostThe host for the server.No"localhost"
portThe port for the server to listen on.No433 if useTLS is true, otherwise 80
useTlsEnable HTTPS on the serverNofalse
keyStorePathPath to a Java Key Store that contains credentials for TLSNoWill disable TLS if missing
keyStorePasswordPassword to access the Java Key Store aboveNo
privateKeyAliasThe alias to the private key to use for TLS, contained within the Java Key Store aboveNo
privateKeyPasswordThe password to the private key to use for TLS, contained within the Java Key Store aboveNo
webClientHostThe host for the Web ClientNohost
webRootPath to a directory that contains the static assets for the web clientYes"static"
logFilePath to a file to write log output toNo
EWB Config
OptionDescriptionRequiredDefault
hostThe host for EWB serverNo"localhost"
portThe port on which to find the EWB serverNo9000
protocolThe protocol to use when making requests to the EWB server - HTTP or HTTPSNo"HTTP"
authThe property that specifies m2m authentication parameters for an authenticated EWB server.
Refer to ClientCredentialsAuth options below
No
verifyCertificateThe verification for the SSL cert when connecting to the services over TLSNo"true"
connectionPointIdentifierSpecify the NameType name used by EWB to store the connection point identifierNo"NMI"
Evolve Gateway Config
OptionDescriptionRequiredDefault
hostThe host for the serverNo"localhost"
portThe port on which to find the serverNo8001
protocolThe protocol to use when making requests to the server - HTTP or HTTPSNo"HTTPS"
requestMethodThe default request method to use for requestsNo"GET"
authThe property that specifies m2m authentication parameters for an authenticated EWB server.
Refer to ClientCredentialsAuth options below
No
verifyCertificateThe verification for the SSL cert when connecting to these services over TLSNo"true"
derMapExpirySecondsNumber of seconds before the cached DER data displayed on the map expires, and a new fetch of DER is requiredNo86400 (one day)
Database Config
OptionDescriptionRequiredDefault
urlThe url to use to connect to the databaseNo"jdbc:h2:mem:mem;DB_CLOSE_DELAY=-1"
driverThe database driver to useNo"org.h2.Driver"
createSchemaOnStartIf set to true, the app server will attempt to initialise the database schema on startup.Notrue
sqlDirsA list of paths to directories containing ".sql" files. On startup, every ".sql" file will be executed against the databaseNo
Auth Config
OptionDescriptionRequired
auth0Configures authentication through Auth0.
Refer auth0 options below
No, mutually exclusive with none
noneIt allows for unauthenticated access to the server
Refer auth none options below
No, mutually exclusive with auth0
Auth0 Config
OptionDescriptionRequiredDefault
issuerThe issuer to use to authenticate with Auth0Yes
audienceThe audience for authenticationYes
Auth None Config
OptionDescriptionRequiredDefault
defaultUserIdThe id for the default userYes
defaultUserEmailThs emails for the default userYes
defaultUserPermissionsPermissions for the default userYes
Client Credentials Auth Config
OptionDescriptionRequiredDefault
domainThe issuer domain for authentication using a client_credentials Oauth2 flowYes
audienceThe audience for authentication with auth0only if 'method' is set to 'auth0'
clientIdThe clientId which is used by the client in order to authenticateYes
clientSecretThe clientSecret which is used by the client in order to authenticateYes
NetModel Config
OptionDescriptionRequired
httpConfigures 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
mockConfigures 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
OptionDescriptionRequiredDefault
hostThe host for the network model creation serviceYes
portThe port for the network model creation serviceYes
modelsDirPath to directory where all generated net-models will be storedYes
Mock NetModel Config
OptionDescriptionRequiredDefault
mockModelPathPath to the file to be used as a mock for all net-model creation requestsYes
modelsDirPath to directory where all generated net-models will be storedYes

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"
}
}