Password policies: option to disallow consecutive repeated characters
Author: drewmullenCreated Sep 10, 2026Updated Sep 10, 2026
Is your feature request related to a problem? Please describe.
Password policies can constrain length and require a minimum number of characters from given charsets, but they cannot prevent the same character from appearing twice in a row. Some downstream systems and organizational password standards reject passwords with repeated adjacent characters (for example, aa or 11). Today there is no way to express that constraint in a Vault password policy, so passwords generated by Vault can be rejected by the target system, and the failure only shows up at credential rotation time.
Describe the solution you'd like A new optional top-level attribute in the password policy HCL:
length = 20
consecutive-chars-allowed = false
rule "charset" {
charset = "abcdefghijklmnopqrstuvwxyz"
min-chars = 1
}Source: hashicorp/vault