[MXS-1710] Authentication can fail if users are loaded at the same time Created: 2018-03-07  Updated: 2018-03-13  Resolved: 2018-03-13

Status: Closed
Project: MariaDB MaxScale
Component/s: Authenticator
Affects Version/s: 2.1.13
Fix Version/s: 2.2.2

Type: Bug Priority: Major
Reporter: markus makela Assignee: markus makela
Resolution: Fixed Votes: 0
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.



 Comments   
Comment by markus makela [ 2018-03-13 ]

Fixed in 2.2.

Generated at Thu Feb 08 04:08:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.