[MDEV-19458] server_audit plugin should log when the server starts up and when the server shuts down Created: 2019-05-13 Updated: 2022-11-07 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Plugin - Audit |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major |
| Reporter: | Geoff Montee (Inactive) | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The server_audit plugin does not currently log any audit events when the server starts up or shuts down. It does not look like the audit plugin API has any hooks for start up or shut down events either. Should we log startup events in mysql_audit_initialize() and shutdown events in mysql_audit_finalize(), so that the API can stay the same? |
| Comments |
| Comment by Alexey Botchkov [ 2019-05-16 ] |
|
> Should we log startup events in mysql_audit_initialize() and shutdown events in mysql_audit_finalize(), so that the API can It makes sence to me. |
| Comment by Ralf Gebhardt [ 2019-05-28 ] |
|
Hi holyfoot, GeoffMontee. Audits are typically about user activities on database objects and on accessing the server as such. A server startup or shutdown is more about monitoring a server instance. I would not mix these use cases. Also, are mysql_audit_initialize() and mysql_audit_finalize() really only called on Server startup and shutdown? |
| Comment by Geoff Montee (Inactive) [ 2019-05-28 ] |
I would personally consider issuing a shutdown/startup request to be a form of "accessing the server" as well as performing an activity that can potentially affect all "database objects". Shutdowns and startups could definitely be relevant in an audit. Especially if the auditors suspect a rogue DBA of adding options to my.cnf or other configuration files as a way to bypass security mechanisms.
Yeah, it does appear so. https://github.com/MariaDB/server/blob/mariadb-10.4.5/sql/mysqld.cc#L5630 https://github.com/MariaDB/server/blob/mariadb-10.4.5/sql/mysqld.cc#L1932 |
| Comment by Alexey Botchkov [ 2019-05-31 ] |
|
Hi, GeoffMontee, ralf.gebhardt@mariadb.com! |