{"record":{"id":"55fe42e5a392be89","repo":"t8y2/dbx","slug":"read-cassandra-jaas-config-s-w","errorCode":null,"errorMessage":"read Cassandra JAAS config %s: %w","messagePattern":"read Cassandra JAAS config (.+?): %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/cassandra-go/kerberos.go","lineNumber":460,"sourceCode":"func (config *kerberosConfig) applyJavaSystemProperties() {\n\tif config.jaasConfigPath == \"\" {\n\t\tconfig.jaasConfigPath = javaSystemProperty(\"java.security.auth.login.config\")\n\t}\n\tif config.configPath == \"\" {\n\t\tconfig.configPath = javaSystemProperty(\"java.security.krb5.conf\")\n\t}\n}\n\nfunc (config *kerberosConfig) applyKerberosConfigEnvironment() {\n\tif config.configPath == \"\" {\n\t\tconfig.configPath = os.Getenv(\"KRB5_CONFIG\")\n\t}\n}\n\nfunc (config *kerberosConfig) applyJAASConfig(path string) error {\n\tcontents, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"read Cassandra JAAS config %s: %w\", path, err)\n\t}\n\tblock := jaasBlockPattern.FindSubmatch(contents)\n\tif len(block) != 2 {\n\t\treturn fmt.Errorf(\"Cassandra JAAS config %s does not contain CassandraJavaClient\", path)\n\t}\n\tmodule := jaasModulePattern.FindSubmatch(block[1])\n\tif len(module) != 2 {\n\t\treturn fmt.Errorf(\"CassandraJavaClient in %s does not configure Krb5LoginModule\", path)\n\t}\n\toptions := map[string]string{}\n\tfor _, match := range jaasOptionPattern.FindAllSubmatch(module[1], -1) {\n\t\tvalue := firstNonEmpty(string(match[2]), string(match[3]), string(match[4]))\n\t\toptions[strings.ToLower(string(match[1]))] = value\n\t}\n\tif config.principal == \"\" {\n\t\tconfig.principal = options[\"principal\"]\n\t}\n\tif config.keytabPath == \"\" {","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/cassandra-go/kerberos.go#L442-L478","documentation":"Returned by applyJAASConfig when the Cassandra JAAS config file (from the connection config or java.security.auth.login.config system property) cannot be read with os.ReadFile. The wrapped error carries the OS-level cause — typically 'no such file or directory' or 'permission denied' — so the Kerberos login configuration cannot be loaded.","triggerScenarios":"Thrown at agents/drivers/cassandra-go/kerberos.go:460 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the JAAS config path exists and is readable by the agent process","Fix permissions (chmod/chown) if access is denied","If the path comes from java.security.auth.login.config, correct or unset that property"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}