Update the password minimum length to 8 (#5516)

Signed-off-by: wenhaozhou <wenhaozhou@yunify.com>
This commit is contained in:
Wenhao Zhou
2023-02-10 20:45:18 +08:00
committed by GitHub
parent decde97a91
commit d3b35fb2da
3 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

@@ -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:

View File

@@ -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.