-
Notifications
You must be signed in to change notification settings - Fork 781
More restrictive grants #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think it was MySQL 5.1 that had the most issue with |
Add a test of the GRANT statement to the exporter integration test. Fixes: #622 Signed-off-by: SuperQ <[email protected]>
Add a test of the GRANT statement to the exporter integration test. Fixes: #622 Signed-off-by: SuperQ <[email protected]>
Add a test of the GRANT statement to the exporter integration test. Fixes: #622 Signed-off-by: SuperQ <[email protected]>
On MariaDB 10.6.7 the
and by using:
|
Reading the documentation I doubt that
This is just a documentation issue and should be fixed easily (and – in my opinion as first-time-user – quickly) |
On MariaDB 10.11, GRANT PROCESS, SLAVE MONITOR ON *.* TO 'exporter'@'localhost';
GRANT SELECT ON performance_schema.* TO 'exporter'@'localhost'; I checked that the output lines don't differ from admin users and there are no errors in the exporter log. |
Getting the following error on MySQL 8.0.39 Community Server: mysql> GRANT SELECT ON information_schema.* TO 'exporter'@'localhost';
ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'information_schema' The docs mentions the following:
|
Uh oh!
There was an error while loading. Please reload this page.
In the README.md file the following is mentioned as Required Grants
However this allows the user exporter to access sensitive information, too.
I think it would be more secure to reduce the SELECT to the minimum.
We succeeded to get the mysqld_exporter running with the following settings
As mentioned in #242 the minimal required grants might depend on the version of the database and the mysqld_exporter used, but maybe one could provide such minimal secure configurations for the most common versions.
E.g. by adding a section like the following to README.md or placing it on a sub page
With MySQL 8.0.x and mysqld_exporter version 0.13.0 on CentOS 7 the following minimal grants work too:
It was actually quite ease to find the minimal set of grants. All one has to do is check the logs of mysqld_exporter. When it could not read some information the log output indicated which table was the problem and from there one could deduct which schema one had to allow a SELECT for.
I think using such a restrictive set of grants would be beneficial for security, since it guarantees that the mysqld_exporter has no access to data in the tables.
The text was updated successfully, but these errors were encountered: