Commit Graph

25 Commits

Author SHA1 Message Date
Ignacio Gómez 065ec97ee3
Use predefined http constants. Add tests to http backend. 2022-06-05 18:39:10 -04:00
Franz Auernigg 963a5ccb85
Add http method option. 2022-06-05 18:19:59 -04:00
Paul Traylor 5dc063f104
Add user-agent to requests (#176)
* Add default 'mosquitto' user-agent to http/jwt requests

* Add libmosquitto version ofr http and jwt remote user agent.

Add more room for extended versions.

Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
2021-07-11 21:52:22 -04:00
Pierre Fersing f1a3fef9ee
Improve log messages
Apply suggestions from code review

Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
2021-02-13 14:04:13 +01:00
Pierre Fersing dc1edd8963 Improve handling of backend failure
* No longer cache response from backend when the backend fail.
* Reply to Mosquitto using "MOSQ_ERR_UNKNOWN" which will disconnect
  client and avoid silent data loss when the error occure for ACL
  checks.
2020-11-13 17:04:34 +01:00
Ignacio Gómez a97818e724 Bump docker version in compose. 2020-10-23 20:55:36 -03:00
Ignacio Gómez f5a5cec554 Don't require http superuser uri. 2020-07-13 22:35:07 -04:00
Pierre Kisters d75c03c0cf fixed http timeout config parameter 2020-06-15 02:53:42 +02:00
Pierre Kisters a1fa66045b added http timeout config parameter 2020-06-15 02:04:19 +02:00
Ignacio Gómez 8900189fb5
Check if http client is nil, move deferred body close to after error is checked. 2020-05-21 17:53:35 -04:00
Ignacio Gómez e3ff0e847e
Document disable superuser options. Allow superuser uri to be empty to disable it in http and jwt backends. Add superuser disabled tests. 2020-05-13 22:44:23 -04:00
Ignacio Gómez 13ebcc7f5d
Add disable_superuser options at the plugin level and as local options for relevant backends (DBs don't need it as they may have empty superuser queries). TODO: tests and docs. 2020-05-13 19:58:00 -04:00
Ignacio Gómez 56cf8250a9
Accept any 2XX status code in htpp and jwt backends. 2020-05-13 19:19:51 -04:00
Ignacio Gómez 00e21013c5
Refactor weird error names and log line breaks. Check for hash split length. 2020-02-22 01:16:41 -03:00
Ignacio Gómez ecc46b64c0
Merge pull request #52 from iegomez/feature/pass_clientid_to_acl
Finish getuser clientid support.
2020-02-21 23:29:10 -03:00
Ignacio Gómez 0e39a99963
Finish getuser clientid support. 2020-02-21 23:27:51 -03:00
michaln dfc14cfd57 Move instance of http client to backend instance
Keep one single instance of http client and reuse
it for all outgoing http requests. This change was
initiated by observation of resources leek: nubmer
of "closed" tcp socket file descriptors were incremented
by each set of auth requests (user, supervisor, acl)
2020-01-07 20:30:22 +01:00
Gaetan Collaud 229a31d41c fix http status check 2019-04-01 13:53:01 +02:00
Gaetan Collaud 1dbb7bf8aa fix http status check 2019-04-01 13:47:54 +02:00
Gaetan Collaud 4d92856c4f fix http status message 2019-04-01 13:41:39 +02:00
Ignacio Gómez bbe2e6b42a Included plugin cleanup on mosquitto halt. 2018-01-09 12:13:18 -03:00
Ignacio Gómez bffb855551 Readwrite fixes for files and redis. Log level added. Benchmarks added. 2018-01-03 15:39:11 -03:00
Ignacio Gómez 2daf46585e Enhanced JWT and tests. 2017-12-27 12:59:08 -03:00
Ignacio Gómez ac80c0a9f2 HTTP backend added and tested. 2017-12-26 19:48:20 -03:00
Ignacio Gómez 878738967a Http backend almost ready, need to fix form values tests. 2017-12-26 15:43:21 -03:00