{"record":{"id":"ed445788cd4a89e7","repo":"apache/cassandra","slug":"s-can-not-be-equal-to-s-you-set-s-and-s-respe","errorCode":null,"errorMessage":"%s can not be equal to %s. You set %s and %s respectively.","messagePattern":"(.+?) can not be equal to (.+?)\\. You set (.+?) and (.+?) respectively\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java","lineNumber":229,"sourceCode":"                                         LOWER_CASE_FAIL_KEY,\n                                         lowerCaseFail);\n\n        if (illegalSequenceLength < IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH)\n            throw new ConfigurationException(format(\"Illegal sequence length can not be lower than %s.\",\n                                                    IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH));\n\n        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++)","sourceCodeStart":211,"sourceCodeEnd":247,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java#L211-L247","documentation":"Thrown as a ConfigurationException when characteristicsFail equals characteristicsWarn in the password guardrail config. The fail threshold must be distinct from (specifically lower than) the warn threshold; an equal value is ambiguous, so validateParameters rejects it with a message echoing both configured values.","triggerScenarios":"Setting characteristics_fail and characteristics_warn to the same number in cassandra.yaml password guardrails.","commonSituations":"Copy-pasting one threshold to both keys; trying to 'skip' warning and go straight to failure by equating thresholds; templated configs substituting the same value into both fields.","solutions":["Set characteristics_fail to a value strictly less than characteristics_warn (fail triggers before warn by design here)","Remove one of the settings and use defaults","Decide the intended warn/fail policy first, then configure ordered distinct thresholds"],"exampleFix":"// before\npassword_guardrails:\n  characteristics_warn: 3\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 equal to characteristics_warn\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Configure warn and fail as an ordered pair with fail < warn","Add a config-lint rule rejecting equal warn/fail thresholds","Test the guardrail policy with sample passwords after every change"],"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"}