Hello dear community,
Once again we have a question about audit_log_filter. This time we use the version for Percona MySQL 8.0 Audit Log Filter overview - Percona Server for MySQL
First in the doc there is no page explaining how to write filter definitions compared to doc for 8.4 (Write audit_log_filter definitons - Percona Server for MySQL). And when we test to define filters like :
{
"filter": {
"class": [
{
"name": "query",
"event": {
"name": "start",
"log": {
"or": [
{ "field": { "name": "sql_command_id", "value": "select"} },
{ "field": { "name": "sql_command_id", "value": "create_table"} },
{ "field": { "name": "sql_command_id", "value": "drop_table"} }
]
}
}
}
]
}
}
Nothing is writing in audit log file. Or if we test another filter like :
{
"filter": {
"class": [
{ "name": "connection", "event": {"name": ["connect", "disconnect"], "log": true} },
{
"name": "query",
"event": {
"name": ["start", "status_end"],
"log": {
"not": {
"or": [
{ "function": {
"name": "string_find",
"args": [{"string": {"field": "sql_command_id"}}, {"string": {"string": "show_"}}]
}},
{ "field": { "name": "sql_command_id", "value": "select"} }
]
}
}
}
}
]
}
}
Filter doesn’t work too because SELECT
and SHOW
queries are written in the audit log file.
Perhaps in version 8.0 the plugin is not fully implemented, can you please confirm if this is the case ?