{"record":{"id":"cac5918d112a6f7a","repo":"apache/cassandra","slug":"unsupported-parameter-s-for-s-supported-param","errorCode":null,"errorMessage":"Unsupported parameter '%s' for %s, supported parameters are %s","messagePattern":"Unsupported parameter '(.+?)' for (.+?), supported parameters are (.+?)","errorType":"exception","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/auth/IDefaultRoleInitializer.java","lineNumber":93,"sourceCode":"\n    /**\n     * @return true if the cluster already has at least one role (or the configured default role specifically).\n     * Implemented once, sealed, by {@link AbstractDefaultRoleInitializer} — see that class for the logic.\n     */\n    boolean hasExistingRoles();\n\n    /**\n     * @param manager manager to check the support of\n     * @return true if this role initializer conceptually works together with specified role manager, false otherwise\n     */\n    boolean supportsRoleManager(IRoleManager manager);\n\n    static void validateSupportedParams(Map<String, String> parameters, Set<String> supportedParams, Class<?> implClass)\n    {\n        for (String param : parameters.keySet())\n        {\n            if (!supportedParams.contains(param))\n                throw new ConfigurationException(String.format(\"Unsupported parameter '%s' for %s, supported parameters are %s\",\n                                                               param, implClass.getSimpleName(), supportedParams));\n        }\n    }\n}\n","sourceCodeStart":75,"sourceCodeEnd":98,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/auth/IDefaultRoleInitializer.java#L75-L98","documentation":"IDefaultRoleInitializer.validateSupportedParams checks that every parameter given to a role-manager/authorizer implementation is one it declares as supported. An unknown key in the options map raises ConfigurationException naming the bad parameter, the class, and the supported set.","triggerScenarios":"Configuring a role manager (e.g. in cassandra.yaml: role_manager with options) or CassandraRoleManager/defaults with a typo'd or renamed option key, e.g. passing 'replication_factor' style legacy keys to an implementation that no longer accepts them.","commonSituations":"Upgrading Cassandra where an option was renamed or removed; copying configuration between CassandraAuthorizer and CassandraRoleManager whose supported option sets differ; typos in cassandra.yaml options blocks.","solutions":["Compare the reported parameter name against the supported set printed in the message and fix or remove it from the configuration","Check the class's supportedParams set for the exact spelling after a version upgrade","Remove stale options left over from a previous auth implementation"],"exampleFix":"// before\nrole_manager:\n  class_name: CassandraRoleManager\n  options:\n    rolenames_limit: 10\n// after\nrole_manager:\n  class_name: CassandraRoleManager\n  options:\n    consistency_level: QUORUM","handlingStrategy":"validation","validationCode":"Set<String> supported = Set.of(\"consistency_level\", \"roles_cache_max_entries\");\nparameters.keySet().stream().filter(k -> !supported.contains(k))\n    .forEach(k -> System.err.println(\"Unknown role-manager option: \" + k));","typeGuard":null,"tryCatchPattern":"try { configureRoleManager(params); } catch (ConfigurationException e) { log.error(\"fix cassandra.yaml role_manager options: {}\", e.getMessage()); }","preventionTips":["Copy option keys only from the target class's documented supportedParams set","Re-validate auth config after Cassandra upgrades (options get renamed/removed)","Don't share an options block between authorizer and role manager configs"],"tags":["cassandra","configuration","auth","role-manager"],"backgroundTag":"unsupported-config-value","analyzedSha":"88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1","analyzedAt":"2026-09-10T07:29:22.284Z","contentChangedAt":"2026-09-10T07:29:22.284Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}