Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-1710

Authentication can fail if users are loaded at the same time

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.13
    • Fix Version/s: 2.2.2
    • Component/s: Authenticator
    • Labels:
      None

      Description

      Summary

      When users are being loaded at the same time that another thread is trying to authenticate a user, it is possible that authentication fails due to the update to the users database.

      Steps to reproduce

      With the attached configuration, run the following command on one terminal.

      while [ $? -eq 0 ]; do mysql -umaxuser -pmaxpwd -h 127.0.0.1 -P 4006 -e "show databases" > /dev/null; done
      

      At the same time, start the following on a different terminal.

      while true; do bin/maxadmin list services|grep '[0-1]'|sed -s 's/ *|.*//'|while read line; do bin/maxadmin reload dbusers "$line";done;done
      

      This will cause the following message to be logged in the first terminal.

      ERROR 1045 (28000): Access denied for user 'maxuser'@'::ffff:127.0.0.1' (using password: YES)
      

      This was only reproducible on 2.1 as the authentication was made thread specific in 2.2.

        Attachments

          Activity

            People

            • Assignee:
              markus makela markus makela
              Reporter:
              markus makela markus makela
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: