[MDEV-18118] MySQL users can break if using mysql_native_plugin in version 10.2 Created: 2019-01-02 Updated: 2019-01-23 Resolved: 2019-01-23 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System |
| Affects Version/s: | 10.1, 10.2, 10.3 |
| Fix Version/s: | 10.1.38, 10.2.22, 10.3.13 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Travis | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OS: CloudLinux release 7.6 (Vladimir Lyakhov) |
||
| Issue Links: |
|
||||||||
| Description |
MariaDB 10.2 introduced the 'SHOW CREATE USER' syntax: https://mariadb.com/kb/en/library/show-create-user/ This was added via The issue that this commit presents is that neither 'SHOW GRANTS FOR $user' or 'SHOW CREATE USER $user' will show a valid 'IDENTIFIED BY' line for a user if the 'plugin' column is set to 'mysql_native_password' AND the 'authentication_string' column is NULL. For example:
|
| Comments |
| Comment by Elena Stepanova [ 2019-01-03 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
What needs to be done to get this issue when upgrading from 10.1? | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Travis [ 2019-01-06 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
My apologies. On second look, this issue appears to present itself in 10.1 rather than 10.2 The issue is that SHOW GRANTS does not expose the password for the user in 10.1 under the conditions where the password field is set, auth_string field is empty, and plugin=mysql_native_password. The behavior change can be seen when upgrading from 10.0 to 10.1, and the issue can be replicated with the upgrade path of mysql 5.6 -> mariadb 10.0 -> mariadb 10.1. ----------- mysql 5.6
mariadb 10.0
mariadb 10.1
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2019-01-07 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Actually, the described problem upon upgrade from MySQL (5.6 at least, I didn't try 5.7+) exists in all 10.1+ versions, there is no argument about it, I was only wondering how you were getting it upon upgrade from 10.1, since you didn't mention MySQL at first. So, assuming that a user was created in MySQL 5.6 like this:
then direct live upgrade to 10.x causes the following results:
| |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Sergei Golubchik [ 2019-01-23 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Fixed by commit c2a4bfad2239 |