{"record":{"id":"754bab3a0b445d81","repo":"crowdsecurity/crowdsec","slug":"unknown-parameter-s-754bab","errorCode":null,"errorMessage":"unknown parameter %s","messagePattern":"unknown parameter (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/acquisition/modules/s3/config.go","lineNumber":247,"sourceCode":"\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"unknown level %s: %w\", value[0], err)\n\t\t\t\t}\n\n\t\t\t\ts.logger.Logger.SetLevel(lvl)\n\t\t\tcase \"max_buffer_size\":\n\t\t\t\tif len(value) != 1 {\n\t\t\t\t\treturn errors.New(\"expected zero or one value for 'max_buffer_size'\")\n\t\t\t\t}\n\n\t\t\t\tmaxBufferSize, err := strconv.Atoi(value[0])\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn fmt.Errorf(\"invalid value for 'max_buffer_size': %w\", err)\n\t\t\t\t}\n\n\t\t\t\ts.logger.Debugf(\"Setting max buffer size to %d\", maxBufferSize)\n\t\t\t\ts.Config.MaxBufferSize = maxBufferSize\n\t\t\tdefault:\n\t\t\t\treturn fmt.Errorf(\"unknown parameter %s\", key)\n\t\t\t}\n\t\t}\n\t}\n\n\ts.Config.Labels = labels\n\ts.Config.Mode = configuration.CAT_MODE\n\ts.Config.UniqueId = uuid\n\n\tpathParts := strings.Split(args[0], \"/\")\n\ts.logger.Debugf(\"pathParts: %v\", pathParts)\n\n\t// FIXME: handle s3://bucket/\n\tif len(pathParts) == 1 {\n\t\ts.Config.BucketName = pathParts[0]\n\t\ts.Config.Prefix = \"\"\n\t} else if len(pathParts) > 1 {\n\t\ts.Config.BucketName = pathParts[0]\n\t\tif args[0][len(args[0])-1] == '/' {","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/crowdsecurity/crowdsec/blob/909b5157986a2b2c2163300fdaef5ed01289f7d2/pkg/acquisition/modules/s3/config.go#L229-L265","documentation":"ConfigureByDSN iterates the DSN query parameters and rejects any key it does not recognize with this error. Only the S3 source's supported parameters (e.g. log_level, max_buffer_size, and other documented keys) are allowed.","triggerScenarios":"A DSN such as crowdsec-s3://bucket?region=us-east-1&foo=bar where a key is not in the source's switch statement — either a genuinely unsupported option, a renamed option, or a typo.","commonSituations":"Copy-pasting DSN options from another data source (e.g. kafka or cloudwatch options); guessing parameter names; options removed or renamed in a newer crowdsec version.","solutions":["Remove the unknown parameter from the DSN.","Check the S3 acquisition documentation for the exact supported parameter names.","Check for typos or renamed options (e.g. max_buffer_size vs maxBufferSize)."],"exampleFix":"// before\ncrowdsec-s3://mybucket?bufffer_size=1024\n// after\ncrowdsec-s3://mybucket?max_buffer_size=1024","handlingStrategy":"validation","validationCode":"allowed := map[string]bool{\"log_level\":true, \"max_buffer_size\":true /* + other supported keys */}\nfor key := range params {\n    if !allowed[key] { return fmt.Errorf(\"unsupported S3 DSN parameter %q\", key) }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Copy DSN parameters only from the same source type's documentation.","Validate DSNs in CI with a config parse step.","Re-check parameter names after upgrading crowdsec."],"tags":["configuration","s3","acquisition","dsn"],"backgroundTag":"invalid-config-value","analyzedSha":"909b5157986a2b2c2163300fdaef5ed01289f7d2","analyzedAt":"2026-09-06T12:27:26.012Z","contentChangedAt":"2026-09-06T12:27:26.012Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}