Hi All,
I’m having trouble understanding the logic of the audit_log_filter. Even trying the simplest two filter system of log_all and log_none where a specific user or set of users is set to log_none the system will still log their actions due to having log_all as a the default rule with ‘%’
This was very easily achieved in the old audit_log plugin where you could simply comma delimit write the user@hosts as they are listed in the mysql.users and it would exclude them from the audit_log.
For example:
SET @filter = ‘{ “filter”: { “log”: true }}’;
SELECT audit_log_filter_set_filter(‘log_all’, @filter);
SELECT audit_log_filter_set_user(‘%’, ‘log_all’);
SET @filter = ‘{ “filter”: { “log”: false }}’;
SELECT audit_log_filter_set_filter(‘log_none’, @filter);
SELECT audit_log_filter_set_user(‘appuser@10.0.0.%’, ‘log_none’);
mysql> select * from mysql.audit_log_user;
±----------±-----------±-----------+
| username | userhost | filtername |
±----------±-----------±-----------+
| % | % | log_all |
| appuser | 10.0.0.% | log_none |
±----------±-----------±-----------+
2 rows in set (0.00 sec)
appuser connecting from 10.0.0.1 still gets logged.
How is this best achieved in audit_log_filter?
Also, side question: Does Percona 8.0.43’s audit_log_filter have all the same features and configuration available to it as Percona 8.4.x? The doco for the former is very sparse in comparison.