Introduction

Configuration is loaded from a file at startup. The file must be valid JSON.

Structure

The server load functionality based on the modules property. Which must be located at the first level in the file. Each module is deployed by the system based on the configuration for that particular module (ldap module as example below)

{
    "modules": [{
        "name": "LdapClient",
        "enabled": true,
        "instances": 1,
        "config": {
            "name": "default",
            "connection": {
                "host": "localhost",
                "port": 636,
                "bind_dn": "cn=directory manager",
                "bind_password": "lord_helmet",
                "use_ssl": true,
                "ssl_trust_all": true
            }
        }
    }]
}

Reusing configuration - "globals"

It is possible to externalise configuration parameters by declaring them in more central manner and reference the parameter.

{
    "globals": {
        "ldap": {
            "base_dn": "dc=company,dc=local",
            "host": "localhost",
            "port": 636,
            "bind_dn": "cn=directory manager",
            "bind_password": "lord_hemlmet"
        }
    },
    "modules": [{
        "name": "LdapClient",
        "enabled": true,
        "instances": 1,
        "config": {
            "name": "default",
            "connection": {
                "host": "${globals.ldap.host}",
                "port": 636,
                "bind_dn": "${globals.ldap.bind_dn}",
                "bind_password": "${globals.ldap.bind_password}",
                "use_ssl": true,
                "ssl_trust_all": true
            }
        }
    }]
}

Last updated