Ignacio Gómez
91e77551a7
Bump mongo driver version and migrate jwt module.
2021-09-15 15:16:49 -03:00
Joachim Danmayr
45b8a85f02
Added monogdb TLS option ( #170 )
...
* Added monogdb TLS option
* Syntax fix
* Made TLS configurable
* Update README.md
Chnaged tls option name
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
* Update README.md
Chnaged tls option name.
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
* Update backends/mongo.go
Chnaged tls option name
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
* Update backends/mongo.go
Better style for setting TLS option
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
* Better style for setting TLS config
* Fixed variable name in struct
* Chnaged tab in Readme
* Added option to dkip TLS verify
Co-authored-by: Joachim Danmayr <danmayr.joachim@fronius.com>
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
2021-04-30 09:43:31 -04: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
f8bc7e6406
Upgrade Redis version so that single and cluster clients have the same interface. Implement cluster for both Redis backend and cache.
2020-05-23 20:28:47 -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
01296e73f9
Fix Mongo tests.
2020-05-14 19:21:53 -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
Chris Bradford
9f7bd72596
As per review:
...
> Use common.Base64, common.UTF8 in switch saltEncoding across
backends
> Move saltEncoding log output from 'info' to 'debug'
2020-05-03 22:32:48 +01:00
Chris Bradford
dee695a547
Initial changes associated w/ code review feedback
2020-04-29 13:11:58 +01:00
Chris Bradford
6f4d57c66a
Re-sync upstream
2020-04-26 18:26:11 +01: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
Chris Bradford
dd6004706d
Add error handling for base64 DecodeString operations
...
Modify pw to use 0 for default key length, which will then cause algorithum default hash size to be used, vs hard-coded default of '32'
Make salt_encoding option plugin specific by adding plugin prefix
2020-01-18 09:22:36 +00:00
Chris Bradford
07e5cab462
Add logging for new mongo options
2020-01-17 17:09:31 +00:00
Chris Bradford
1b2799679c
Squashed commit of the following:
...
Merge AuthSource changes.
2020-01-16 21:52:00 +00:00
Chris Bradford
44f274e7a3
Add 'salt_encoding' option to plugin
...
Updated HashCompare to use new saltEncoding param, defaults to 'base64' and accepts 'utf-8' as alternative as-is (can easily be extended)
Add automatic key length setting to HashCompare, to accomodate non-standard hash lengths in comparison
Updated HashCompare compare calls across *all* plugins to use salt encoding param, either from supplied 'salt_encoding' option or defaulting to 'base64'
Updated pw util to include flags for salt encoding (default base64) and key length (default 64).
2020-01-16 21:36:36 +00:00
Ignacio Gómez
0cb001eeff
Migrated to the official Mongo DB driver. Added auth test options for mongo and redis.
2019-06-04 12:24:33 -04:00
Ignacio Gómez
8687ab7658
Add missing mongo username option.
2019-06-03 17:39:08 -04:00
Ignacio Gómez
bbe2e6b42a
Included plugin cleanup on mosquitto halt.
2018-01-09 12:13:18 -03:00
Ignacio Gómez
100db11c61
MongoDB added and tested.
2018-01-04 16:05:32 -03:00