mmetc
1bc3b0870b
command "cscli doc --target /path/to/dir" ( #3169 )
...
* command "cscli doc --target /path/to/dir"
* typos and improved messages
* CI: remove obsolete parameters for golangi-lint action
* lint
2024-08-07 12:45:54 +02:00
mmetc
6f5d75c5f1
cscli metrics: explicit message "no bouncer metrics found" ( #3155 )
2024-07-29 14:13:06 +02:00
mmetc
20067a85a0
cscli/hub: don't return error if some file can't be recognized ( #3150 )
...
In k8s there can be extra directories while mounting config maps, which
leads to a failure while parsing the hub state. The PR changes these
kind of errors to warnings.
2024-07-24 16:29:38 +02:00
mmetc
64e4ecde90
LAPI: detailed metrics endpoint ( #2858 )
2024-07-24 10:29:18 +02:00
marco
61d19cff84
update table test
2024-07-22 14:58:43 +02:00
mmetc
5b4f924d5f
allow .index.json to embed item content ( #3145 )
2024-07-22 10:54:39 +02:00
mmetc
35f97d4855
bats: curl helpers to mock log processors and bouncers ( #3141 )
2024-07-18 11:13:18 +02:00
mmetc
f130ce677d
command "cscli metrics show bouncers" ( #3126 )
...
* cscli metrics show bouncers
* db metrics: increase payload size
* func tests
2024-07-15 09:55:52 +02:00
mmetc
6f5e970f50
func tests: update curl wrapper ( #3121 )
2024-07-10 12:57:16 +02:00
mmetc
9cebcf96b4
command cscli [machines|bouncers] inspect ( #3103 )
...
* command cscli [machines|bouncers] inspect
* lint
2024-07-03 17:20:20 +02:00
mmetc
27935f6d4c
fix "cscli [machines|bouncers] delete" autocompletion ( #3101 )
...
* fix "cscli [machines|bouncers] delete" autocompletion
* func test
2024-07-01 16:35:34 +02:00
mmetc
a3bd9baec1
improved tls middleware revocation checks ( #3034 )
2024-06-26 10:41:30 +02:00
mmetc
a1ebe18221
config: expand env variables in local_api_credentials.yaml and .yaml.local ( #3093 )
...
* config: expand env variables in local_api_credentials.yaml and .yaml.local
* fix func test
2024-06-20 17:18:41 +02:00
mmetc
4521a98ecc
db: don't set machine heartbeat until first connection ( #3019 )
...
* db: don't set machine heartbeat until first connection
* cscli machines prune: if hearbeat is not set, look at creation date
* lint
2024-06-17 10:39:50 +02:00
mmetc
44a2014f62
db: don't set bouncer last_pull until first connection ( #3020 )
...
* db: don't set bouncer last_pull until first connection
* cscli bouncers prune: query creation date if they never connected
2024-06-17 10:16:46 +02:00
mmetc
c39c9cf8b7
cscli: fix deprecation message for "context delete" ( #3078 )
...
missing newline, proper return code, same msg as dashboard, test
2024-06-11 09:28:10 +02:00
mmetc
cad760e605
pkg/cwhub: use explicit context for version check, index update ( #3064 )
...
* cscli refactor: explicit context for hub (version lookup)
* change order of version checks
* pkg/cwhub: split NewHub() + Update() + Load()
* cscli refactor: explicit context for hub (index update)
* updated pkg/cwhub docs
* lint
2024-06-07 16:56:02 +02:00
mmetc
114a966129
refactor "cscli decisions" ( #3061 )
...
* cscli decisions: extract method add()
* cscli decisions: extract method delete()
* cscli lapi: avoid apiclient global
* cscli capi: avoid apiclient global
* cscli decisions: error cleanup, avoid global for api client
* update test
* cscli alerts: extract method delete()
* lint
2024-06-06 10:21:03 +02:00
Manuel Sabban
2865b69855
fix tests in 01_crowdsec.bats for packages testing ( #3054 )
2024-06-05 08:26:32 +02:00
mmetc
d614ecbdcf
CI/bats: test remediation api via socket ( #3052 )
2024-06-04 15:09:19 +02:00
mmetc
0ba05acc03
tests: replace "docker-compose" -> "docker compose" ( #3000 )
...
* replace "docker-compose" -> "docker compose"
* obsolete doc note
* bats: clean up extra output
2024-05-17 10:07:28 +02:00
mmetc
b6253d567b
simulation for local scenarios ( #3010 )
2024-05-16 11:13:39 +02:00
mmetc
ccf08e56d9
bats: no need for openssl, netcat; allow to prevent tests from running with a lock ( #3016 )
...
* bats: lock/unlock instance data; replace openssl w/ cfssl; update dep list
* concat pem without openssl :-/
* unused/unreachable code
* lint
* redundant {} (shellharden)
2024-05-16 10:58:00 +02:00
mmetc
cc63729b2c
version: write to stdout, add missing newline ( #3012 )
...
* pkg/cwversion cleanup
- add missing newline between version and codename
- add more information to "support dump"
- write "cscli version" and "crowdsec -version" to stdout, not stderr
* fix func test
* lint
2024-05-15 10:52:43 +02:00
mmetc
ccab6e9910
bats: clean up extra output ( #3008 )
2024-05-15 10:38:36 +02:00
mmetc
e3c6a5ba70
LAPI: support CRL files with multiple PEM blocks ( #3002 )
2024-05-13 17:09:30 +02:00
mmetc
26b3410ef1
CI: improve test "cscli machines prune" ( #2992 )
2024-05-13 09:48:08 +02:00
mmetc
defa076794
CI: disable log formatting for consistency ( #2989 )
...
* CI: disable log formatting for consistency
* lint (shellharden)
2024-05-07 15:09:22 +02:00
mmetc
0d9e000543
use go-cs-lib/downloader for data files, hub index, item YAML ( #2926 )
2024-05-07 13:44:17 +02:00
mmetc
11da728b51
cscli support: collect profiling data and logs ( #2987 )
...
* extract methods, avoid globals
* collect logs to file dump.log
* include pprof data
* include latest logs
2024-05-07 12:59:38 +02:00
mmetc
6c042f18f0
LAPI: local api unix socket support ( #2770 )
2024-03-14 10:43:02 +01:00
mmetc
49e0735b53
cscli tests + fix bouncer/machine prune ( #2883 )
...
* func tests: "cscli config feature-flags"
* func tests: "cscli bouncers list"
* func tests + fix: "cscli bouncers/machines prune"
* lint
2024-03-11 13:14:01 +01:00
mmetc
d8877a71fc
lp metrics: collect datasources and console options ( #2870 )
2024-03-05 14:56:14 +01:00
mmetc
d34fb7e8a8
log processor: share apiclient in output goroutines ( #2836 )
2024-02-13 14:22:19 +01:00
mmetc
df159b0167
update calls to deprecated x509 methods ( #2824 )
2024-02-09 13:55:24 +01:00
mmetc
fdc525164a
refact "cscli metrics" part 3 ( #2807 )
2024-02-06 10:07:05 +01:00
mmetc
4160bb8102
refact "cscli decisions" ( #2804 )
...
* refact "cscli decisions"
* CI: relax mysql test timing
* lint
2024-02-01 22:36:21 +01:00
mmetc
17db4cb970
refact "cscli machines" ( #2777 )
2024-02-01 17:22:52 +01:00
Manuel Sabban
3f9e8e81e6
fix some bats tests ( #2775 )
2024-01-24 19:51:55 +01:00
mmetc
455acf7c90
lapi/papi: when receiving alerts, log and discard invalid addr/range ( #2708 )
...
https://github.com/crowdsecurity/crowdsec/issues/2687
2024-01-22 12:24:26 +01:00
mmetc
ce32fc019e
func tests improvements ( #2759 )
...
* faster reload test
* decode-jwt script
* replace 'netcat' requirement with python script
* fix lapi status test
2024-01-19 13:55:28 +01:00
mmetc
1e0bcedef5
Ignore missing console/context.yaml if not explicitly required by config.yaml ( #2726 )
2024-01-12 16:29:04 +01:00
mmetc
fca8883cd9
cscli capi status -> message for missing credentials ( #2730 )
...
* cscli capi status -> message for missing credentials
* lint
2024-01-12 14:41:36 +01:00
mmetc
6960419a2e
Remove redundant file check for capi_whitelists_path ( #2728 )
2024-01-12 14:17:01 +01:00
mmetc
260f5a7992
pkg/cwhub: improve error messages ( #2712 )
...
* pkg/cwhub: improve error messages
* lint
2024-01-11 10:28:58 +01:00
mmetc
a504113186
lint (wsl) ( #2692 )
2024-01-03 10:55:41 +01:00
mmetc
2a2b09b52a
cwhub: install --force repair tainted, non-installed items ( #2686 )
2024-01-03 10:08:45 +01:00
mmetc
ca784b147b
test and log fixes ( #2690 )
...
* cscli inspect: suggest --diff if an item is tainted
* appropriate warning, or error if context configuration file is empty
* fix user/group lookup unit test
* fix: allow hub upgrade --force with local items
* fix pkg/parser lookup for 8.8.8.8
* fix func test
* fix hubtests: machines add --force
2024-01-03 09:33:52 +01:00
mmetc
a79fcaf378
Add "taintedBy" and "--diff" flag to cscli... inspect ( #2665 )
...
* "cscli inspect" reports tainted sub-items
* cscli... inspect --diff
* unified diff
* option --diff --rev
* tainted message
* correctly report multiple taint reasons
2023-12-15 15:27:22 +01:00
mmetc
89f704ef18
light pkg/api{client,server} refact ( #2659 )
...
* tests: don't run crowdsec if not necessary
* make listen_uri report the random port number when 0 is requested
* move apiserver.getTLSAuthType() -> csconfig.TLSCfg.GetAuthType()
* move apiserver.isEnrolled() -> apiclient.ApiClient.IsEnrolled()
* extract function apiserver.recoverFromPanic()
* simplify and move APIServer.GetTLSConfig() -> TLSCfg.GetTLSConfig()
* moved TLSCfg type to csconfig/tls.go
* APIServer.InitController(): early return / happy path
* extract function apiserver.newGinLogger()
* lapi tests
* update unit test
* lint (testify)
* lint (whitespace, variable names)
* update docker tests
2023-12-14 14:54:11 +01:00