{"record":{"id":"19e1db28b0aab5af","repo":"t8y2/dbx","slug":"invalid-kerberos-credential-cache-path-w","errorCode":null,"errorMessage":"invalid Kerberos credential cache path: %w","messagePattern":"invalid Kerberos credential cache path: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/kerberos.go","lineNumber":526,"sourceCode":"\t}\n\treturn \"\"\n}\n\nfunc normalizeKerberosCachePath(raw string) (string, error) {\n\tvalue := strings.TrimSpace(raw)\n\tif value == \"\" {\n\t\treturn \"\", fmt.Errorf(\"Kerberos ticket cache path is empty\")\n\t}\n\tif separator := strings.IndexByte(value, ':'); separator > 0 && !isWindowsDrivePath(value) {\n\t\tcacheType := strings.ToUpper(value[:separator])\n\t\tif cacheType != \"FILE\" {\n\t\t\treturn \"\", fmt.Errorf(\"Kerberos credential cache type %s is not supported; use a FILE cache or keytab\", cacheType)\n\t\t}\n\t\tvalue = value[separator+1:]\n\t}\n\tpath, err := normalizeLocalFilePath(value)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid Kerberos credential cache path: %w\", err)\n\t}\n\treturn path, nil\n}\n\nfunc isWindowsDrivePath(value string) bool {\n\treturn len(value) >= 3 && ((value[0] >= 'A' && value[0] <= 'Z') || (value[0] >= 'a' && value[0] <= 'z')) &&\n\t\tvalue[1] == ':' && (value[2] == '\\\\' || value[2] == '/')\n}\n\nfunc normalizeKerberosFileReference(raw string) (string, error) {\n\tvalue := strings.TrimSpace(raw)\n\tif strings.HasPrefix(strings.ToUpper(value), \"FILE:\") {\n\t\tvalue = value[5:]\n\t}\n\tpath, err := normalizeLocalFilePath(value)\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"invalid Kerberos file path: %w\", err)\n\t}","sourceCodeStart":508,"sourceCodeEnd":544,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/kerberos.go#L508-L544","documentation":"After stripping an optional FILE: prefix, normalizeKerberosCachePath validates the remaining path with normalizeLocalFilePath and it failed. This is a wrapped path-validation error — the ccache path is malformed (e.g. not absolute/expanded, contains an invalid user-home reference, or normalizeLocalFilePath rejected it).","triggerScenarios":"ticketcache value like `~/krb5cc` (tilde unexpanded), a relative path, or a path normalizeLocalFilePath rejects (empty after FILE: strip, or other local-path rule violations) passed via config, JAAS TicketCache option, or KRB5CCNAME.","commonSituations":"Using `~` in config files expecting shell expansion; `FILE:` with nothing after it; container images where the referenced path is on a filesystem the validator rejects; copied Java configs using file: URLs.","solutions":["Use an absolute, expanded path (no `~`; substitute $HOME or the literal /home/user path).","Ensure the FILE: prefix has an actual path after it (FILE:/tmp/krb5cc_1000, not FILE:).","Log/inspect the wrapped inner error from normalizeLocalFilePath for the exact rule violated and correct the path accordingly.","Point the ticket cache at the file kinit actually created (check with `klist`)."],"exampleFix":"// before\nticketcache=\"~/krb5cc\"\n// after\nticketcache=\"/home/cassandra/krb5cc\"","handlingStrategy":"validation","validationCode":"func validateCCachePath(raw string) (string, error) {\n\tp := strings.TrimSpace(raw)\n\tp = strings.TrimPrefix(strings.ToUpper(p[:min(5, len(p))])+p[min(5, len(p)):], \"FILE:\")\n\tp = os.ExpandEnv(p)\n\tif !filepath.IsAbs(p) { return \"\", fmt.Errorf(\"ccache path must be absolute, got %q\", p) }\n\tif _, err := os.Stat(p); err != nil { return \"\", err }\n\treturn p, nil\n}","typeGuard":null,"tryCatchPattern":"if err := client.Finalize(); err != nil {\n\tif strings.Contains(err.Error(), \"invalid Kerberos credential cache path\") {\n\t\tlog.Fatalf(\"fix ticketcache path (absolute, expanded, no bare FILE:)\")\n\t}\n\treturn err\n}","preventionTips":["Never use `~` in configs; expand $HOME or hardcode absolute paths.","Ensure FILE: prefix (if used) is followed by a real path.","Verify the path exists with klist before app start.","Keep ccache paths under writable, persistent directories like /tmp or /var/cache."],"tags":["kerberos","cassandra","config","path"],"backgroundTag":"invalid-file-path","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"}