Bug #89608 MySQL Workbench password requirements messages to match server configuration
Submitted: 9 Feb 2018 14:31 Modified: 13 Feb 2018 6:43
Reporter: Georgi Sotirov Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Administration Severity:S4 (Feature request)
Version:6.3.10 OS:Any
Assigned to: CPU Architecture:Any

[9 Feb 2018 14:31] Georgi Sotirov
Description:
Currently, the password requirements (or recommendations) message in MySQL Workbench doesn't match server configuration. It's always "Consider using a password with 8 or more characters with mixed case letters, numbers and punctuation marks.". However, it appears confusing when the server is either not using password validation plugin at all or is using different configuration (e.g. 2 numbers and no punctuation marks).

How to repeat:
Open Workbench, select Management in the Navigator and click on Users and Privileges.

Suggested fix:
MySQL Workbench could read Password Validation Plugin Options and Variables (see https://dev.mysql.com/doc/refman/5.7/en/validate-password-options-variables.html ) from server and display customized message based on password validation plugin's configuration. Something like:

msg = 'The password must:\n';
msg = CONCAT(msg, ' - be at least ', validate_password_length, ' characters long;\n');

IF validate_password_mixed_case_count > 0 THEN
  msg = CONCAT(msg, ' - have at least ', validate_password_mixed_case_count, 'mixed case letter(s);\n');
END IF;

IF validate_password_number_count > 0 THEN
  msg = CONCAT(msg, ' - have at least ', validate_password_number_count, ' number(s);\n');
END IF;

IF validate_password_special_char_count > 0 THEN
  msg = CONCAT(msg, ' - have at least ', validate_password_special_char_count, 'and punctuation mark(s);\n');
END IF;

IF validate_password_dictionary_file != '' THEN
  msg = CONCAT(msg, ' - not be a dictionary word;\n');
END IF;

IF validate_password_check_user_name THEN
  msg = CONCAT(msg, ' - not match user name;\n');
END IF;
[13 Feb 2018 6:43] MySQL Verification Team
Thank you for the feature request and feedback!