{"record":{"id":"49ff7f163d1e99c8","repo":"apache/cassandra","slug":"s-of-value-s-is-less-or-equal-to-s-of-value-s","errorCode":null,"errorMessage":"%s of value %s is less or equal to %s of value %s","messagePattern":"(.+?) of value (.+?) is less or equal to (.+?) of value (.+?)","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java","lineNumber":185,"sourceCode":"        if (characteristicsFail < 0) throw mustBePositiveException(CHARACTERISTIC_FAIL_KEY);\n        if (lowerCaseWarn < 0) throw mustBePositiveException(LOWER_CASE_WARN_KEY);\n        if (lowerCaseFail < 0) throw mustBePositiveException(LOWER_CASE_FAIL_KEY);\n        if (upperCaseWarn < 0) throw mustBePositiveException(UPPER_CASE_WARN_KEY);\n        if (upperCaseFail < 0) throw mustBePositiveException(UPPER_CASE_FAIL_KEY);\n        if (specialsWarn < 0) throw mustBePositiveException(SPECIAL_WARN_KEY);\n        if (specialsFail < 0) throw mustBePositiveException(SPECIAL_FAIL_KEY);\n        if (digitsWarn < 0) throw mustBePositiveException(DIGIT_WARN_KEY);\n        if (digitsFail < 0) throw mustBePositiveException(DIGIT_FAIL_KEY);\n        if (lengthWarn < 0) throw mustBePositiveException(LENGTH_WARN_KEY);\n        if (lengthFail < 0) throw mustBePositiveException(LENGTH_FAIL_KEY);\n\n        if (MAX_LENGTH < maxLength)\n            throw new ConfigurationException(format(\"%s can not be greater than %s\",\n                                                    MAX_LENGTH_KEY,\n                                                    MAX_LENGTH));\n\n        if (maxLength <= lengthWarn)\n            throw getValidationException(MAX_LENGTH_KEY, maxLength, LENGTH_WARN_KEY, lengthWarn);\n\n        if (lengthWarn <= lengthFail)\n            throw getValidationException(LENGTH_WARN_KEY, lengthWarn, LENGTH_FAIL_KEY, lengthFail);\n\n        if (specialsWarn <= specialsFail)\n            throw getValidationException(SPECIAL_WARN_KEY,\n                                         specialsWarn,\n                                         SPECIAL_FAIL_KEY,\n                                         specialsFail);\n\n        if (digitsWarn <= digitsFail)\n            throw getValidationException(DIGIT_WARN_KEY,\n                                         digitsWarn,\n                                         DIGIT_FAIL_KEY,\n                                         digitsFail);\n\n        if (upperCaseWarn <= upperCaseFail)\n            throw getValidationException(UPPER_CASE_WARN_KEY,","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java#L167-L203","documentation":"The password-length guardrail enforces strict ordering: max_length must be strictly greater than length_warn, otherwise warn would fire at or beyond the hard cap. validateParameters throws this ConfigurationException when maxLength <= lengthWarn.","triggerScenarios":"Configuring max_length <= length_warn, e.g. max_length=10 with length_warn=10 or 12, in cassandra.yaml or CustomGuardrailConfig.","commonSituations":"Raising length_warn without raising max_length, lowering max_length below an existing warn threshold, or mixing defaults (max_length=1000) with a custom warn above it.","solutions":["Raise max_length so it is strictly greater than length_warn (and <= CassandraPasswordConfiguration.MAX_LENGTH = 1000).","Lower length_warn so it is strictly below max_length.","Reset both to defaults (max_length=1000, length_warn=12) if unsure."],"exampleFix":"// before\npassword_strength:\n  max_length: 12\n  length_warn: 12\n// after\npassword_strength:\n  max_length: 64\n  length_warn: 12","handlingStrategy":"validation","validationCode":"int maxLength = resolveInt(config, \"max_length\", 1000);\nint lengthWarn = resolveInt(config, \"length_warn\", 12);\nif (maxLength <= lengthWarn)\n    throw new IllegalArgumentException(\"max_length must be strictly greater than length_warn\");","typeGuard":null,"tryCatchPattern":"try {\n    new CassandraPasswordConfiguration(cfg);\n} catch (ConfigurationException e) {\n    logger.error(\"Invalid password guardrail config: {}\", e.getMessage());\n}","preventionTips":["When changing length_warn, always check it stays below max_length (<= 1000).","Apply ordering invariants in config tooling: length_fail < length_warn < max_length.","Revert to defaults if ordering is unclear."],"tags":["cassandra","guardrails","configuration","validation","ordering"],"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-17T15:17:12.973Z"}