[MDEV-21194] mysql_install_db doesn't properly grant proxy privileges to all default root user accounts Created: 2019-12-02 Updated: 2023-09-19 Resolved: 2023-09-18 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Scripts & Clients |
| Affects Version/s: | 10.2.29, 10.1.43, 10.3.20, 10.4.10 |
| Fix Version/s: | 10.4.32, 10.5.23, 10.6.16, 10.10.7, 10.11.6, 11.0.4, 11.1.3 |
| Type: | Bug | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Daniel Black |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
mysql_install_db is supposed to grant proxy privileges to the default root user accounts. However, it currently only does that for a subset of the default root user accounts. The specific user accounts depends on the specific version of MariaDB. Here is the relevant code in all versions: 10.1 - https://github.com/MariaDB/server/blob/mariadb-10.1.43/scripts/mysql_system_tables_data.sql#L60 In 10.1, 10.2, and 10.3, it grants the proxy privilege to the following user accounts:
In 10.1, 10.2, and 10.3, this means that the following user accounts are missing the grant:
In 10.4, it grants the proxy privilege to the following user accounts:
In 10.4, this means that the following user accounts are missing the grant:
|
| Comments |
| Comment by Oleksandr Byelkin [ 2022-06-27 ] | ||||||||
|
I see following in my db created by bootstrap:
where sanjaslaptop my loptop. it looks like what was done by the code:
if above is wrong can you explain why? | ||||||||
| Comment by Geoff Montee (Inactive) [ 2022-06-27 ] | ||||||||
|
Hi sanja, In your output, you can see that mysql.proxies_priv has entries for root@localhost and root@sanjaslaptop, but not root@'127.0.0.1' or root@'::1'. | ||||||||
| Comment by Daniel Black [ 2023-07-10 ] | ||||||||
|
It was also discovered that with the default --auth-root-authentication-method=socket as non-root user, this non-root user wasn't granted proxies privs. Fix to both available on: https://github.com/MariaDB/server/pull/2690 | ||||||||
| Comment by Oleksandr Byelkin [ 2023-09-18 ] | ||||||||
|
"FROM DUAL" is not our style but I can live with this, otherwise it looks good to be pushed. |