Commit Graph
82 Commits
Author SHA1 Message Date
mathieuHaandGitHub 29878e837c 🐛 65 confused about configuring tls (#69)
* 🐛 Fix bug reading LAPIKEY, update exemples

* 🚨 Fix lint
2022-12-30 11:24:14 +01:00
Mathieu HANOTAUX 1e82ecd1b9 🚑 Fix bug that prevent Treafik plugin to pull first logs 2022-12-11 21:48:19 +01:00
Mathieu HANOTAUX b3a874f514 🚨 Fix Lint simplify 2022-12-05 19:27:56 +01:00
Max Lerebourg 1f094d818a 💄 move getTlsConfig to configuration pkg 2022-12-05 08:10:56 +01:00
Max Lerebourg 988f3ebeae add configuration pkg and tests 2022-12-04 21:40:14 +01:00
Max Lerebourg 5dd06567f4 🍱 test validate 2022-12-04 16:58:06 +01:00
a2fe60c621 51 feature support tls connections to crowdsec not signed by a public ca (#53)
*  Add support for insecure tls connections to LAPI

* 📝 Add documentation for the TLS insecure parameter

* 🚧 Add tls authority certificate and checks for params

* 📝 Add example for tls communication in readme and folder

* 📝 Update documentation and example for tls

* 🚨 Fix easy lint errors

* 🦺 logic to fetch certificates

* 🚨 Fix lint on readme

* ♻️ Refactor validate to fix lint and clean

* 🚧 Add doc, cert gen for crowdsec example

* 🚧 Progress on setting up Crowdsec with tls

* 🚧 Update certs validation for example

* ♻️ Add load variable from file or value and get client cert

* ♻️ Refactor getting variables

* 🚨 Fix lint, no new line on new files

* 🐛 Fix bug on condition check lapi key cert

* ♻️ Update after review

* ♻️ Update after review

* 🍱 fix mathieu code

* ♻️ Refactor logic of loading tls certificates

* 🍱 clean code

* 🍱 last fix

* 🍱 fix lint

* ♻️ Add documentation in readme, fix lint, remove unfinished tests

* 🐛 Fix conditions logics

* 🚨 Fix Lint

* ♻️ simplify code on getVariable

Co-authored-by: Max Lerebourg <maxlerebourg@gmail.com>
2022-11-30 17:54:49 +01:00
mathieuHaandGitHub 16d392ebeb 🐛 Revert condition of healthy stream in stream mode (#48)
* 🐛 Revert condition of healthy stream in stream mode

* 🔊 Update logs format for error case

* ♻️ Invest condition for is stream healthy
2022-11-27 11:52:41 +01:00
Max Lerebourg b37f866ca9 🍱 fix lint :vomit: 2022-11-20 12:33:39 +01:00
Max Lerebourg 1dc50a8a8c 🍱 add more error context 2022-11-20 12:29:00 +01:00
Max Lerebourg 953e9f6bf4 🍱 fix lint 2022-11-20 12:12:20 +01:00
Max Lerebourg d1d64689af 🍱 fix logic + logs 2022-11-20 12:04:05 +01:00
Max Lerebourg 80d49e3969 🍱 fix loging 2022-11-19 22:23:12 +01:00
Max Lerebourg 15bca90b18 🍱 fix loging 2022-11-19 22:17:06 +01:00
mathieuHaandGitHub 24c7801dac ⬆️ Bump to go 1.19 (#37)
* ⬆️ Bump to go 1.19

* ⬆️ Remove depreciated function and replace io/utils calls
2022-11-19 20:40:03 +01:00
0a54f7b09f Update CI following latest plugindemo version (#34)
* Update CI following latest plugindemo version

* disable some linter

* Disable some linter

* Fix linter in redis, add error logger

* 🚨 Fix lint errors in private packages

* 🚨 Update lints in package and core code

* 🚨 exclude unfixable lint errors

* 🚨 update lint at package level and ignore necessary global variable

* 🍱 fix lint qnd merge

* 🚨 Fix Lint for string

* 🚨 Fix lint for bouncer

* 🚨 Fix error

* Fix weird linter error

Co-authored-by: Max Lerebourg <maxlerebourg@gmail.com>
2022-11-19 19:35:01 +01:00
MathieuHa bb714b5dfd Change debug to info log 2022-11-19 15:17:56 +01:00
MathieuHa 73374ccefe Rework variables name, and logic to check IPs with strategy 2022-11-19 13:27:51 +01:00
MathieuHa 490e5e934f Merge remote-tracking branch 'origin' into 28-bypassing-crowdsec-for-local-ips 2022-11-19 12:22:56 +01:00
MathieuHa 5b0d4b533f Add logic return to bypass when IP is unfiltered, update documentation 2022-11-19 12:16:20 +01:00
Max Lerebourg 400de0d552 add redis timeout 2022-11-18 20:36:42 +01:00
MathieuHa 3742b6b540 Fix nil trusted checker 2022-11-17 09:34:16 +01:00
MathieuHa d2f0a9416d Add check to load param 2022-11-17 09:21:57 +01:00
MathieuHa 3f70e2b256 First implementation of the bypass feature for trusted IP 2022-11-16 23:17:41 +01:00
Max Lerebourg 23620207f7 🍱 fix before version 2022-11-06 12:57:32 +01:00
Max Lerebourg 41a46c0584 add delete 2022-10-24 21:56:38 +02:00
Max Lerebourg ffcf4356fc redis included 2022-10-20 02:42:24 +02:00
Max Lerebourg a197194591 not working... 2022-10-19 08:21:01 +02:00
Max Lerebourg 44e329cd57 🍱 fix 2022-10-17 22:14:49 +02:00
MathieuHa 4058836678 Test library github.com/gomodule/redigo/redis 2022-10-17 20:58:27 +02:00
MathieuHa 87ed9e9c4e add bad library 2022-10-16 23:10:39 +02:00
8696501f61 add one instance of cache for all the service (#19)
*  add one instance of cache for all the service

* 🐛 fix the healthy issue

* 🐛 fix lint

* 🍱 upgrade codebase

* 🍱 fix lint

* 🐛 when there is master node shut down

* Set live mode as default, clean docker and recipes

* Restore live mode in readme as default

* 🍱 add channel management

* 🍱 order funcs

* 🍱 revert service in docker compose

*  logLevel added + cache put out the bouncer

* 🍱 fix

* 🍱 fix

* 🍱 fix

Co-authored-by: MathieuHa <mathieu@hanotaux.fr>
2022-10-16 20:14:41 +02:00
MathieuHa 8eec1c5656 Add Custom header usage to find the user IP 2022-10-15 18:49:41 +02:00
552b30a9ef 16 read ip address from x forwarded for or x real ip instead of remoteaddr if it exists (#17)
* Handle X forwarded for in the plugin

* Update docker-compose.cloudflare.yml

Change to version v1.0.9

* 🍱 fix + isolate cache

* 🍱 missing files

* 🍱 lint

Co-authored-by: MathieuHa <mathieu@hanotaux.fr>
Co-authored-by: Max Lerebourg <maxlerebourg@gmail.com>
2022-10-15 14:00:32 +02:00
Max Lerebourg 64a117d7b0 🍱 change default mode to live 2022-10-11 19:56:14 +02:00
Max Lerebourg d0ba71c0c8 🍱 clean code 2022-10-11 19:34:08 +02:00
Max Lerebourg 2e780b304d 🍱 remove alone mode 2022-10-11 19:28:57 +02:00
Max Lerebourg 4d7615dd19 🍱 fix waiter 2022-10-03 01:23:19 +02:00
MathieuHa 952fcd844f Clean docker-compose, update function name 2022-10-03 01:01:41 +02:00
MathieuHa 9cf4827768 Add Wait Stream feature 2022-10-03 00:37:41 +02:00
Max Lerebourg c99a0ddc46 fix logger 2022-10-01 20:02:49 +02:00
Max Lerebourg f876458bb2 fix logger 2022-10-01 20:00:42 +02:00
Max Lerebourg 6c6a80efb4 fix 2022-10-01 19:44:06 +02:00
MathieuHa cc0261aa86 Add clean message when stream polling start 2022-10-01 19:42:22 +02:00
Max Lerebourg dd704d4274 fix 2022-10-01 19:23:20 +02:00
Max Lerebourg 1e4508f091 fix log 2022-10-01 19:18:12 +02:00
Max Lerebourg 89e8b5631e fix loop 2022-10-01 19:12:48 +02:00
Max Lerebourg 68adb31065 fix loop 2022-10-01 19:09:22 +02:00
Max Lerebourg d4fce42fd7 🍱 lint 2022-09-30 00:03:09 +02:00
Max Lerebourg 253caac5a4 🍱 lint 2022-09-29 22:19:35 +02:00