Skip to content

feat(audit) add initiator field to relevant events (almost all of them)

Dmitry Rodionov requested to merge dkr/audit-initiator into master

Summary

  • feat(audit) add initiator field to relevant events (almost all of them)

This patch adds initiator field to most of the events. Initiator is added to members of Op enum which do not contain it already (e g owner in CreateUser serves as initiator). To me it is reasonable to remove as_user from CaS/ACL checks because it matches initiator. But I decided not to do this just yet.

Additionally I've mande small cleanup to UserMetadata to avoid need for intermediate step in decoding when we first fetch tuple and then decode it into model struct.

Close #433 (closed)

Ensure that

  • New code is covered by tests (existing test changed to check initiator)
  • API is documented
  • Changelog is up to date
  • (if Lua API changed) Lua API version is bumped in luamod.rs
  • (if necessary) A follow-up doc issue is created in picodata/docs and linked here
Edited by Dmitry Rodionov

Merge request reports