Device Gateway is configured using a JSON configuration file, path to which is provided to the DGW via
The default configuration file (provided in the binary distribution) is located at
The DGW configuration file has the following format:
idis the ID of the DGW, which must be unique in the deployment environment. If not given, a UUID v4 will be generated.
descriptionis a human-readable description for the DGW
dnssdEnabledis a flag enabling advertisement of DGW endpoint using DNS-SD (service type
publicEndpointis the URL of the gateway protocol://fqdn:port, which is in the deployment environment
staticDiris the path to a directory for serving static files
[deprecated] catalogis an array of remote Resource Catalogs. All registered devices will be published to each configured remote catalog (if not empty).
discoveris the flag enabling automatic discovery of the Resource Catalog using DNS-SD
endpointis the URL of the remote Resource Catalog API (
httpis the configuration of the built-in HTTP server
bindAddris the bind address to listen on (
0.0.0.0to listen on all interfaces)
bindPortis the TCP port to listen on
protocolsis a dictionary defining the configuration of the DGW API. At the moment,
MQTTprotocols are supported.
locationis the location (root) of the REST API for all devices registered on the DGW
discoveris a flag enabling the discovery of broker endpoint from Service Catalog
discoverIDis the the name of broker to be discovered. If not given, the first listed MQTT broker in Service Catalog will be retrieved.
urlis the broker URL in the form
prefixis the default topic prefix for all mqtt messages to/from devices registered on the DGW, when the topic is not defined in device configurations.
usernameis the username for username/password authentication (for mosquitto broker see mosquito.conf)
passwordis the password for username/password authentication if used without ssl/tls trasmitted in plaintext
caFileis the path to the CA certificate for SSL/TLS authentication of the message broker with a self-signed certificate (for mosquitto broker see mosquitto-tls)
certFileis the path to the client certificate for certificate-based authentication of the client
keyFileis the path to the client private key for certificate-based authentication of the client
offlineBufferis the size of the internal queue that holds messages while the client is temporarily offline (default=0)
Sample configuration file: device-gateway.json
auth field configures the authentication for Device Gateway's built-in HTTP server:
enabledis a boolean flag enabling/disabling the authentication
provideris the name of a supported auth provider
providerURLis the URL of the auth provider endpoint
serviceIDis the ID of the service in the authentication provider (used for validating auth tokens provided by the clients)
basicEnabledis a boolean flag enabling/disabling the Basic Authentication
authorization- optional, see authorization configuation
To publish the devices to an authenticated remote Resource Catalog, the
auth field of that catalog should be set:
providerURLare the authentication configurations used by that Resource Catalog
passwordare the authentication credentials for accessing that Resource Catalog
serviceIDis the ID of that Resource Catalog in the authentication provider