Commit Graph

147 Commits

Author SHA1 Message Date
Ignacio Gómez d3f4b79e99
Update README.md 2023-12-09 16:21:56 -03:00
Ignacio Gómez 6b5d064aaa
Update README.md 2023-12-09 04:13:41 -03:00
Northern Man d2b6c5796d
Update README.md 2023-12-05 11:25:26 -05:00
alessandroperetti 807e8f25e3
Added jwt http timeout (#285)
* Added jwt http timeout

Co-authored-by: Alessandro Peretti <alessandro.peretti@spindox.it>
2023-06-09 09:29:01 -03:00
Takeshi Shinoda 1d333a4ff6 Fixed the Redis cluster addresses option name of the README file. 2023-05-26 00:33:32 +09:00
Ignacio Gómez 82493106ea Set gRPC backend name on initialization. Add mode to JWT backend name. 2023-05-24 01:29:14 -03:00
Matthieu Ippersiel 3cc94ee495 -Added 'auth_opt_' to all configuration elements
-Removed all tabs
-Fixed indentations in tables
-Fixed minor errors in javascript section and added link to Go otto
-Added example scripts in javacript section
-Added examples in HTTP section for JSON queries
2023-01-17 09:35:55 -05:00
Ignacio Gómez afdc95fbfe
Merge pull request #254 from yamenk-gribaudo/docker-documentation_update
Add path to shared object in docker configuration
2023-01-03 18:27:17 -03:00
Ask Bjørn Hansen cd1d99ce5f README: update version references, markdown syntax tweaks
(Also remove the verbose how-to-install Go instructions that was relevant once
upon a time, but not in 2023)
2022-12-31 04:24:02 -08:00
Yamenk Gribaudo 8a106e26f5 add path to shared object in docker configuration 2022-12-17 19:10:41 -03:00
maab fb6a5b89e5
Postgres tls/sslmode "verify-full" as default (#248)
* Make `verify-full` to default postgres sslmode instead of `disable`.

* Adding documentation about postgres sslmode changes to readme

* Change default of sslmode in postgres auth opt table

* Add sslmode to auth opts to fix tests.
2022-11-11 08:27:55 -03:00
Martin Abbrent 475a6cd5cd
Fix docker commands in readme: `run-test-in-docker.sh` requires bash but is called with sh. 2022-11-11 09:49:01 +01: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
Nick Ufer 202c09a390
docs: adds more details on how to obtain mosquitto headers 2022-09-05 17:39:44 +02:00
Pavel Tolstov 4e1c35b4c9 Add posibility to get hostname of authorizing backend from "iss" claim of JWT token 2022-06-12 12:28:15 +03:00
Pavel Tolstov 788ee917e4 Add option for sending decrypted claims to JWT Javascript backend 2022-06-11 15:03:37 +03:00
Franz Auernigg 963a5ccb85
Add http method option. 2022-06-05 18:19:59 -04:00
Ignacio Gómez 98d8b4a6aa
Postgresql fix (#224)
* Add option to set DB connection max life time in seconds and document it.

Co-authored-by: Thomas Tvedt <thomas@gulost.net>
2022-04-04 19:31:59 -04:00
Ignacio Gómez fa99ba6583 Add option to strip prefixes upon checking user or acl. 2021-09-23 20:40:32 -03:00
Ignacio Gómez 290c1c516a
Add gRPC options to set timeout and skip dial errors (#193)
* Don't bubble up grpc client error, just keep it nil and derive it again on checking.

Add option to check if we should faild on gRCP dial error or not.

Add timeout option.

* Instead of attempting on each check, remove with block when fail on dial error is not set to true so gRPC takes care of the connection itself.
Add tests to check that auth fails with dial errors, but works once the service is back up.

* Fix docker files missing libwebsockets8 by building from source, fix docker test run by starting maridb service instead of mysql one.

Co-authored-by: Ignacio Gómez <ignacio_gomez@apple.com>
2021-09-15 13:46:44 -03: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
arctic-alpaca 1c8e24b650
Add support for Mosquitto version >=2.x and arm(v7 and 64) to Dockerfile (#163)
* Add support for Mosquitto version >=2.x and arm

* Hopefully fix ARMv6 build

* Add disclaimer regarding tests on hardware
2021-06-10 09:53:09 -04:00
Alberto Geniola 2d264437df
Updated README (#177)
Bump versions, state minimum Go version and add example instructions.
2021-05-31 21:33:45 -04: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
Ignacio Gómez e4d655557e
Fix README custom plugin returns, fix prefix/registered order for auth check, don return an error on enabled but unregistered superuser on valid prefix. 2021-03-09 23:13:06 -03:00
Ignacio Gómez 5cc687351e
Add backends tests and fix a couple of issues in Redis. 2021-03-09 23:13:03 -03:00
Ignacio Gómez ca22c6f9fa
Refactor backends to take all the init and checking logic out of the main package, add options to enable registering specific checks per backend. 2021-03-09 23:11:57 -03:00
Pierre Fersing 82ca3fc6a1
Merge pull request #123 from PierreF/cache-jitter
Cache jitter
2021-03-07 20:42:58 +01:00
Pierre Fersing 76e798c72c
Merge pull request #124 from PierreF/retry-http
Retry on backend error
2021-03-07 11:05:31 +01:00
Pierre Fersing 19315cf24a
Merge pull request #121 from PierreF/docker-test
Add Docker image to run tests
2021-03-07 11:04:52 +01:00
Pierre Fersing c619a88e79 Improve retry count description
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
2021-03-05 10:23:23 +01:00
Pierre Fersing ca6e9d8e21 Add retry capibility 2021-03-05 10:23:23 +01:00
Pierre Fersing 8abfcd2755
Apply suggestions from code review
Co-authored-by: Ignacio Gómez <iegomez@uc.cl>
2021-03-05 09:57:52 +01:00
Pierre Fersing b5c925d119 Allow to get a shell on Docker testing image
This make much easier to re-run test multiple time without avoid to wait
backends to start each time.
2021-02-13 15:07:26 +01:00
Ignacio Gómez 2cfa50cd63
Remove outadted comment from readme. 2021-02-11 11:12:24 -03:00
Ignacio Gómez 7a844596a0
Add javascript backend. 2021-02-11 11:02:53 -03:00
Ignacio Gómez fc44c811d2
Refactor JWT backend, add JS mode, allow pre parsing of token for JS and local mode, allow local mode specific DB options instead of sharing with regular DB backends. 2021-02-11 09:48:54 -03:00
Ignacio Gómez 1efdaab4c4
Return last ping error. 2021-02-11 09:35:28 -03:00
Ignacio Gómez 2e0c63b383
Add connect_tries option for DB backends. 2021-02-10 13:14:26 -03:00
Ignacio Gómez 149bd8a57c
Add current state to readme 2020-12-04 21:17:24 -03:00
Ignacio Gómez 0f04ed1835
Fix readme conf instructions, group building options to simply run make in Linux and MacOS. 2020-11-26 22:52:19 -03:00
Pierre Fersing 725202e47e Add a jitter to ACL cache expiration 2020-11-13 18:58:37 +01:00
Pierre Fersing 33bfc226c7 Add Docker image to run tests 2020-11-13 16:33:15 +01:00
Ignacio Gómez 283a2801e0
Allow to skip expiration per user or acl check in JWT. 2020-10-30 20:56:05 -03:00
Ignacio Gómez 0c36103b19
When skip expiration set, check errors is a validation and expiration one. 2020-10-29 20:47:05 -03:00
Ignacio Gómez 958d7bcc68
Merge pull request #101 from iegomez/feat/cache-refresh-option
Cache refresh option
2020-10-23 19:17:05 -03:00
Ignacio Gómez 33cadc06d5 Mention cache security issue and fix custom plugin description. 2020-10-23 19:10:35 -03:00
Ignacio Gómez bb8acfa511
Add opts prefix for hasher, add mysql options table. 2020-10-22 20:35:08 -03:00
Ignacio Gómez 89d2817d2e
Add cache refresh change warning in readme. 2020-10-22 20:07:33 -03:00