Update the password minimum length to 8 (#5516)
Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
@@ -96,7 +96,7 @@ spec:
|
||||
... Last but not least, the bcrypt string is also included
|
||||
to match the encrypted password. ^(\$2[ayb]\$.{56})$'
|
||||
maxLength: 64
|
||||
minLength: 6
|
||||
minLength: 8
|
||||
pattern: ^(.*[a-z].*[A-Z].*[0-9].*)$|^(.*[a-z].*[0-9].*[A-Z].*)$|^(.*[A-Z].*[a-z].*[0-9].*)$|^(.*[A-Z].*[0-9].*[a-z].*)$|^(.*[0-9].*[a-z].*[A-Z].*)$|^(.*[0-9].*[A-Z].*[a-z].*)$|^(\$2[ayb]\$.{56})$
|
||||
type: string
|
||||
required:
|
||||
|
||||
@@ -78,7 +78,7 @@ spec:
|
||||
... Last but not least, the bcrypt string is also included to match
|
||||
the encrypted password. ^(\$2[ayb]\$.{56})$'
|
||||
maxLength: 64
|
||||
minLength: 6
|
||||
minLength: 8
|
||||
pattern: ^(.*[a-z].*[A-Z].*[0-9].*)$|^(.*[a-z].*[0-9].*[A-Z].*)$|^(.*[A-Z].*[a-z].*[0-9].*)$|^(.*[A-Z].*[0-9].*[a-z].*)$|^(.*[0-9].*[a-z].*[A-Z].*)$|^(.*[0-9].*[A-Z].*[a-z].*)$|^(\$2[ayb]\$.{56})$
|
||||
type: string
|
||||
required:
|
||||
|
||||
@@ -127,7 +127,7 @@ type UserSpec struct {
|
||||
Groups []string `json:"groups,omitempty"`
|
||||
|
||||
// password will be encrypted by mutating admission webhook
|
||||
// +kubebuilder:validation:MinLength=6
|
||||
// +kubebuilder:validation:MinLength=8
|
||||
// +kubebuilder:validation:MaxLength=64
|
||||
// +kubebuilder:validation:Pattern=`^(.*[a-z].*[A-Z].*[0-9].*)$|^(.*[a-z].*[0-9].*[A-Z].*)$|^(.*[A-Z].*[a-z].*[0-9].*)$|^(.*[A-Z].*[0-9].*[a-z].*)$|^(.*[0-9].*[a-z].*[A-Z].*)$|^(.*[0-9].*[A-Z].*[a-z].*)$|^(\$2[ayb]\$.{56})$`
|
||||
// Password pattern is tricky here.
|
||||
|
||||
Reference in New Issue
Block a user