t8y2/dbx · error

read Cassandra JAAS config %s: %w

Error message

read Cassandra JAAS config %s: %w

What it means

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.

Source

Thrown at agents/drivers/cassandra-go/kerberos.go:460

func (config *kerberosConfig) applyJavaSystemProperties() {
	if config.jaasConfigPath == "" {
		config.jaasConfigPath = javaSystemProperty("java.security.auth.login.config")
	}
	if config.configPath == "" {
		config.configPath = javaSystemProperty("java.security.krb5.conf")
	}
}

func (config *kerberosConfig) applyKerberosConfigEnvironment() {
	if config.configPath == "" {
		config.configPath = os.Getenv("KRB5_CONFIG")
	}
}

func (config *kerberosConfig) applyJAASConfig(path string) error {
	contents, err := os.ReadFile(path)
	if err != nil {
		return fmt.Errorf("read Cassandra JAAS config %s: %w", path, err)
	}
	block := jaasBlockPattern.FindSubmatch(contents)
	if len(block) != 2 {
		return fmt.Errorf("Cassandra JAAS config %s does not contain CassandraJavaClient", path)
	}
	module := jaasModulePattern.FindSubmatch(block[1])
	if len(module) != 2 {
		return fmt.Errorf("CassandraJavaClient in %s does not configure Krb5LoginModule", path)
	}
	options := map[string]string{}
	for _, match := range jaasOptionPattern.FindAllSubmatch(module[1], -1) {
		value := firstNonEmpty(string(match[2]), string(match[3]), string(match[4]))
		options[strings.ToLower(string(match[1]))] = value
	}
	if config.principal == "" {
		config.principal = options["principal"]
	}
	if config.keytabPath == "" {

View on GitHub (pinned to c0390bff16)

Solutions

  1. Verify the JAAS config path exists and is readable by the agent process
  2. Fix permissions (chmod/chown) if access is denied
  3. If the path comes from java.security.auth.login.config, correct or unset that property
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at agents/drivers/cassandra-go/kerberos.go:460 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/55fe42e5a392be89. Report an issue: GitHub.