{"record":{"id":"5e72aba6811ed9cf","repo":"apache/cassandra","slug":"s-requires-a-non-empty-s-parameter","errorCode":null,"errorMessage":"%s requires a non-empty '%s' parameter","messagePattern":"(.+?) requires a non-empty '(.+?)' parameter","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/auth/MutualTlsDefaultRoleInitializer.java","lineNumber":103,"sourceCode":"                                     escapeCqlLiteral(role)),\n                       String.format(\"INSERT INTO %s.%s (role, is_superuser, can_login) \" +\n                                     \"VALUES ('%s', true, true) USING TIMESTAMP 0\",\n                                     SchemaConstants.AUTH_KEYSPACE_NAME,\n                                     AuthKeyspace.ROLES,\n                                     escapeCqlLiteral(role)));\n    }\n\n    @Override\n    public String defaultRoleName()\n    {\n        return role;\n    }\n\n    @Override\n    public void validateConfiguration() throws ConfigurationException\n    {\n        if (Strings.isNullOrEmpty(role))\n            throw new ConfigurationException(String.format(\"%s requires a non-empty '%s' parameter\",\n                                                           getClass().getSimpleName(), ROLE));\n\n        if (Strings.isNullOrEmpty(identity))\n            throw new ConfigurationException(String.format(\"%s requires a non-empty '%s' parameter\",\n                                                           getClass().getSimpleName(), IDENTITY));\n\n        // The role this creates has no password, so an authenticator which cannot authenticate by certificate\n        // would leave a freshly bootstrapped cluster with no way to log in at all.\n        IAuthenticator authenticator = DatabaseDescriptor.getAuthenticator();\n        Set<IAuthenticator.AuthenticationMode> modes = authenticator.getSupportedAuthenticationModes();\n        if (authenticator.requireAuthentication() && !modes.isEmpty() && !modes.contains(IAuthenticator.AuthenticationMode.MTLS))\n        {\n            throw new ConfigurationException(String.format(\"%s creates a role with no password, which %s cannot \" +\n                                                           \"authenticate (supported modes: %s). Configure an \" +\n                                                           \"authenticator supporting mutual TLS, such as %s.\",\n                                                           getClass().getSimpleName(),\n                                                           authenticator.getClass().getSimpleName(),\n                                                           modes,","sourceCodeStart":85,"sourceCodeEnd":121,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/auth/MutualTlsDefaultRoleInitializer.java#L85-L121","documentation":"ConfigurationException from MutualTlsDefaultRoleInitializer.validateConfiguration: a required parameter (role or identity, named in the message) is null or empty in the cassandra.yaml section for the role initializer. It is a startup-time guard that names the class and the missing parameter name.","triggerScenarios":"Thrown at src/java/org/apache/cassandra/auth/MutualTlsDefaultRoleInitializer.java:103 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the missing parameter (role or identity) to a non-empty value in the role initializer configuration","Ensure the yaml indentation and parameter names match the class's expected options","Rerun with validated config; startup will fail fast until both role and identity are provided"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}