it-novum / openITCOCKPIT

openITCOCKPIT is an Open Source system monitoring tool built for different monitoring engines like Nagios, Naemon and Prometheus.
https://openitcockpit.io/
GNU General Public License v3.0
273 stars 50 forks source link

mysql_native_password authentication plugin - RHEL #1718

Open kbilev opened 2 months ago

kbilev commented 2 months ago

Describe the bug In RHEL, mysql users are created with the mysql_native_password authentication plugin enabled (due to /etc/my.cnf.d/mysql-default-authentication-plugin.cnf) Starting from mysql version 8.4, the plugin will be disabled (https://dev.mysql.com/doc/relnotes/mysql/8.4/en/news-8-4-0.html) This will probably break openITCOCKPIT installations under RHEL when the user mode is not changed to caching_sha2_password

To Reproduce Steps to check the users:

mysql --defaults-file=/etc/mysql/debian.cnf
select user, host, plugin from mysql.user;

Expected behavior Add a check to raise a warning when the mysql_native_password authentication plugin is used. Maybe change automatically the users to use caching_sha2_password

ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';
ALTER USER 'openitcockpit'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';

Versions