File: connect-config.md

package info (click to toggle)
qpid-proton 0.37.0-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,384 kB
  • sloc: ansic: 37,828; cpp: 37,140; python: 15,302; ruby: 6,018; xml: 477; sh: 320; pascal: 52; makefile: 18
file content (42 lines) | stat: -rw-r--r-- 2,005 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# Connection Configuration {#connect-config}

Proton clients can read default connection configuration from a
configuration file.

If the environment variable `MESSAGING_CONNECT_FILE` is set, it is the
path to the file. Otherwise the client looks for a file named
`connect.json` in the following locations, using the first one found:

* Current working directory of client process.
* `$HOME/.config/messaging/` - $HOME is user's home directory.
* `$PREFIX/etc/messaging/` - $PREFIX is the prefix where the proton library is installed
* `/etc/messaging/`

The configuration file is in JSON object format. Comments are allowed,
as defined by the [JavaScript Minifier](https://www.crockford.com/javascript/jsmin.html)

The file format is as follows. Properties are shown with their default
values, all properties are optional.

    {
      "scheme": "amqps",   // [string] "amqp" (no TLS) or "amqps"
      "host": "localhost", // [string] DNS or IP address for connection. Defaults to local host.
      "port": "amqps",     // [string] "amqp", "amqps" or port number. Defaults to value of 'scheme'.
      "user": null,        // [string] Authentication user name
      "password": null,    // [string] Authentication password

      "sasl": {
        "enable": true,         // [bool] Enable or disable SASL
        "mechanisms": null,     // [list] List of allowed SASL mechanism names.
                                // If null the library determines the default list.
        "allow_insecure": false // [boolean] Allow mechanisms that send unencrypted clear-text passwords
      },

      // Note: it is an error to have a "tls" object unless scheme="amqps"
      "tls": {
        "cert": null,   // [string] name of client certificate or database
        "key": null,    // [string] private key or identity for client certificate
        "ca": null,     // [string] name of CA certificate or database
        "verify": true  // [bool] if true, require a valid cert with matching host name
      }
    }