{"record":{"id":"c03af6e63f78c081","repo":"apache/cassandra","slug":"s-is-not-a-valid-clientauth-option","errorCode":null,"errorMessage":"%s is not a valid ClientAuth option","messagePattern":"(.+?) is not a valid ClientAuth option","errorType":"validation","errorClass":"org.apache.cassandra.exceptions.ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/config/EncryptionOptions.java","lineNumber":764,"sourceCode":"                for (ClientAuth clientAuth : ClientAuth.values())\n                {\n                    VALUES.put(clientAuth.value, clientAuth);\n                    VALUES.put(toLowerCaseLocalized(clientAuth.name()), clientAuth);\n                }\n            }\n\n            ClientAuth(String value)\n            {\n                this.value = value;\n            }\n\n            public static ClientAuth from(String value)\n            {\n                if (VALUES.containsKey(toLowerCaseLocalized(value)))\n                {\n                    return VALUES.get(toLowerCaseLocalized(value));\n                }\n                throw new ConfigurationException(value + \" is not a valid ClientAuth option\");\n            }\n\n            public String value()\n            {\n                return value;\n            }\n        }\n\n        public static class Builder extends EncryptionOptions.Builder<ClientEncryptionOptions>\n        {\n            public Builder()\n            {\n                this(new ClientEncryptionOptions());\n            }\n\n            public Builder(ClientEncryptionOptions options)\n            {\n                super(options);","sourceCodeStart":746,"sourceCodeEnd":782,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/config/EncryptionOptions.java#L746-L782","documentation":"EncryptionOptions.ClientAuth.from parses the client-auth mode (e.g. 'require', 'optional', 'want', 'disabled', case-insensitively). Unrecognized strings raise ConfigurationException. Note the code as shown throws '<value> is not a valid ClientAuth option'.","triggerScenarios":"cassandra.yaml with client_encryption_options.require_client_auth or related field set to an unrecognized string like 'true', 'yes', 'REQUIRED' (plural), or a misspelled mode.","commonSituations":"Migrating from boolean require_client_auth (true/false) to the ClientAuth enum without converting values; typos or wrong-cased expectations in YAML.","solutions":["Replace the value with a valid option: require, optional, want, or disabled (case-insensitive)","Convert legacy boolean values: true -> require, false -> optional (per your intended policy)","Consult the EncryptionOptions.ClientAuth enum in your Cassandra version for exact accepted values"],"exampleFix":"// before\nclient_encryption_options:\n  require_client_auth: yes\n// after\nclient_encryption_options:\n  require_client_auth: require","handlingStrategy":"validation","validationCode":"private static final Set<String> CLIENT_AUTH = Set.of(\"require\",\"optional\",\"want\",\"disabled\");\nstatic String normalizeClientAuth(String v) {\n    String lower = v == null ? null : v.toLowerCase(Locale.ROOT);\n    if (!CLIENT_AUTH.contains(lower)) throw new IllegalArgumentException(\"Invalid ClientAuth: \" + v);\n    return lower;\n}","typeGuard":null,"tryCatchPattern":"try {\n    EncryptionOptions.ClientAuth.from(cfgValue);\n} catch (ConfigurationException e) {\n    logger.error(\"Bad client auth setting: {}\", e.getMessage());\n}","preventionTips":["Migrate legacy boolean require_client_auth to enum values explicitly","Values are case-insensitive but must be exact words","Pin the accepted enum values per Cassandra version in config tooling"],"tags":["ssl","configuration","enum"],"backgroundTag":"invalid-enum-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"}