Repository navigation
RFC: audit logging - #68384
RFC: audit logging#68384vshankar wants to merge 5 commits into
Conversation
Signed-off-by: Venky Shankar <[email protected]>
Signed-off-by: Venky Shankar <[email protected]>
Signed-off-by: Venky Shankar <[email protected]>
Signed-off-by: Venky Shankar <[email protected]>
Signed-off-by: Venky Shankar <[email protected]>
d38d4f3 to
ff6f0f8
Compare
gregsfortytwo
left a comment
There was a problem hiding this comment.
This needs documentation — from skimming, is the idea that this module logs to both sql and the monitor’s central log? If so, what’s the point of putting it in the manager at all when the monitor is fully durable?
I think there’s a tracker ticket, but it’s not linked and this seems far afield from the last time I looked at it. :D
| } | ||
| if (!num_new) { | ||
| dout(10) << " nothing new" << dendl; | ||
| goto done; |
There was a problem hiding this comment.
I know this is redundant, but it’s also safe against future mutations (and probably optimizes into no bytecode at all) — I think you should leave it alone.
aye -- I am writing one.
Yes, that's correct. The audit logs for daemons (mon, mgr to start with) are to be persisted in RADOS (via sqlite vfs). The mon store is periodically trimmed and to debug a broken cluster (say a broken file system), it would be nice to have a fairly larger (queryable) history of what specific commands were executed.
There is one, yes. I will link that up in my next push w/ documentation. I don't think this swayed from the initial proposal a whole lot. |
batrick
left a comment
There was a problem hiding this comment.
this all looks pretty reasonable as a starting point. I don't have much besides a small nit I happened to see. I didn't delve into the details much.
Is the plan to have this collect everything that already goes to the audit log for now or do you want to plumb in e.g. the disaster recovery commands too?
| void LogChannel::_do_log(LogEntry &&e) { | ||
| std::lock_guard l(channel_lock); | ||
|
|
||
| if (!e.has_logmsg()) { |
There was a problem hiding this comment.
reverse if/else so you can do if (e.has_logmsg())
Thanks for taking a look @batrick I will be splitting this change into the monitor parts that change the audit messages to use structure encoding, the mgr side changes and the manager module. |
@dparmar18 is doing the disaster recovery change to audit log those. Those logs will be directly written to the sqlite database rather then relaying it through the monitor. |
|
Split out the monitor change into a separate change: #69052 |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
…ing venky's pr ceph#68384 for new AuditDB schema, note: very messy as I was still experimenting around this time Signed-off-by: Ishaan Jain <[email protected]>
|
This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days. |
|
This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution! |
The mon -> mgr audit message is now structured so that the mgr does not have to parse the audit string for things like entity, from, return value, state, etc. The auditman module provides interfaces to query the audit records and (for now) handles the ingestion of mon audit messages to sqlite.
RFC since there is more work to do in terms of subscribing to log-info starting from the last recorded paxos version (epoch). I also haven't worried about scale for now.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.