[MDEV-16364] Allow use of wildcard in hostname of grant on specific table Created: 2018-05-31  Updated: 2018-05-31

Status: Open
Project: MariaDB Server
Component/s: Authentication and Privilege System
Fix Version/s: None

Type: Task Priority: Major
Reporter: Josiah Ritchie Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: authentication, privileges


 Description   

I have a multi-tenant application that has one database for each tenant. These thousands of databases are distributed across multiple servers. I have a user who I want to apply table level SELECT,INSERT,UPDATE,DELETE on 6 tables in every database. We frequently add databases and move them between servers for maintenance tasks so maintaining these permissions for each database on each server becomes a significant maintenance task.

I tried these, among others, and received the corresponding errors:

[mysql] GRANT SELECT,INSERT,UPDATE,DELETE ON `%`.table TO 'user'@'host';
ERROR 1146 (42S02): Table '%.table' doesn't exist
[mysql] GRANT SELECT,INSERT,UPDATE,DELETE ON *.table TO 'user'@'host';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'table TO 'user'@'host'' at line 1

I also asked around the community and searched for existing bugs and feature requests in both mysql and mariadb bug tools and couldn't find a solution or bug report. I've been told that this would require scripting out the maintenance of the account as it is not supported.

I was going to mark this Priority:Minor, but ended up with Major because there isn't an easy work around that I have been able to figure out for my use case. If that isn't appropriate please correct.


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