diff --git a/cmd/root.go b/cmd/root.go index 0bf182e..31eec90 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -218,9 +218,10 @@ func Execute() error { ScenariosContaining: strings.Join(conf.IncludeScenariosContaining, ","), Origins: strings.Join(conf.OnlyIncludeDecisionsFrom, ","), }, - CertPath: conf.CertPath, - KeyPath: conf.KeyPath, - CAPath: conf.CAPath, + CertPath: conf.CertPath, + KeyPath: conf.KeyPath, + CAPath: conf.CAPath, + InsecureSkipVerify: &conf.CrowdSecInsecureSkipVerify, } if err := csLAPI.Init(); err != nil { return err diff --git a/pkg/cfg/config.go b/pkg/cfg/config.go index a5c2606..ab11021 100644 --- a/pkg/cfg/config.go +++ b/pkg/cfg/config.go @@ -44,6 +44,7 @@ type PrometheusConfig struct { type bouncerConfig struct { CrowdSecLAPIUrl string `yaml:"crowdsec_lapi_url"` CrowdSecLAPIKey string `yaml:"crowdsec_lapi_key"` + CrowdSecInsecureSkipVerify bool `yaml:"crowdsec_insecure_skip_verify"` CrowdsecUpdateFrequencyYAML string `yaml:"crowdsec_update_frequency"` IncludeScenariosContaining []string `yaml:"include_scenarios_containing"` ExcludeScenariosContaining []string `yaml:"exclude_scenarios_containing"` diff --git a/test/bouncer/test_tls.py b/test/bouncer/test_tls.py index 99eb80e..fb61529 100644 --- a/test/bouncer/test_tls.py +++ b/test/bouncer/test_tls.py @@ -84,7 +84,7 @@ def test_tls_mutual(crowdsec, certs_dir, api_key_factory, bouncer, cf_cfg_factor "*API error: access forbidden*", ]) - cs.wait_for_log("*client certificate OU (?agent-ou?) doesn't match expected OU (?bouncer-ou?)*") + cs.wait_for_log("*client certificate OU ?agent-ou? doesn't match expected OU ?bouncer-ou?*") cfg['cert_path'] = (certs / 'bouncer.crt').as_posix() cfg['key_path'] = (certs / 'bouncer.key').as_posix()