mmetc
31b914512a
refact pkg/database: unnecessary pointers ( #3611 )
...
* refact pkg/database: unnecessary pointers
* lint
2025-05-07 11:12:27 +02:00
mmetc
49927f79a1
CI: golangci-lint v2 ( #3558 )
...
* golangci-lint v2
* CI: reduce parallel jobs for hubtests
2025-04-03 16:57:56 +02:00
mmetc
45624c6fe5
tests: switch context.Background() -> t.Context() from go 1.24 ( #3473 )
2025-02-21 00:09:11 +01:00
blotus
16d0677938
Add support for centralized allowlists ( #3355 )
2025-02-19 15:04:47 +01:00
blotus
5d414f58e5
Add explicit configuration for signals sharing and blocklists pull ( #3277 )
2024-11-08 15:11:09 +01:00
mmetc
96d4da76b9
remove unused code: HandleDeletedDecisions() ( #3301 )
2024-10-29 09:33:44 +01:00
mmetc
b9bccfa56f
context propagation: pkg/apiserver ( #3272 )
...
* context propagation: apic.Push()
* context propagation: NewServer()
* lint
2024-10-09 13:06:03 +02:00
mmetc
06adbe031d
context propagation: apic, unit tests ( #3271 )
...
* context propagation: apic
* context propagation: unit tests
2024-10-03 14:51:53 +02:00
mmetc
27451a5ee6
context propagation: pass ctx to UpdateScenario() ( #3258 )
...
* context propagation: pass ctx to UpdateScenario()
* context propagation: SendMetrics, SendUsageMetrics, plugin config
2024-10-02 13:39:07 +02:00
mmetc
3945a991bd
context propagation: pkg/database/alerts ( #3252 )
...
* alerts
* drop CTX from dbclient
* lint
* pkg/database/alerts: context.TODO()
* cscli: context.Background() -> cmd.Context()
2024-09-24 14:13:45 +02:00
mmetc
eeb28014c6
context propagation: pkg/database/config ( #3246 )
2024-09-19 14:09:35 +02:00
mmetc
b4a2403fdf
context propagation: bouncer list ( #3236 )
2024-09-19 11:14:33 +02:00
mmetc
be391a3da8
context propagation: pass context to NewAPIC() ( #3231 )
2024-09-19 11:09:29 +02:00
mmetc
5f22c78fcf
enable linters: copyloopvar, intrange ( #3184 )
...
* enable linters: copyloopvar, intrange
* lint
2024-09-17 16:10:56 +02:00
mmetc
c8750f604c
refact: pkg/apiclient set and use default user agent ( #3219 )
...
* default user agent
* DRY default user agent
* useragent.go
* moved to pkg/apiclient/useragent
* lint
* rename useragent.DefaultUserAgent() -> useragent.Default()
2024-09-09 11:27:20 +02:00
mmetc
3532e872d3
metrics: avoid nil deref with inactive bouncers or malformed response ( #3170 )
...
* metrics: avoid nil deref with inactive bouncers
* log message from API even it if cannot be parsed
* fix unit test
2024-08-08 16:46:39 +02:00
mmetc
4b988701ed
lint (intrange) ( #2970 )
2024-06-21 13:47:26 +02:00
mmetc
8a259fd25b
lint (copyloopvar) ( #2971 )
2024-06-20 22:13:26 +02:00
mmetc
bd4540b1bf
refactor context (cscli, pkg/database) ( #3071 )
...
* cscli: helper require.DBClient()
* refactor pkg/database: explicit context to dbclient constructor
* lint
2024-06-11 12:13:18 +02:00
mmetc
7d6514c7cc
update user agent with version and platform information ( #3035 )
...
* update user agent with version and platform information
* remove unused import
* user agent: omit tag correctly if git is dirty
2024-05-30 09:45:43 +02:00
mmetc
da746f77d5
apiserver/apiclient: compact tests ( #2694 )
...
* apiserver/apiclient: compact tests
* update golangci-lint configuration
2024-01-04 17:10:36 +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
Cristian Nitescu
7c5cbef51a
manage force_pull message for one blocklist ( #2615 )
...
* manage force_pull message for one blocklist
* fix info message on force pull blocklist
2023-11-29 11:37:46 +01:00
blotus
380cbf70a9
force rfc 3339 date format in metrics push ( #2402 )
2023-11-28 16:30:20 +01:00
mmetc
5cd4406f5e
typos/grammar ( #2561 )
2023-11-07 15:07:36 +01:00
Thibault "bui" Koechlin
e4dcdd2572
fix include_capi filter ( #2478 )
2023-09-20 11:56:00 +02:00
mmetc
ffadd42779
update dependency on go-cs-lib; drop the pkg/ part ( #2393 )
2023-07-28 16:35:08 +02:00
mmetc
507da49b5a
send metrics immediately if agents are added or removed ( #2296 )
2023-06-23 14:06:04 +02:00
mmetc
b2d3520519
decouple bouncer dependencies: use go-cs-lib in test code ( #2229 )
2023-05-25 15:37:44 +02:00
mmetc
364b833d67
test cleanup: remove /tmp/crowdsec_tests* directories ( #2232 )
2023-05-25 15:32:32 +02:00
mmetc
534328ca30
decouple bouncer dependencies: use go-cs-lib/pkg/* ( #2216 )
...
* decouple bouncer dependencies: use go-cs-lib/pkg/trace
* decouple bouncer dependencies: use go-cs-lib/pkg/version
* decouple bouncer dependencies: use go-cs-lib/pkg/yamlpatch
* decouple bouncer dependencies: use go-cs-lib/pkg/csstring
* unused import
2023-05-23 10:52:47 +02:00
blotus
91eb39cff6
New PAPI commands: reauth + force_pull ( #2129 )
2023-03-21 14:06:19 +01:00
Thibault "bui" Koechlin
a74e424d53
support ip and cidr based whitelists for capi and 3rd party blocklists ( #2132 )
...
* support ip and cidr based whitelists for capi and 3rd party blocklist
2023-03-21 11:50:10 +01:00
JDEV
12a4a5fb14
CAPI error code handling tests ( #2027 )
...
* Registration mocked error cases
* Authentication mock error cases
* mini facto
* check that getMEtric still has bouncers/machines keys in output even with empty collections
* fixed defer body close(), no need to defer and fprint arg
* fix fatal call
---------
Co-authored-by: jdv <julien@crowdsec.net>
2023-02-17 14:57:46 +01:00
Cristian Nitescu
ecb32d74c6
optimize blocklist fetch ( #2039 )
2023-02-13 15:06:14 +01:00
Cristian Nitescu
987f119c4b
v3 capi and blocklists links support ( #2019 )
...
* v3 model generation
* v3 model generation
* comms
* fixes after master merge
* missing reader close
* use constants defined for types
---------
Co-authored-by: bui <thibault@crowdsec.net>
2023-02-06 14:06:14 +01:00
Thibault "bui" Koechlin
e927717fa0
Polling API Integration ( #1715 )
...
Co-authored-by: alteredCoder <kevin@crowdsec.net>
Co-authored-by: he2ss <hamza.essahely@gmail.com>
Co-authored-by: Sebastien Blot <sebastien@crowdsec.net>
2023-01-31 14:47:44 +01:00
AlteredCoder
185f9ad541
Alert context ( #1895 )
...
Co-authored-by: bui <thibault@crowdsec.net>
2023-01-04 16:50:02 +01:00
mmetc
df88f4e1e9
randomize pull, push and metric intervals; reload crowdsec only when hub changed ( #1846 )
2022-10-28 13:55:59 +02:00
mmetc
edced6818a
cleanup + fix flaky tests in file_test.go, apic_test.go ( #1773 )
2022-09-30 16:01:42 +02:00
blotus
0449ec1868
Windows Support ( #1159 )
2022-05-17 12:14:59 +02:00
Greg Myers
0f4ab71f01
Fix typos in docs, comments, code ( #1483 )
2022-04-27 11:04:12 +02:00
Thibault "bui" Koechlin
d8dc01cd94
Revamp unit tests ( #1368 )
...
* Revamp unit tests
* Increase coverage
* Use go-acc to get cross packages coverage
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
2022-03-29 14:20:26 +02:00