{"record":{"id":"62f8e00de2218610","repo":"t8y2/dbx","slug":"invalid-usekrb5-option-w","errorCode":null,"errorMessage":"invalid usekrb5 option: %w","messagePattern":"invalid usekrb5 option: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/config.go","lineNumber":289,"sourceCode":"\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid disableinitialhostlookup option: %w\", err)\n\t\t\t}\n\t\t\tconfig.disableInitialHostLookup = disabled\n\t\tcase \"loadbalancing\":\n\t\t\tpolicy, err := normalizeLoadBalancingPolicy(value)\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t\tconfig.loadBalancingPolicy = policy\n\t\tcase \"sslenginefactory\":\n\t\t\tif value != \"\" && !strings.EqualFold(simpleClassName(value), \"DefaultSslEngineFactory\") {\n\t\t\t\treturn fmt.Errorf(\"custom Cassandra sslenginefactory is not supported by the native agent: %s\", value)\n\t\t\t}\n\t\t\tconfig.ssl = true\n\t\tcase \"usekrb5\":\n\t\t\tenabled, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid usekrb5 option: %w\", err)\n\t\t\t}\n\t\t\tconfig.kerberos.enabled = enabled\n\t\tcase \"secureconnectbundle\":\n\t\t\tconfig.secureConnectBundle = value\n\t\tcase \"configfile\":\n\t\t\tconfig.configFile = value\n\t\tcase \"kerberosconfig\", \"kerberosconfigpath\", \"krb5config\", \"krb5conf\":\n\t\t\tconfig.kerberos.configPath = value\n\t\tcase \"jaasconfig\", \"jaasconfigpath\":\n\t\t\tconfig.kerberos.jaasConfigPath = value\n\t\tcase \"kerberosprincipal\", \"krb5principal\":\n\t\t\tconfig.kerberos.principal = value\n\t\tcase \"kerberosrealm\", \"krb5realm\":\n\t\t\tconfig.kerberos.realm = value\n\t\tcase \"kerberoskeytab\", \"keytab\":\n\t\t\tconfig.kerberos.keytabPath = value\n\t\tcase \"kerberosccache\", \"kerberosticketcache\", \"ccache\", \"ticketcache\":\n\t\t\tconfig.kerberos.ccachePath = value","sourceCodeStart":271,"sourceCodeEnd":307,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/config.go#L271-L307","documentation":"Returned by applyCassandraURLParams in the cassandra-go driver when the usekrb5 URL parameter cannot be parsed as a boolean by strconv (e.g. usekrb5=yes123). The parse error is wrapped with the 'invalid usekrb5 option' context; connection string parsing aborts.","triggerScenarios":"DSN contains usekrb5=<value> where value is not one of strconv.ParseBool's accepted literals, e.g. usekrb5=YES or usekrb5=.","commonSituations":"Kerberos setup instructions copied from Java docs using 'yes'/'no'; shell variables expanding to empty strings in the URL; case/format mistakes in generated connection strings.","solutions":["Use true/1 or false/0 (or t/f case variants) for usekrb5","Remove usekrb5 if Kerberos is not needed","Check that any env-substituted value in the DSN actually renders as a boolean"],"exampleFix":"// before\ncassandra://127.0.0.1/myks?usekrb5=YES\n// after\ncassandra://127.0.0.1/myks?usekrb5=true","handlingStrategy":"validation","validationCode":"if v := q.Get(\"usekrb5\"); v != \"\" {\n\tif _, err := strconv.ParseBool(v); err != nil {\n\t\treturn errors.New(\"usekrb5 must be a boolean\")\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := parseCassandraConfig(dsn); err != nil {\n\tif strings.Contains(err.Error(), \"usekrb5 option\") {\n\t\treturn normalizeBoolParams(dsn) // rewrite yes/on -> true\n\t}\n\treturn err\n}","preventionTips":["Standardize boolean flags as true/false across generated DSNs","Check env-var substitution produces non-empty boolean literals","Test Kerberos DSNs after any templating change"],"tags":["config","url-params","kerberos","boolean-parsing","cassandra"],"backgroundTag":"invalid-url-parameter","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}