Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-26647

Include password validation plugin information in the error message if the SQL statement is not satisfied password policy

Details

    Description

      Currently simple_password_check and password_reuse_check shows same error message if the query does not satisfy the plugin policy. I think we should separate the error message on the basis of failure.

      simple_password_check password validation

      10.7.0-opt>SET PASSWORD FOR user_name@localhost = PASSWORD('test@123');
      ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
      10.7.0-opt>
      10.7.0-opt>UNINSTALL SONAME 'simple_password_check';
      Query OK, 0 rows affected (0.005 sec)
      

      password_reuse_check password validation

      10.7.0-opt>SET PASSWORD FOR user_name@localhost = PASSWORD('test@123');
      Query OK, 0 rows affected (0.011 sec)
       
      10.7.0-opt>SET PASSWORD FOR user_name@localhost = PASSWORD('test@123');
      ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
      10.7.0-opt>
      

      Similarly ALTER USER also shows different error message.

      10.7.0-opt>alter user user_name@localhost identified by 'test_pwd2';
      ERROR 1396 (HY000): Operation ALTER USER failed for 'user_name'@'localhost'
      10.7.0-opt>
      10.7.0-opt>show warnings;
      +-------+------+----------------------------------------------------------------+
      | Level | Code | Message                                                        |
      +-------+------+----------------------------------------------------------------+
      | Error | 1819 | Your password does not satisfy the current policy requirements |
      | Error | 1396 | Operation ALTER USER failed for 'user_name'@'localhost'        |
      +-------+------+----------------------------------------------------------------+
      2 rows in set (0.000 sec)
       
      10.7.0-opt>
      

      Attachments

        Issue Links

          Activity

            It is related to all plugins (there is no info even about which plugin generated the error)

            sanja Oleksandr Byelkin added a comment - It is related to all plugins (there is no info even about which plugin generated the error)
            sanja Oleksandr Byelkin added a comment - - edited

            branch bb-10.2-MDEV-26647

            commit f355f8e4163200ca27a6082438aa129cd435a7cd (HEAD -> bb-10.2-MDEV-26647, origin/bb-10.2-MDEV-26647)
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date:   Wed Oct 20 11:37:14 2021 +0200
             
                MDEV-26647 (simple_password_check) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy
                
                Make the plugin reporting cause of the error.
             
            commit f426b7c6e19c5f6209ea1feca2ffba566b107705
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date:   Wed Oct 20 10:21:00 2021 +0200
             
                MDEV-26647 (plugin name) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy
                
                Add plugin name to the error message.
            

            and 10.7:

            commit 45a376dd2d505af343cfff68e4343c7650f2565c (HEAD -> preview-10.7-MDEV-9245-password-reuse)
            Author: Oleksandr Byelkin <sanja@mariadb.com>
            Date:   Wed Oct 20 12:02:52 2021 +0200
             
                MDEV-26647 (reuse info) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy
                
                send information about password reusing
            

            sanja Oleksandr Byelkin added a comment - - edited branch bb-10.2- MDEV-26647 commit f355f8e4163200ca27a6082438aa129cd435a7cd (HEAD -> bb-10.2-MDEV-26647, origin/bb-10.2-MDEV-26647) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Wed Oct 20 11:37:14 2021 +0200   MDEV-26647 (simple_password_check) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy Make the plugin reporting cause of the error.   commit f426b7c6e19c5f6209ea1feca2ffba566b107705 Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Wed Oct 20 10:21:00 2021 +0200   MDEV-26647 (plugin name) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy Add plugin name to the error message. and 10.7: commit 45a376dd2d505af343cfff68e4343c7650f2565c (HEAD -> preview-10.7-MDEV-9245-password-reuse) Author: Oleksandr Byelkin <sanja@mariadb.com> Date: Wed Oct 20 12:02:52 2021 +0200   MDEV-26647 (reuse info) Include password validation plugin information in the error message if the SQL statement is not satisfied password policy send information about password reusing

            ok to push

            serg Sergei Golubchik added a comment - ok to push
            danblack Daniel Black added a comment -

            10.2 changes appears unmerged.

            10.7 appears to be merged.

            danblack Daniel Black added a comment - 10.2 changes appears unmerged. 10.7 appears to be merged.

            People

              sanja Oleksandr Byelkin
              ramesh Ramesh Sivaraman
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.