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>
This commit is contained in:
mathieuHa
2022-11-30 17:54:49 +01:00
committed by GitHub
co-authored by Max Lerebourg
parent b2ed600d5e
commit a2fe60c621
19 changed files with 817 additions and 68 deletions
+3 -2
View File
@@ -11,7 +11,7 @@ linters-settings:
golint:
min-confidence: 0
gocyclo:
min-complexity: 12
min-complexity: 15
goconst:
min-len: 5
min-occurrences: 4
@@ -69,7 +69,8 @@ issues:
exclude-use-default: false
max-per-linter: 0
max-same-issues: 0
exclude: []
exclude:
- "G402: TLS InsecureSkipVerify may be true."
exclude-rules:
- path: (.+)_test.go
linters: