Commit Graph

20 Commits

Author SHA1 Message Date
Ignacio Gómez 6924985b5b Bump dependencies and fix mysql test. 2023-05-23 20:41:35 -03:00
Nick Ufer 92a9e105cc
feat: makes mutual TLS optional for postgres, mysql/mariadb and grpc (#244)
* feat: makes mutual TLS optional for postgres and mysql

* feat: makes mutual TLS optional for gRPC

* refactor: replaces deprecated grpc.WithInsecure()

* docs: changes meaning of grpc tls option to client cert

* chore: updates test go version to same as project version (1.18)

* test: adds TLS and mutual TLS support to db and grpc test environments

* chore: adds generated test certificates to .gitignore

* chore: reduces test certificates to minimum key usage

* chore: adds second client certificate which acts as unauthorized

* test: adds mysql tls and mutual tls tests

* refactor: postgres ssl config check

* refactor: change connectTries to 0 for postgres to only have 1 retry by default like mysql

* refactor: postgres sslmode and sslrootcert code

* test: adds postgres tls and mutual tls tests

* fix: treat grpc authOpts grpc_ca_cert, grpc_tls_cert, grpc_tls_key as file paths instead of actual file contents

refactor: improves error logging

* test: adds grpc tls and mutual tls tests

* Fix postgres ssl modes `require`, ``verify-ca` and `verify-full` to work without explicit root certificate.

* refactor: adds warning for unknown pg_sslmode

style: removes empty lines

* style: compress switch case

Co-authored-by: Martin Abbrent <martin.abbrent@ufz.de>
2022-10-05 16:32:36 -03:00
Ignacio Gómez ee6e68db3a
Add JWT files mode. Now both JWT and Files may use the generally available strict files checker.
Files should be able to check ACLs only.
Clen setPrefixes method.
Fix test-backends by building custom plugin too, fix files only acls by checking if a user was seen before creating a general record.
2021-04-27 19:58:54 -04:00
Pierre Fersing 90a24b52c6 Fix leaking existence of username from error 2021-02-13 15:00:35 +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 aa487a9a05
Refactor hashing: add support for bcrypt and argond2id hashers.
Fix cache security issue.
2020-07-13 23:21:26 -04:00
Ignacio Gómez 02e432df1f
Refactor some exported fields (many more to go) and constants. 2020-05-14 23:34:45 -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 0e39a99963
Finish getuser clientid support. 2020-02-21 23:27:51 -03:00
Ignacio Gómez 304c02c0be Add MOSQ_ACL_SUBSCRIBE support to Redis. 2019-08-30 15:29:04 -04:00
Ignacio Gómez 6c5933c346 Added allow native passwords mysql option. 2018-10-12 14:26:54 -03:00
Ignacio Gomez f26090fb27 Fixed default mysql protocol. 2018-03-27 10:45:25 -03:00
Ignacio Gómez bbe2e6b42a Included plugin cleanup on mosquitto halt. 2018-01-09 12:13:18 -03:00
Ignacio Gómez 20ba7c60aa Indent benchmark specs. 2018-01-03 15:55:44 -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 fefdaa2d99 Added sqlite3 support. 2017-12-29 13:04:26 -03:00
Ignacio Gómez 0f4a7b7338 Log cleanup and readme typo fixes. 2017-12-20 09:54:59 -03:00
Ignacio Gómez 8434ca5cb1 Postgres sslmode added. Mysql tests and backend ready. 2017-12-19 19:18:13 -03:00
Ignacio Gómez 30c0e4a15b Need to fix mysql test. 2017-12-19 15:49:34 -03:00
Ignacio Gómez a83e9d165e Mysql almost ready, need to fix dsn. 2017-12-14 19:30:07 -03:00