[MDEV-19442] server_audit plugin doesn't consider proxy users in server_audit_excl_users/server_audit_incl_users Created: 2019-05-11 Updated: 2024-01-29 Due: 2019-11-19 Resolved: 2020-12-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Authentication and Privilege System, Plugin - Audit |
| Affects Version/s: | 10.2.24, 10.1.40, 10.3.14, 10.4.4 |
| Fix Version/s: | 10.2.37, 10.3.28, 10.4.18, 10.5.9 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Alexey Botchkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The server_audit plugin doesn't consider proxy users when deciding whether to log an event based on server_audit_excl_users/server_audit_incl_users. This means that it doesn't work well with PAM user mapping: https://mariadb.com/kb/en/library/user-and-group-mapping-with-pam/ It looks like the do_log_user() function might need to be extended to have two arguments--an original user and a proxy user. https://github.com/MariaDB/server/blob/mariadb-10.4.4/plugin/server_audit/server_audit.c#L1479 https://github.com/MariaDB/server/blob/mariadb-10.4.4/plugin/server_audit/server_audit.c#L2025 https://github.com/MariaDB/server/blob/mariadb-10.4.4/plugin/server_audit/server_audit.c#L2041 https://github.com/MariaDB/server/blob/mariadb-10.4.4/plugin/server_audit/server_audit.c#L2555 For example, let's say that we are excluding the dba user from auditing:
And let's say that I log in as the bob PAM user who is mapped to the dba user:
This user's events will still be logged to the audit log:
This is because the server_audit plugin doesn't check the proxy user name against server_audit_excl_users/server_audit_incl_users. The plugin only checks the original user name. To actually exclude this user from auditing, we would have to add the "bob" user name to server_audit_excl_users. |
| Comments |
| Comment by Alexey Botchkov [ 2019-11-12 ] |
|
Going to work on it this week. |
| Comment by Julien Fritsch [ 2019-11-19 ] |
|
And the status is? On Tue, Nov 12, 2019 at 6:17 PM Alexey Botchkov (Jira) <jira@mariadb.org> |
| Comment by Julien Fritsch [ 2019-12-13 ] |
|
We are a month later than this comment |