You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #117 from DevoInc/feature/sender_configuration_improvements
# [3.6.0] - 2022-05-17
## Added
* Sender: certificate files can now be verified with `verify_config=True` or `"verify_config": true` from the config file.
* Internal support for HTTP unsecure API REST endpoint.
## Fixed
* Sender: bad error management when `socker.shutdown` is called and the connection was not established.
* test `test_get_common_names` not running.
* Some environment vars for testing were wrong in the sample file.
* `pem` module added to depedencies
+ verify_config **(_bool_)**: Verify the configuration file. Default: False
30
31
+ verify_mode **(_int_)**: Verify mode for SSL Socket. Default: SSL default.You need use int "0" (CERT_NONE), "1" (CERT_OPTIONAL) or "2" (CERT_REQUIRED)
con = Sender.for_logging(config=config, tag="my.app.test.logging")
254
255
logger = get_log(name="devo_logger", handler=con)
255
256
```
257
+
## Enabling verification for SenderConfigSSL configuration file
258
+
259
+
To help troubleshoot any problems with the configuration file the variables:
260
+
261
+
+ address **(_tuple_)**: (Server address, port)
262
+
+ key **(_str_)**: key src file
263
+
+ cert **(_str_)**: cert src file
264
+
+ chain **(_str_)**: chain src file
265
+
266
+
Can be verified by adding `"verify_config": true` to the configuration file, in case any of the variables is invalid or incompatible with each other a `DevoSenderException` will be raised indicating the variable that’s causing the trouble, below an example of the file and an exception:
267
+
268
+
```json
269
+
{
270
+
"sender": {
271
+
"address":"devo-relay",
272
+
"port": 443,
273
+
"key": "/devo/certs/key.key",
274
+
"cert": "/devo/certs/cert.crt",
275
+
"chain": "/devo/certs/chain.crt",
276
+
"verify_config": true
277
+
},
278
+
"lookup": {
279
+
"name": "Test lookup",
280
+
"file": "/lookups/lookup.csv",
281
+
"lkey": "KEY"
282
+
}
283
+
}
284
+
```
285
+
286
+
```
287
+
devo.sender.data.DevoSenderException: Error in the configuration, the key: /devo/certs/key.key is not compatible with the cert: /devo/certs/cert.crt
0 commit comments