{"record":{"id":"0b6dca4ccdd7253d","repo":"apache/cassandra","slug":"illegal-sequence-length-can-not-be-lower-than-s","errorCode":null,"errorMessage":"Illegal sequence length can not be lower than %s.","messagePattern":"Illegal sequence length can not be lower than (.+?)\\.","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java","lineNumber":215,"sourceCode":"            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,\n                                         upperCaseWarn,\n                                         UPPER_CASE_FAIL_KEY,\n                                         upperCaseFail);\n\n        if (lowerCaseWarn <= lowerCaseFail)\n            throw getValidationException(LOWER_CASE_WARN_KEY,\n                                         lowerCaseWarn,\n                                         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));","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/apache/cassandra/blob/88fd0f6a0eaed8943f05ac9e8f947882b8ddc8f1/src/java/org/apache/cassandra/db/guardrails/CassandraPasswordConfiguration.java#L197-L233","documentation":"Thrown as a ConfigurationException when the illegal_sequence_length password-guardrail parameter is set below IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH. The check rejects configurations that would make sequence detection meaningless; the message states the minimum allowed value.","triggerScenarios":"Setting illegal_sequence_length in cassandra.yaml password guardrails to a value smaller than the library's minimum (e.g. 1 or 2), causing validateParameters to fail at startup/construction.","commonSituations":"Admins trying to detect 2-character sequences; misunderstanding the parameter as 'max sequence allowed' rather than the detection window length; copying a config tuned from another deployment.","solutions":["Raise illegal_sequence_length in cassandra.yaml to at least IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH","Remove the setting to use the default sequence length","Consult the guardrail documentation for the exact minimum before tuning"],"exampleFix":"// before\npassword_guardrails:\n  illegal_sequence_length: 2\n// after\npassword_guardrails:\n  illegal_sequence_length: 3","handlingStrategy":"validation","validationCode":"if (illegalSequenceLength < IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH)\n    throw new ConfigurationException(\"Illegal sequence length can not be lower than \" + IllegalSequenceRule.MINIMUM_SEQUENCE_LENGTH);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Read the minimum documented value before tuning illegal_sequence_length","Include guardrail validation in config CI checks","Avoid using minimal (1-2) sequence lengths; they are rejected by design"],"tags":["configuration","guardrails","password"],"backgroundTag":"invalid-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"}