aws-quickstart/quickstart-apache-superset

SuperSetUserPassword pattern doesn't match description

asafh-lb opened this issue · 7 comments

Valid passwords according to the description get rejected by the pattern.

Hi, will you please provide your input password? The regex to validate password pattern is like ^(?=.[a-z])(?=.[A-Z])(?=.[@$!%?&\-])[A-Za-z\d@$!%*?&\-]{8,}$

Thanks for your suggestion, we may consider to rules below:

  • password must contain 1 number (0-9)
  • password must contain 1 uppercase letters
  • password must contain 1 lowercase letters
  • password must contain 1 non-alpha numeric number
  • password is 8-16 characters with no space

and regex is like ^(?=.\d)(?=.[A-Z])(?=.[a-z])(?=.[^\w\d\s:])([^\s]){8,16}$

new password regex update in official solution, kindly let me know your further feedback

The markdown formatting altered your regex. What I assume was there:
^(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[^\w\d\s:])([^\s]){8,16}$

Looks pretty good with two caveats. For negated character set representing special characters, both underscore and colon are not considered (colon explicitly there, underscore due to \w). They would however be accepted in the general password.
I'm not sure what is the reasoning but if there's none I'd suggest to consider them as special characters and otherwise to state so in the rules' description.

Thank you for help.

underscore and colon are removed from non-alpha numeric number list with regex ?=.[^\w\d\s:], so password 'Aa12345@', 'Aa12345' are accepted, while 'Aa12345_' and 'Aa12345:' not

Right, what I meant to say that if those are not considered special characters by design I would note that in the description. "1 non-alpha numeric number excluding colon and underscore"