Debian Codegraph @

docs/connect-config.md

raw
1 # Connection Configuration {#connect-config}
2
3 Proton clients can read default connection configuration from a
4 configuration file.
5
6 If the environment variable `MESSAGING_CONNECT_FILE` is set, it is the
7 path to the file. Otherwise the client looks for a file named
8 `connect.json` in the following locations, using the first one found:
9
10 * Current working directory of client process.
11 * `$HOME/.config/messaging/` - $HOME is user's home directory.
12 * `$PREFIX/etc/messaging/` - $PREFIX is the prefix where the proton library is installed
13 * `/etc/messaging/`
14
15 The configuration file is in JSON object format. Comments are allowed,
16 as defined by the [JavaScript Minifier](https://www.crockford.com/javascript/jsmin.html)
17
18 The file format is as follows. Properties are shown with their default
19 values, all properties are optional.
20
21 {
22 "scheme": "amqps", // [string] "amqp" (no TLS) or "amqps"
23 "host": "localhost", // [string] DNS or IP address for connection. Defaults to local host.
24 "port": "amqps", // [string] "amqp", "amqps" or port number. Defaults to value of 'scheme'.
25 "user": null, // [string] Authentication user name
26 "password": null, // [string] Authentication password
27
28 "sasl": {
29 "enable": true, // [bool] Enable or disable SASL
30 "mechanisms": null, // [list] List of allowed SASL mechanism names.
31 // If null the library determines the default list.
32 "allow_insecure": false // [boolean] Allow mechanisms that send unencrypted clear-text passwords
33 },
34
35 // Note: it is an error to have a "tls" object unless scheme="amqps"
36 "tls": {
37 "cert": null, // [string] name of client certificate or database
38 "key": null, // [string] private key or identity for client certificate
39 "ca": null, // [string] name of CA certificate or database
40 "verify": true // [bool] if true, require a valid cert with matching host name
41 }
42 }