Alan Conway created PROTON-1935:
-----------------------------------
Summary: [cpp] Read a config file to get default connection
parameters
Key: PROTON-1935
URL: https://issues.apache.org/jira/browse/PROTON-1935
Project: Qpid Proton
Issue Type: Improvement
Components: cpp-binding
Affects Versions: proton-c-0.25.0
Reporter: Alan Conway
Assignee: Alan Conway
Fix For: proton-c-0.26.0
Implement no-argument C++ connect() to connect using information loaded from a
config file located and formatted as follows:
{code:java}
# Connection Configuration {#connect_config}
Proton clients can read default connection information 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.
* `/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": "amqp", // [string] URL scheme for connection. Use "amqps"
for a TLS connection.
"host": "localhost", // [string] DNS or IP address for connection.
"port": "amqp", // [string] Defaults to be the same as the scheme.
"user": null, // [string] Authentication user name
"password": null, // [string] Authentication password
"sasl": {
"enable": true, // [boolean] Enable/disable SASL
authentication
"mechanisms": null, // [list] List of SASL mechanism names. If
null the library determines the default list.
"allow_insecure": false // [boolean] Allow mechanisms that send
clear-text passwords, even on an unencrypted connection.
}
"tls": {
// NOTE: This section is not final and will change.
"enable": true, // boolean (true)
"pem_cert_store": null, // string [file or dir or ?]
(null)
"pem_ca_cert_store": null, // string [file or dir or ?]
(null)
"pem_key_file": null, // string file path (null)
"pkcs12_key_store": null, // string (null)
"pkcs12_trust_store": null, // string (null)
"key_password": null, // string (null)
"verify_hostname": true // boolean (true)
},
}{code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]