{"record":{"id":"92dfbe3a0482aad7","repo":"t8y2/dbx","slug":"invalid-useticketcache-option-w","errorCode":null,"errorMessage":"invalid useticketcache option: %w","messagePattern":"invalid useticketcache option: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/config.go","lineNumber":334,"sourceCode":"\t\tcase \"kerberosqop\", \"saslqop\":\n\t\t\tconfig.kerberos.qop = value\n\t\tcase \"kerberosdisablepafxfast\", \"disablepafxfast\":\n\t\t\tdisabled, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid disablepafxfast option: %w\", err)\n\t\t\t}\n\t\t\tconfig.kerberos.disablePAFXFAST = disabled\n\t\tcase \"kerberosusekeytab\", \"usekeytab\":\n\t\t\tenabled, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid usekeytab option: %w\", err)\n\t\t\t}\n\t\t\tconfig.kerberos.useKeytab = enabled\n\t\t\tconfig.kerberos.useKeytabSet = true\n\t\tcase \"kerberosuseticketcache\", \"useticketcache\":\n\t\t\tenabled, err := strconv.ParseBool(value)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"invalid useticketcache option: %w\", err)\n\t\t\t}\n\t\t\tconfig.kerberos.useTicketCache = enabled\n\t\t\tconfig.kerberos.useTicketCacheSet = true\n\t\tcase \"compliancemode\":\n\t\t\t// JDBC compliance modes only alter java.sql behavior. The native DBX\n\t\t\t// JSON-RPC contract already defines statement and transaction behavior.\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"unsupported Cassandra URL parameter: %s\", rawKey)\n\t\t}\n\t}\n\treturn nil\n}\n\nfunc (config cassandraConfig) clusterConfig(keyspace string) (*gocql.ClusterConfig, error) {\n\tvar cluster *gocql.ClusterConfig\n\tvar err error\n\tif config.secureConnectBundle != \"\" {\n\t\tcluster, err = gocqlastra.NewClusterFromBundle(","sourceCodeStart":316,"sourceCodeEnd":352,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/config.go#L316-L352","documentation":"The 'useticketcache' (or 'kerberosuseticketcache') URL parameter enables Kerberos ticket-cache based auth and must be a strconv.ParseBool-valid boolean. Invalid values produce this wrapped error and stop config parsing.","triggerScenarios":"DSN contains useticketcache=<value> with a non-boolean string, e.g. useticketcache=Y or an empty value from an unset environment variable.","commonSituations":"Developer laptops using kinit ticket caches copying Java driver examples; CI environments where an env var meant to supply the flag is unset; case-sensitive boolean mistakes.","solutions":["Use true/false (or 1/0, t/f) for useticketcache","Remove the parameter if the default is desired","Ensure env substitution in the DSN actually produces a boolean literal"],"exampleFix":"// before\ncassandra://127.0.0.1/myks?useticketcache=${KRB_FLAG}\n// after (with KRB_FLAG=1)\ncassandra://127.0.0.1/myks?useticketcache=true","handlingStrategy":"validation","validationCode":"if v := q.Get(\"useticketcache\"); v != \"\" {\n\tif _, err := strconv.ParseBool(v); err != nil {\n\t\treturn errors.New(\"useticketcache must be a boolean\")\n\t}\n}","typeGuard":null,"tryCatchPattern":"if err := parseCassandraConfig(dsn); err != nil {\n\tif strings.Contains(err.Error(), \"useticketcache option\") {\n\t\treturn parseCassandraConfig(defaultBoolParam(dsn, \"useticketcache\", \"true\"))\n\t}\n\treturn err\n}","preventionTips":["Default env-substituted flags to an explicit boolean when unset","Use 1/0 in machine-generated URLs","Validate the full DSN before opening a session"],"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-14T00:17:10.932Z"}