{"record":{"id":"b496258ab68fd9ff","repo":"apache/cassandra","slug":"s-can-not-be-bigger-than-s-you-have-set-s-and","errorCode":null,"errorMessage":"%s can not be bigger than %s. You have set %s and %s respectively.","messagePattern":"(.+?) can not be bigger than (.+?)\\. You have set (.+?) and (.+?) respectively\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java","lineNumber":236,"sourceCode":"        if (characteristicsWarn > 4)\n            throw new ConfigurationException(format(\"%s can not be bigger than %s\",\n                                                    CHARACTERISTIC_WARN_KEY,\n                                                    MAX_CHARACTERISTICS));\n\n        if (characteristicsFail > 4)\n            throw new ConfigurationException(format(\"%s can not be bigger than %s\",\n                                                    CHARACTERISTIC_FAIL_KEY,\n                                                    MAX_CHARACTERISTICS));\n\n        if (characteristicsFail == characteristicsWarn)\n            throw new ConfigurationException(format(\"%s can not be equal to %s. You set %s and %s respectively.\",\n                                                    CHARACTERISTIC_FAIL_KEY,\n                                                    CHARACTERISTIC_WARN_KEY,\n                                                    characteristicsFail,\n                                                    characteristicsWarn));\n\n        if (characteristicsFail > characteristicsWarn)\n            throw new ConfigurationException(format(\"%s can not be bigger than %s. You have set %s and %s respectively.\",\n                                                    CHARACTERISTIC_FAIL_KEY,\n                                                    CHARACTERISTIC_WARN_KEY,\n                                                    characteristicsFail,\n                                                    characteristicsWarn));\n\n        int[] minimumLengthsWarn = new int[]{ specialsWarn, digitsWarn,\n                                              upperCaseWarn, lowerCaseWarn };\n        Arrays.sort(minimumLengthsWarn);\n\n        int minimumLenghtOfWarnCharacteristics = 0;\n        for (int i = 0; i < characteristicsWarn; i++)\n            minimumLenghtOfWarnCharacteristics += minimumLengthsWarn[i];\n\n        if (minimumLenghtOfWarnCharacteristics > lengthWarn)\n            throw new ConfigurationException(format(\"The shortest password to pass the warning validator for any %s \" +\n                                                    \"characteristics out of %s is %s but you have set the %s to %s.\",\n                                                    characteristicsWarn,\n                                                    MAX_CHARACTERISTICS,","sourceCodeStart":218,"sourceCodeEnd":254,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java#L218-L254","documentation":"Thrown as a ConfigurationException when characteristicsFail is greater than characteristicsWarn in the password guardrail config. The design expects the failure threshold to be reached before the warning threshold, so fail > warn is invalid; the error includes both configured values ('%s can not be bigger than %s. You have set %s and %s respectively.').","triggerScenarios":"Setting characteristics_fail higher than characteristics_warn in cassandra.yaml, e.g. warn: 2, fail: 3.","commonSituations":"Assuming warn triggers before fail (the inverse ordering) as in other systems; swapping the two values by mistake; misunderstanding the direction of the thresholds in Cassandra's guardrails.","solutions":["Swap the values so characteristics_fail < characteristics_warn","Lower characteristics_fail or raise characteristics_warn until fail <= warn (and fail != warn)","Consult the Cassandra password guardrail docs on threshold ordering"],"exampleFix":"// before\npassword_guardrails:\n  characteristics_warn: 2\n  characteristics_fail: 3\n// after\npassword_guardrails:\n  characteristics_warn: 3\n  characteristics_fail: 2","handlingStrategy":"validation","validationCode":"if (characteristicsFail > characteristicsWarn)\n    throw new ConfigurationException(\"characteristics_fail can not be bigger than characteristics_warn. Set \" + characteristicsFail + \" and \" + characteristicsWarn + \" respectively.\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check threshold direction against Cassandra docs before copying configs from other tools","Validate fail < warn in deployment scripts","Swap-suspicious configs: if the numbers look reversed, reverse them"],"tags":["configuration","guardrails","validation"],"backgroundTag":"conflicting-config-options","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"}