Password policies: option to disallow consecutive repeated characters
- Dominant language
- Go
- Stars
- 36.3k
- Forks
- 4.8k
- PR merge metrics
- PR metrics pending
Description
**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:
```hcl
length = 20
consecutive-chars-allowed = false
rule "charset" {
charset = "abcdefghijklmnopqrstuvwxyz"
min-chars = 1
}
Contributor guide
Research direction
Start by locating the password-policy HCL parser and the password-generation path, then trace how top-level options reach rule evaluation. Add coverage showing adjacent repeated characters are rejected when the option is false, while preserving existing behavior when the option is omitted or enabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- security
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100