hashicorp / hashicorp/vault

Password policies: option to disallow consecutive repeated characters

Open
#32,110 0 comments 2 reactions 0 assignees View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.